public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.arch/i386-pkru.exp for native-gdbserver
@ 2023-03-15 15:38 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-15 15:38 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b0d27b62f51e0997407383100dbc64b7bc5f4ef
commit 7b0d27b62f51e0997407383100dbc64b7bc5f4ef
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Mar 15 16:38:03 2023 +0100
[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.
Diff:
---
gdb/testsuite/gdb.arch/i386-pkru.exp | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/i386-pkru.exp b/gdb/testsuite/gdb.arch/i386-pkru.exp
index 1f047df68ef..223a8aa95f0 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
+ }
+ }
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-15 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 15:38 [binutils-gdb] [gdb/testsuite] Fix gdb.arch/i386-pkru.exp for native-gdbserver Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).