diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-09-02 09:22:13 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-09-02 09:22:13 +0100 |
commit | 27aba0477a4818fd760accd5b29a210d0ade2f42 (patch) | |
tree | 0e54f603d93389dcbdfe06d99480c973d5e40d43 /gdb/testsuite/gdb.base/call-rt-st.exp | |
parent | db0a1c2b666b9612d77ee40b25875b286801f22d (diff) | |
download | fsf-binutils-gdb-27aba0477a4818fd760accd5b29a210d0ade2f42.zip fsf-binutils-gdb-27aba0477a4818fd760accd5b29a210d0ade2f42.tar.gz fsf-binutils-gdb-27aba0477a4818fd760accd5b29a210d0ade2f42.tar.bz2 |
Detect broken ptrace in gdb_skip_float_test
We recently found a ARM kernel ptrace bug
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-May/431962.html
Details can be found in the comment in gdb_skip_float_test. We can
skip floating point tests if the kernel bug is detected.
This patch adds more code in gdb_skip_float_test to detect the broken
ptrace on arm-linux. Such detection should be done at the beginning
of the test, because it starts a fresh GDB, so change the test cases
to invoke gdb_skip_float_test at the beginning of test, and use its
return value afterwards.
Since gdb_skip_float_test becomes a gdb_caching_proc, so it can't
have an argument, this patch also removes argument "msg", which isn't
useful.
gdb/testsuite:
2016-09-02 Yao Qi <yao.qi@linaro.org>
* gdb.arch/arm-neon.exp: Skip it if gdb_skip_float_test returns
true.
* gdb.base/call-ar-st.exp: Invoke gdb_skip_float_test.
* gdb.base/call-rt-st.exp: Likewise.
* gdb.base/call-sc.exp: Invoke gdb_skip_float_test and use its
return value instead of gdb,skip_float_test.
* gdb.base/callfuncs.exp: Invoke gdb_skip_float_test.
(do_function_calls): Use its return value instead of
gdb,skip_float_test.
* gdb.base/finish.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/return.exp: Likewise.
* gdb.base/return2.exp: Likewise.
* gdb.base/varargs.exp: Likewise.
* lib/gdb.exp (gdb_skip_float_test): Change it to
gdb_caching_proc. Detect the broken ptrace on arm-linux.
Diffstat (limited to 'gdb/testsuite/gdb.base/call-rt-st.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/call-rt-st.exp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp index 0f9c5e8..a92ba9e 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.exp +++ b/gdb/testsuite/gdb.base/call-rt-st.exp @@ -44,6 +44,8 @@ if [target_info exists gdb,cannot_call_functions] { continue } +set skip_float_test [gdb_skip_float_test] + # Start with a fresh gdb. clean_restart ${binfile} @@ -128,14 +130,14 @@ if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] { ".\[0-9\]+ = \\{next_index = \\{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\\}, values = \\{4, 6, 8, 10, 12, 14, 16, 18, 20, 22\\}, head = 0\\}" } -if {![gdb_skip_float_test "print print_one_double(*d1)"] && \ +if {!$skip_float_test && \ ![gdb_skip_stdio_test "print print_one_double(*d1)"] } { print_struct_call "print_one_double(*d1)" \ ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+" \ ".\[0-9\]+ = \\{double1 = 1\\.111\[0-9\]*\\}" } -if {![gdb_skip_float_test "print print_two_floats(*f3)"] && \ +if {!$skip_float_test && \ ![gdb_skip_stdio_test "print print_two_floats(*f3)"] } { print_struct_call "print_two_floats(*f3)" \ ".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+" \ |