diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-06-06 09:53:42 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-06-06 09:53:42 -0400 |
commit | 921b2bc73e6bc258e4ec8021e0cc4458a3b81e08 (patch) | |
tree | 7e007941e6d30326b5ff40d91d8e9d8e1f7f114d /gdb/testsuite | |
parent | 9482e6e450c821052206283811d5a802fa9989dd (diff) | |
download | gdb-921b2bc73e6bc258e4ec8021e0cc4458a3b81e08.zip gdb-921b2bc73e6bc258e4ec8021e0cc4458a3b81e08.tar.gz gdb-921b2bc73e6bc258e4ec8021e0cc4458a3b81e08.tar.bz2 |
gdb/testsuite: set sysroot in gdb.server/stop-reply-no-thread-multi.exp
I get some random timeouts in this test due to big debug info taking a
lot of time to read through gdbserver. When host and target are on the
same machine, clear the sysroot parameter so that GDB reads the files
from the local file system, as we already do in many tests.
I agree with what Pedro says here:
https://sourceware.org/pipermail/gdb-patches/2019-March/156568.html
that if this is bad for us, it's also bad for users, so we should be
fixing the slowness instead. But so far nobody seems to be working on
it, and the testsuite timeouts are getting in the way, so I think this
"set sysroot" is a net positive for now.
Without this patch, the test takes over 2 minutes to run (most of it
"downloading" libc debug info), with it it takes 10 seconds.
gdb/testsuite/ChangeLog:
* gdb.server/stop-reply-no-thread-multi.exp: Clear sysroot when
host and target are local.
Change-Id: Ieb6304f0e56b4575af450913de4210c667c6bf7b
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0bd3d1c..d51b60c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-06-06 Simon Marchi <simon.marchi@efficios.com> + + * gdb.server/stop-reply-no-thread-multi.exp: Clear sysroot when + host and target are local. + 2021-06-05 Hannes Domani <ssbssa@yahoo.de> * gdb.python/py-symbol.exp: Fix tests for Python 3. diff --git a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp index 50cf10f..b3ded0e 100644 --- a/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp +++ b/gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp @@ -48,6 +48,13 @@ proc run_test { target_non_stop disable_feature } { save_vars { GDBFLAGS } { append GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\"" + + # If GDB and GDBserver are both running locally, set the sysroot to avoid + # reading files via the remote protocol. + if { ![is_remote host] && ![is_remote target] } { + set GDBFLAGS "$GDBFLAGS -ex \"set sysroot\"" + } + clean_restart ${binfile} } |