public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed, testsuite] Fix pathname prefix and timeout issues in gdb.mi/mi-pending.exp
@ 2015-09-18 19:05 Sandra Loosemore
  0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2015-09-18 19:05 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

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

[-- Attachment #2: mi-pending.log --]
[-- Type: text/x-log, Size: 258 bytes --]

2015-09-18  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/testsuite/
	* gdb.mi/mi-pending.exp: Don't use directory prefix when setting
	the pending breakpoint.  Remove timeout override for "Run till
	MI pending breakpoint on pendfunc3 on thread 2" test.

[-- Attachment #3: mi-pending.patch --]
[-- Type: text/x-patch, Size: 1462 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-18 19:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18 19:05 [committed, testsuite] Fix pathname prefix and timeout issues in gdb.mi/mi-pending.exp Sandra Loosemore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).