This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 13/14] ia64-sigill.exp: Don't assume there's no infrun output after the prompt


From: Pedro Alves <pedro@codesourcery.com>

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 e14c685..4b2ebae 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
     }
 }
-- 
1.7.0.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]