aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-10-28 21:04:12 +0100
committerTom de Vries <tdevries@suse.de>2020-10-28 21:04:12 +0100
commit6b68fd45a80196d1462c0fd1e174cead99b3eaeb (patch)
treef913fdc084caf81478277d895ab4dc0c529567d2
parent32a5f98aa4b566411df304160b6ed69cc80d8f89 (diff)
downloadgdb-6b68fd45a80196d1462c0fd1e174cead99b3eaeb.zip
gdb-6b68fd45a80196d1462c0fd1e174cead99b3eaeb.tar.gz
gdb-6b68fd45a80196d1462c0fd1e174cead99b3eaeb.tar.bz2
[gdb/testsuite] Fix gdb.rust/traits.exp with -readnow
With test-case gdb.rust/traits.exp and target board readnow we get: ... FAIL: gdb.rust/traits.exp: print *td FAIL: gdb.rust/traits.exp: print *tu ... Mark these FAILs as KFAILs. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-10-28 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (readnow): Handle arg. * gdb.rust/traits.exp: Add KFAILs for -readnow.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.rust/traits.exp8
-rw-r--r--gdb/testsuite/lib/gdb.exp9
3 files changed, 20 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e500489..a0cdd70 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2020-10-28 Tom de Vries <tdevries@suse.de>
+ * lib/gdb.exp (readnow): Handle arg.
+ * gdb.rust/traits.exp: Add KFAILs for -readnow.
+
+2020-10-28 Tom de Vries <tdevries@suse.de>
+
* gdb.base/relocate.exp: Update regexp for -readnow.
2020-10-28 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp
index 41e58e1..d237b92 100644
--- a/gdb/testsuite/gdb.rust/traits.exp
+++ b/gdb/testsuite/gdb.rust/traits.exp
@@ -43,5 +43,13 @@ if {![runto ${srcfile}:$line]} {
return -1
}
+set readnow_p [readnow $binfile]
+
+if { $readnow_p } {
+ setup_kfail "gdb/26799" *-*-*
+}
gdb_test "print *td" " = 23.5"
+if { $readnow_p } {
+ setup_kfail "gdb/26799" *-*-*
+}
gdb_test "print *tu" " = 23"
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index ef96209..003bd30 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7318,8 +7318,13 @@ gdb_caching_proc supports_fcf_protection {
# Return 1 if symbols were read in using -readnow. Otherwise, return 0.
-proc readnow { } {
- set cmd "maint print objfiles"
+proc readnow { args } {
+ if { [llength $args] == 1 } {
+ set re [lindex $args 0]
+ } else {
+ set re ""
+ }
+ set cmd "maint print objfiles $re"
gdb_test_multiple $cmd "" {
-re -wrap "\r\n.gdb_index: faked for \"readnow\"\r\n.*" {
return 1