This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 13/14] ia64-sigill.exp: Don't assume there's no infrun output after the prompt
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 3 May 2012 21:14:28 +0800
- Subject: [PATCH 13/14] ia64-sigill.exp: Don't assume there's no infrun output after the prompt
- References: <1336050869-29605-1-git-send-email-yao@codesourcery.com>
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