diff options
author | Tom de Vries <tdevries@suse.de> | 2019-10-13 02:40:57 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-10-13 02:40:57 +0200 |
commit | d6e763135663f01349ed4126b80090ea2f37fcf2 (patch) | |
tree | ca6ef3f8952a3fc8cfe649de6d91d8e1949ae9ad /gdb | |
parent | d5082b3251877ecded4cd3766503e51ecb8ef5c8 (diff) | |
download | gdb-d6e763135663f01349ed4126b80090ea2f37fcf2.zip gdb-d6e763135663f01349ed4126b80090ea2f37fcf2.tar.gz gdb-d6e763135663f01349ed4126b80090ea2f37fcf2.tar.bz2 |
[gdb/testsuite] Add KFAIL for missing support of reverse-debugging xsave
Normally the gdb.reverse/*.exp test-cases pass on my system (apart from the
record/23188 KFAIL for gdb.reverse/step-precsave.exp). But when specifying
GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable to force glibc to use
_dl_runtime_resolve_xsave instead of _dl_runtime_resolve_xsavec, we run into
1054 FAILs like this:
...
(gdb) PASS: gdb.reverse/sigall-reverse.exp: b gen_HUP
continue^M
Continuing.^M
Process record does not support instruction 0xfae64 at address \
0x7ffff7ded958.^M
Process record: failed to record execution log.^M
^M
Program stopped.^M
0x00007ffff7ded958 in _dl_runtime_resolve_xsave () from \
/lib64/ld-linux-x86-64.so.2^M
(gdb) FAIL: gdb.reverse/sigall-reverse.exp: get signal ABRT
...
The problem is that the xsave instruction is not supported in
reverse-debugging (PR record/25038).
Add KFAILs for this PR.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-10-13 Tom de Vries <tdevries@suse.de>
PR record/25038
* gdb.reverse/sigall-precsave.exp: Add PR record/25038 KFAIL.
* gdb.reverse/sigall-reverse.exp: Same.
* gdb.reverse/solib-precsave.exp: Same.
* gdb.reverse/solib-reverse.exp: Same.
* gdb.reverse/step-precsave.exp: Same.
* gdb.reverse/until-precsave.exp: Same.
* gdb.reverse/until-reverse.exp: Same.
* lib/gdb.exp (gdb_continue_to_breakpoint): Same.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/sigall-precsave.exp | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/sigall-reverse.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/solib-precsave.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/solib-reverse.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/step-precsave.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/until-precsave.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.reverse/until-reverse.exp | 15 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 4 |
9 files changed, 87 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2ea7ffb..6ef0746 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2019-10-13 Tom de Vries <tdevries@suse.de> + + PR record/25038 + * gdb.reverse/sigall-precsave.exp: Add PR record/25038 KFAIL. + * gdb.reverse/sigall-reverse.exp: Same. + * gdb.reverse/solib-precsave.exp: Same. + * gdb.reverse/solib-reverse.exp: Same. + * gdb.reverse/step-precsave.exp: Same. + * gdb.reverse/until-precsave.exp: Same. + * gdb.reverse/until-reverse.exp: Same. + * lib/gdb.exp (gdb_continue_to_breakpoint): Same. + 2019-10-10 Andreas Arnez <arnez@linux.ibm.com> * gdb.base/infcall-nested-structs.c (cmp_struct_02_01) diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index 371eecd..94ae263 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -258,14 +258,20 @@ foreach sig $signals { } } -gdb_test_multiple "continue" "continue" { +set kfail_pattern "Process record does not support instruction 0xfae64 at.*" +set test "run to end of main" +gdb_test_multiple "continue" $test { -re "Breakpoint .* end of main .*$gdb_prompt $" { - pass "run to end of main" + pass $test } -re "Breakpoint .* handle_.*$gdb_prompt $" { send_gdb "continue\n" exp_continue } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $test + return -1 + } } delete_breakpoints diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp index 651e14d..ecebf05 100644 --- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp +++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp @@ -37,6 +37,7 @@ proc test_one_sig {nextsig} { global sig_supported global gdb_prompt global thissig + global record_instruction_kfail set this_sig_supported $sig_supported gdb_test "handle SIG$thissig stop print" \ @@ -51,6 +52,7 @@ proc test_one_sig {nextsig} { setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu" } set testmsg "get signal $thissig" + set kfail_pattern "Process record does not support instruction 0xfae64 at.*" gdb_test_multiple "continue" $testmsg { -re "Program received signal SIG$thissig.*handle_$thissig.*$gdb_prompt $" { fail "$testmsg (wrong location)" @@ -62,6 +64,11 @@ proc test_one_sig {nextsig} { xfail $testmsg set need_another_continue 0 } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" "$testmsg" + set record_instruction_kfail 1 + return + } } } @@ -238,8 +245,12 @@ set thissig "ABRT" # test signal handling with_test_prefix "sig-test-1" { + set record_instruction_kfail 0 foreach sig [lrange $signals 1 end] { test_one_sig $sig + if { $record_instruction_kfail } { + return -1 + } } } diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp index 574d798..a3f874c 100644 --- a/gdb/testsuite/gdb.reverse/solib-precsave.exp +++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp @@ -91,7 +91,18 @@ gdb_test "break $end_of_main" \ "Breakpoint $decimal at .*$srcfile, line $end_of_main\." \ "breakpoint at end of main" -gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main" +set test "run to end of main" +set pass_pattern "Breakpoint .* end of main .*" +set kfail_pattern "Process record does not support instruction 0xfae64 at.*" +gdb_test_multiple "continue" $test { + -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { + pass $test + } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $test + return -1 + } +} gdb_test "record save $precsave" \ "Saved core file $precsave with execution log\." \ diff --git a/gdb/testsuite/gdb.reverse/solib-reverse.exp b/gdb/testsuite/gdb.reverse/solib-reverse.exp index 77c3213..53b3523 100644 --- a/gdb/testsuite/gdb.reverse/solib-reverse.exp +++ b/gdb/testsuite/gdb.reverse/solib-reverse.exp @@ -86,7 +86,18 @@ if [supports_process_record] { set end_part_one [gdb_get_line_number " end part one" "$srcfile"] set end_part_two [gdb_get_line_number " end part two" "$srcfile"] -gdb_test "until $end_part_one" " end part one.*" "run until end part one" +set test "run until end part one" +set pass_pattern " end part one.*" +set kfail_pattern "Process record does not support instruction 0xfae64 at.*" +gdb_test_multiple "until $end_part_one" $test { + -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { + pass $test + } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $test + return -1 + } +} gdb_test "reverse-step" " shr1 three .*" "reverse-step third shr1" gdb_test "reverse-step" " shr1 two .*" "reverse-step second shr1" diff --git a/gdb/testsuite/gdb.reverse/step-precsave.exp b/gdb/testsuite/gdb.reverse/step-precsave.exp index 2073b8a..72ee279 100644 --- a/gdb/testsuite/gdb.reverse/step-precsave.exp +++ b/gdb/testsuite/gdb.reverse/step-precsave.exp @@ -49,6 +49,7 @@ with_timeout_factor 20 { set test "run to end of main" set pass_pattern "Breakpoint .* end of main .*" set kfail_pattern "Process record does not support instruction 0xc5 at.*" + set kfail2_pattern "Process record does not support instruction 0xfae64 at.*" gdb_test_multiple "continue" $test { -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { pass $test @@ -56,6 +57,9 @@ with_timeout_factor 20 { -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { kfail "record/23188" $test } + -re "\[\r\n\]*(?:$kfail2_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "record/25038" $test + } } } diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index baf21ab..1f09df1 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -50,7 +50,18 @@ gdb_test "break $end_of_main" \ # This can take awhile. with_timeout_factor 20 { - gdb_test "continue" "Breakpoint .* set breakpoint 10a here .*" "run to end of main" + set test "run to end of main" + set pass_pattern "Breakpoint .* set breakpoint 10a here .*" + set kfail_pattern "Process record does not support instruction 0xfae64 at.*" + gdb_test_multiple "continue" $test { + -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { + pass $test + } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $test + return -1 + } + } } # So can this, against gdbserver, for example. diff --git a/gdb/testsuite/gdb.reverse/until-reverse.exp b/gdb/testsuite/gdb.reverse/until-reverse.exp index 2e26de3..804e07f 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.exp +++ b/gdb/testsuite/gdb.reverse/until-reverse.exp @@ -49,9 +49,18 @@ gdb_test "until $bp_location1" \ # Advance up to factorial, outer invocation # -gdb_test "advance factorial" \ - "factorial .value=6..*$srcfile:$bp_location7.*" \ - "advance to factorial" +set test "advance to factorial" +set pass_pattern "factorial .value=6..*$srcfile:$bp_location7.*" +set kfail_pattern "Process record does not support instruction 0xfae64 at.*" +gdb_test_multiple "advance factorial" $test { + -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { + pass "$test" + } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $test + return -1 + } +} # At this point, 'until' should continue the inferior up to when all the # inner invocations of factorial() are completed and we are back at this diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 50db45d..fed46ec 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -633,10 +633,14 @@ proc gdb_continue_to_breakpoint {name {location_pattern .*}} { global gdb_prompt set full_name "continue to breakpoint: $name" + set kfail_pattern "Process record does not support instruction 0xfae64 at.*" gdb_test_multiple "continue" $full_name { -re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" { pass $full_name } + -re "\[\r\n\]*(?:$kfail_pattern)\[\r\n\]+$gdb_prompt $" { + kfail "gdb/25038" $full_name + } } } |