This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix pthreads.exp intermitent failure
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 30 Jul 2010 00:22:21 +0100
- Subject: Fix pthreads.exp intermitent failure
I applied the patch below to fix this intermitent failure:
(gdb) PASS: gdb.threads/pthreads.exp: set break at common_routine in thread 2
continue
Continuing.
[Switching to Thread 0x2aaaab8f5710 (LWP 13712)]
Breakpoint 6, common_routine (arg=2) at ../../../src/gdb/testsuite/gdb.threads/pthreads.c:52
PASS: gdb.threads/pthreads.exp: continue to bkpt at common_routine in thread 2
52 if (verbose) printf("common_routine (%d)\n", arg);
(gdb) FAIL: gdb.threads/pthreads.exp: backtrace from thread 2 bkpt in common_routine
testcase ../../../src/gdb/testsuite/gdb.threads/pthreads.exp completed in 16 seconds
=== gdb Summary ===
# of expected passes 37
# of unexpected failures 1
--
Pedro Alves
2010-07-29 Pedro Alves <pedro@codesourcery.com>
* gdb.threads/pthreads.exp (check_backtraces): Consume $gdb_prompt
in gdb_test_multiple.
---
gdb/testsuite/gdb.threads/pthreads.exp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: src/gdb/testsuite/gdb.threads/pthreads.exp
===================================================================
--- src.orig/gdb/testsuite/gdb.threads/pthreads.exp 2010-06-16 12:36:51.000000000 +0100
+++ src/gdb/testsuite/gdb.threads/pthreads.exp 2010-07-29 21:22:46.000000000 +0100
@@ -269,16 +269,16 @@ proc check_backtraces {} {
"set break at common_routine in thread 2"
gdb_test_multiple "continue" "continue to bkpt at common_routine in thread 2" {
- -re "Breakpoint .* common_routine \\(arg=2\\).*" {
+ -re "Breakpoint .* common_routine \\(arg=2\\).*$gdb_prompt $" {
pass "continue to bkpt at common_routine in thread 2"
gdb_test "backtrace" \
"#0.*common_routine \\(arg=2\\).*#1.*thread2.*" \
"backtrace from thread 2 bkpt in common_routine"
}
- -re "Breakpoint .* common_routine \\(arg=0\\).*" {
+ -re "Breakpoint .* common_routine \\(arg=0\\).*$gdb_prompt $" {
fail "continue to bkpt at common_routine in thread 2 (arg=0)"
}
- -re "Breakpoint .* common_routine \\(arg=1\\).*" {
+ -re "Breakpoint .* common_routine \\(arg=1\\).*$gdb_prompt $" {
fail "continue to bkpt at common_routine in thread 2 (arg=1)"
}
}