Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [RFC/WIP PATCH v2 04/12] ia64-sigill.exp: Don't assume there's no infrun output after the prompt
Date: Sat, 17 Dec 2011 03:00:00 -0000	[thread overview]
Message-ID: <20111217025926.22456.71706.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111217025904.22456.50717.stgit@localhost6.localdomain6>

In async mode, we can still see TARGET_WAITKIND_IGNORE and
TARGET_WAITKIND_NORESUMED events after displaying the prompt, breaking
this test with timeouts, due to the anchor in "$gdb_prompt $"

This fixes it.

v2:

 - new in v2.

gdb/testsuite/
2011-12-16  Pedro Alves  <pedro@codesourcery.com>

	* gdb.threads/ia64-sigill.exp: Don't assume there's no infrun
	output after the prompt.
---
 gdb/testsuite/gdb.threads/ia64-sigill.exp |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp
index 9867041..c79cb12 100644
--- a/gdb/testsuite/gdb.threads/ia64-sigill.exp
+++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp
@@ -55,21 +55,35 @@ gdb_test_no_output {set $sigill_bpnum=$bpnum}
 
 gdb_breakpoint [gdb_get_line_number "break-at-exit"]
 
+# The ia64 SIGILL signal is only visible in the infrun debug output.
+# Note we can't assume there's no infrun output after the prompt from
+# here on.
 gdb_test_no_output "set debug infrun 1"
 
-# The ia64 SIGILL signal is visible only in the lin-lwp debug.
-
-gdb_test "continue" "Breakpoint \[0-9\]+,( .* in)? thread_func .*"
+set test "continue to thread_func"
+gdb_test_multiple "continue" $test {
+    -re "Breakpoint \[0-9\]+,( .* in)? thread_func .*$gdb_prompt " {
+	pass $test
+    }
+}
 
-gdb_test_no_output {delete $sigill_bpnum}
+set test {delete $sigill_bpnum}
+gdb_test_multiple "continue" $test {
+    -re "$gdb_prompt " {
+	pass $test
+    }
+}
 
 set test "continue for the pending signal"
 gdb_test_multiple "continue" $test {
-    -re "Breakpoint \[0-9\]+, .*break-at-exit.*\r\n$gdb_prompt $" {
+    -re "Breakpoint \[0-9\]+, .*break-at-exit.*\r\n$gdb_prompt " {
 	# Breakpoint has been skipped in the other thread.
 	pass $test
     }
-    -re "Program received signal .*\r\n$gdb_prompt $" {
+    -re "Program received signal .*\r\n$gdb_prompt " {
+	fail $test
+    }
+    -re "$gdb_prompt " {
 	fail $test
     }
 }


  parent reply	other threads:[~2011-12-17  2:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17  2:59 [RFC/WIP I/T sets V2 PATCH 00/14] I/T sets Pedro Alves
2011-12-17  2:59 ` [RFC/WIP PATCH v2 01/12] Flip to set target-async on by default Pedro Alves
2011-12-23 18:04   ` Marc Khouzam
2011-12-17  2:59 ` [RFC/WIP PATCH v2 03/12] manythreads.exp: Adjust to handle threads appearing/disappearing after "Program received signal SIGFOO" Pedro Alves
2011-12-17  3:00 ` Pedro Alves [this message]
2011-12-17  3:00 ` [RFC/WIP PATCH v2 07/12] Expand %ITSET% and %THREAD% in the prompt Pedro Alves
2011-12-17  3:00 ` [RFC/WIP PATCH v2 11/12] Default the current itset to the current inferior set (curset) Pedro Alves
2011-12-17  3:05 ` [RFC/WIP PATCH v2 08/12] I/T set support for breakpoints - trigger set, and stop set Pedro Alves
2011-12-17  3:07 ` [RFC/WIP PATCH v2 13/12] Comment out new info breakpoints output, in order to not break the test suite Pedro Alves
2011-12-17  3:08 ` [RFC/WIP PATCH v2 12/12] Default "set schedule-multiple" to on Pedro Alves
2011-12-17  8:49 ` [RFC/WIP PATCH v2 14/12] experiment with "scope" Pedro Alves
2011-12-17 12:35 ` [RFC/WIP PATCH v2 02/14] Implement all-stop on top of a target running non-stop mode Pedro Alves
2011-12-17 12:37 ` [RFC/WIP PATCH v2 05/14] watchthreads-reorder.exp: Don't assume there's no infrun output after the prompt Pedro Alves
2011-12-17 12:37 ` [RFC/WIP PATCH v2 06/14] Add base itsets support Pedro Alves
2011-12-17 12:38 ` [RFC/WIP PATCH v2 09/14] Add I/T set support to most execution commands Pedro Alves
2011-12-17 14:05 ` [RFC/WIP PATCH v2 10/14] Parallel steps, wait for all threads to reach their goal Pedro Alves

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=20111217025926.22456.71706.stgit@localhost6.localdomain6 \
    --to=pedro@codesourcery.com \
    --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