Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Mark gdb.multi/multi-term-settings.exp FAIL as racy
Date: Sun, 15 Sep 2019 09:34:00 -0000	[thread overview]
Message-ID: <20190915093435.GA27341@delia> (raw)

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.


                 reply	other threads:[~2019-09-15  9:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190915093435.GA27341@delia \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox