* [PATCH][gdb/testsuite] Mark gdb.multi/multi-term-settings.exp FAIL as racy
@ 2019-09-15 9:34 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-09-15 9:34 UTC (permalink / raw)
To: gdb-patches
Hi,
This fail is racy:
...
FAIL: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: \
stop with control-c (SIGINT)
...
Mark it as such.
OK for trunk?
Thanks,
- Tom
[gdb/testsuite] Mark gdb.multi/multi-term-settings.exp FAIL as racy
gdb/testsuite/ChangeLog:
2019-09-15 Tom de Vries <tdevries@suse.de>
PR testsuite/24929
* lib/gdb.exp (gdb_ignore_racy_test, setup_racy_fail): New proc.
* gdb.multi/multi-term-settings.exp: Mark fail as racy.
---
gdb/testsuite/gdb.multi/multi-term-settings.exp | 3 +++
gdb/testsuite/lib/gdb.exp | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp
index 1c550aaa2e..7c29a65365 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.exp
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp
@@ -214,6 +214,9 @@ proc coretest {inf1_how inf2_how} {
if {$expect_ttou} {
gdb_test "" "Quit" "stop with control-c (Quit)"
} else {
+ if { $inf1_how == "attach" && $inf2_how == "attach" } {
+ setup_racy_fail
+ }
gdb_test "" "received signal SIGINT.*" "stop with control-c (SIGINT)"
}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index acbeb01376..2ca9a80870 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5402,6 +5402,26 @@ proc gdb_skip_bogus_test { msg } {
return 0
}
+# Return 1 if we want to ignore FAILs that are known to be racy.
+
+proc gdb_ignore_racy_test { } {
+ # We want to have some means to enable this conditionally, but for now,
+ # hardcode this.
+ return 1
+}
+
+# Setup the next FAIL to be a racy FAIL.
+
+proc setup_racy_fail { } {
+ if { ! [gdb_ignore_racy_test] } {
+ return
+ }
+
+ # Make the test flip between KPASS and KFAIL, instead of between PASS
+ # and FAIL.
+ setup_kfail gdb/racy *-*-*
+}
+
# Return true if a test should be skipped due to lack of XML support
# in the host GDB.
# NOTE: This must be called while gdb is *not* running.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-15 9:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 9:34 [PATCH][gdb/testsuite] Mark gdb.multi/multi-term-settings.exp FAIL as racy 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