diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-15 16:38:03 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-15 16:38:03 +0100 |
commit | 7b0d27b62f51e0997407383100dbc64b7bc5f4ef (patch) | |
tree | 7d8976269637bb85ad622139a1e6ef3e8dd221be | |
parent | 86091eae202f32acee55afdb6134e7f4efa20209 (diff) | |
download | binutils-7b0d27b62f51e0997407383100dbc64b7bc5f4ef.zip binutils-7b0d27b62f51e0997407383100dbc64b7bc5f4ef.tar.gz binutils-7b0d27b62f51e0997407383100dbc64b7bc5f4ef.tar.bz2 |
[gdb/testsuite] Fix gdb.arch/i386-pkru.exp for native-gdbserver
With test-case gdb.arch/i386-pkru.exp and target board native-gdbserver we run
into:
...
FAIL: gdb.arch/i386-pkru.exp: variable after reading pkru
...
This looks similar to the the problem for which there's already an xfail, so
fix this by extending the xfail matching.
Tested on x86_64-linux.
Also tested on openSUSE Tumbleweed, where all tests in the test-case pass.
-rw-r--r-- | gdb/testsuite/gdb.arch/i386-pkru.exp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp index 1f047df..223a8aa 100644 --- a/gdb/testsuite/gdb.arch/i386-pkru.exp +++ b/gdb/testsuite/gdb.arch/i386-pkru.exp @@ -80,7 +80,6 @@ gdb_test "info register pkru" ".*pkru.*$val1.*" "read pkru register" set val2 0x44444444 gdb_test "print /x \$pkru = $val2" "= $val2" "set pkru value" -set xval $val2 gdb_test_multiple "info register pkru" "read value after setting value" { -re -wrap ".*pkru.*$val2.*" { pass $gdb_test_name @@ -91,11 +90,21 @@ gdb_test_multiple "info register pkru" "read value after setting value" { } else { fail $gdb_test_name } - set xval $val1 } } gdb_breakpoint [ gdb_get_line_number "break here 2" ] gdb_continue_to_breakpoint "break here 2" ".*break here 2.*" -gdb_test "print /x rd_value" "= $xval" "variable after reading pkru" +gdb_test_multiple "print /x rd_value" "variable after reading pkru" { + -re -wrap "= $val2" { + pass $gdb_test_name + } + -re -wrap "= $val1" { + if { $have_xfail } { + xfail $gdb_test_name + } else { + fail $gdb_test_name + } + } +} |