diff mbox

[committed,testsuite] Fix pathname prefix and timeout issues in gdb.mi/mi-pending.exp

Message ID 55FC6036.7090302@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore Sept. 18, 2015, 7:04 p.m. UTC
This patch fixes another problem with hard-wired pathname prefixes that 
are inappropriate for remote-host testing.  This time it's in the 
command used to set the pending breakpoint in gdb.mi/mi-pending.exp.  It 
was setting the breakpoint using the pathname to the source file on the 
host where the .exp file is running, which may not be correct on the 
remote host.  The net result is that it was failing ever to set or stop 
at the breakpoint in its intended location.  Using the bare basename of 
the file, without a directory prefix, seems to work fine for both the 
local and remote testing scenarios.

Also, for some reason the continue-to-breakpoint test had a hard-wired 
timeout of 5 seconds.  This was tripping for the slow-ish remote target 
I've been testing on, and I don't see any purpose in overriding the 
target board's default timeout, so I've removed that.

I think both of these fixes qualify as obvious, so I've committed this 
patch.

-Sandra
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp
index 88c6870..5426db5 100644
--- a/gdb/testsuite/gdb.mi/mi-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-pending.exp
@@ -64,8 +64,8 @@  mi_gdb_test "-break-insert -f pendfunc1" \
     "MI pending breakpoint on pendfunc1"
 
 # Set pending breakpoint with a condition via MI.
-mi_gdb_test "-break-insert -f -c x==4 ${libsrc1}:pendfunc2" \
-    ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"${libsrc1}:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libsrc1}:pendfunc2\"\}"\
+mi_gdb_test "-break-insert -f -c x==4 ${libfile1}.c:pendfunc2" \
+    ".*\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"${libfile1}.c:pendfunc2\",cond=\"x==4\",times=\"0\",original-location=\"${libfile1}.c:pendfunc2\"\}"\
     "MI pending breakpoint on ${libfile1}.c:pendfunc2 if x==4"
 
 # Set breakpoint so that we can stop when the thread is created
@@ -112,7 +112,7 @@  mi_send_resuming_command "exec-continue" "continuing execution to thread conditi
 
 # Check if we stopped in thread 2 like we should.
 set testname "Run till MI pending breakpoint on pendfunc3 on thread 2"
-gdb_expect 5 {
+gdb_expect {
     -re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" {
 	pass $testname
 	return 0