[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.
This commit is contained in:
Tom de Vries 2019-10-13 02:40:57 +02:00
parent d5082b3251
commit d6e7631356
9 changed files with 87 additions and 8 deletions

View File

@ -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)

View File

@ -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

View File

@ -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
}
}
}

View File

@ -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\." \

View File

@ -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"

View File

@ -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
}
}
}

View File

@ -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.

View File

@ -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

View File

@ -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
}
}
}