aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-03-31 19:42:17 +0100
committerAndrew Burgess <aburgess@redhat.com>2022-04-04 23:21:07 +0100
commitd3b610627ee5a090988908b21200d7d04bb41088 (patch)
tree4ecd4ceb4c1af5ed0504f5a89129241778b349d0 /gdb/testsuite
parent4cc98c360d8e9ab567e915e7b080b5d4113d5b3b (diff)
downloadgdb-d3b610627ee5a090988908b21200d7d04bb41088.zip
gdb-d3b610627ee5a090988908b21200d7d04bb41088.tar.gz
gdb-d3b610627ee5a090988908b21200d7d04bb41088.tar.bz2
gdb/testsuite: fix timeout in server-pipe.exp test
I noticed that the gdb.server/server-pipe.exp test would sometimes timeout when my machine was more heavily loaded. Turns out the test is reading all the shared libraries over GDB's remote protocol, which can be slow. We avoid this in other tests by setting the sysroot in GDBFLAGS, something which is missing from the gdb.server/server-pipe.exp test. Fix the timeouts by setting sysroot in GDBFLAGS, after this the shared libraries are no longer copied over the remote protocol, and I no longer see the test timeout.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.server/server-pipe.exp10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index ca2164b..8353737 100644
--- a/gdb/testsuite/gdb.server/server-pipe.exp
+++ b/gdb/testsuite/gdb.server/server-pipe.exp
@@ -74,7 +74,11 @@ proc do_test { target } {
}
}
-# Test with the two remote protocol types.
-foreach_with_prefix target { remote extended-remote } {
- do_test ${target}
+save_vars { GDBFLAGS } {
+ set GDBFLAGS "$GDBFLAGS -ex \"set sysroot\""
+
+ # Test with the two remote protocol types.
+ foreach_with_prefix target { remote extended-remote } {
+ do_test ${target}
+ }
}