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.
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
} 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
+ }
+ }
+}