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

[commit/testsuite] Disable two troublesome remote.exp tests

remote.exp does several tests of the "load" command if you're
already connected to a remote target.  There are two problems:

* The first test uses the very smallest possible memory write packet.
We send out a complete packet and wait for an OK for every byte of the
loaded program.  On my Windows host, even connected to a local
simulator, this test takes ten or fifteen minutes to run!  I think
that's excessive.

* The last few tests deliberately force the write packet size to be
huge.  One reason GDB doesn't do this by default is to accomodate
remote stubs that use fixed-size buffers, and either fail or crash
when the write is too large.  I happened to encounter such a
target... I don't think those tests are valuable.  We still have some
tests for "load" in this file, plus it gets used at default settings
by every test case.

So I've checked in this patch.  Tested on arm-none-eabi and x86_64-linux.

2009-11-13  Daniel Jacobowitz  <>

	* gdb.base/remote.exp: Delete the slowest load test.
	Do not load with fixed packet sizes.

 gdb/testsuite/gdb.base/remote.exp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: gdb-mainline/gdb/testsuite/gdb.base/remote.exp
--- gdb-mainline.orig/gdb/testsuite/gdb.base/remote.exp	2009-11-13 10:57:08.000000000 -0800
+++ gdb-mainline/gdb/testsuite/gdb.base/remote.exp	2009-11-13 12:59:44.000000000 -0800
@@ -95,6 +95,11 @@ proc gdb_load_timed {executable class wr
+    # Do not try to load using fixed sizes; we may overflow the remote target.
+    if { $class == "fixed" } {
+	return
+    }
     set load_begin_time [clock clicks]
     set result [gdb_load $executable]
     set load_end_time [clock clicks]
@@ -106,8 +111,6 @@ proc gdb_load_timed {executable class wr
     pass $test
-gdb_load_timed $binfile "" {}
 # Typically about 400-1 bytes can be downloaded
 gdb_load_timed $binfile "limit" 398
 gdb_load_timed $binfile "limit" 400

Daniel Jacobowitz

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