This is the mail archive of the gdb-cvs@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]

[binutils-gdb] Fix gdb.threads/non-ldr-exc-3.exp race


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d15dcecdee0f07b0b088dd3a8ebb50826c5b7bc5

commit d15dcecdee0f07b0b088dd3a8ebb50826c5b7bc5
Author: Pedro Alves <palves@redhat.com>
Date:   Tue Sep 15 17:01:59 2015 +0100

    Fix gdb.threads/non-ldr-exc-3.exp race
    
    gdb.threads/non-ldr-exc-3.exp is sometimes failing like this:
    
     [Switching to Thread 6831.6832]
    
     Breakpoint 2, thread_execler (arg=0x0) at /home/pedro/gdb/mygit/build/../src/gdb/testsuite/gdb.threads/non-ldr-exc-3.c:41
     41        if (execl (image, image, argv1, NULL) == -1) /* break-here */
     PASS: gdb.threads/non-ldr-exc-3.exp: lock-sched=on,non-stop=off: continue to breakpoint
     (gdb) set scheduler-locking on
     (gdb) FAIL: gdb.threads/non-ldr-exc-3.exp: lock-sched=on,non-stop=off: set scheduler-locking on
    
    The problem is that the gdb_test_multiple is missing the prompt
    anchor.  The problem was introduced by 2fd33e9448.  This reverts the
    hunk that introduced the problem, reverting back to
    gdb_continue_to_breakpoint.
    
    gdb/testsuite/ChangeLog:
    2015-09-15  Pedro Alves  <palves@redhat.com>
    
    	* gdb.threads/non-ldr-exc-3.exp (do_test): Use
    	gdb_continue_to_breakpoint instead of gdb_test_multiple.

Diff:
---
 gdb/testsuite/ChangeLog                     | 5 +++++
 gdb/testsuite/gdb.threads/non-ldr-exc-3.exp | 6 +-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d0bf156..e951a13 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-15  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/non-ldr-exc-3.exp (do_test): Use
+	gdb_continue_to_breakpoint instead of gdb_test_multiple.
+
 2015-09-14  Pedro Alves  <palves@redhat.com>
 
 	* gdb.base/hook-stop-continue.c: Delete.
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
index 3e7a3a1..188b825 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
@@ -45,11 +45,7 @@ proc do_test { lock_sched nonstop } {
 	}
 
 	gdb_breakpoint [gdb_get_line_number "break-here"]
-	gdb_test_multiple "continue" "continue to breakpoint" {
-	    -re ".*Breakpoint.*break-here.*" {
-	        pass "continue to breakpoint"
-	    }
-	}
+	gdb_continue_to_breakpoint "break-here" ".* break-here .*"
 
 	# Also test with sched-lock to make sure we can follow the
 	# non-leader thread execing even though the main thread wasn't


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