public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: fix timeout in server-pipe.exp test
@ 2022-03-31 18:46 Andrew Burgess
  2022-04-04 16:56 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess @ 2022-03-31 18:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

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.
---
 gdb/testsuite/gdb.server/server-pipe.exp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.server/server-pipe.exp b/gdb/testsuite/gdb.server/server-pipe.exp
index ca2164b03e5..83537378aa6 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}
+    }
 }
-- 
2.25.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: fix timeout in server-pipe.exp test
  2022-03-31 18:46 [PATCH] gdb/testsuite: fix timeout in server-pipe.exp test Andrew Burgess
@ 2022-04-04 16:56 ` Tom Tromey
  2022-04-04 22:23   ` Andrew Burgess
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2022-04-04 16:56 UTC (permalink / raw)
  To: Andrew Burgess via Gdb-patches; +Cc: Andrew Burgess

>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:

Andrew> I noticed that the gdb.server/server-pipe.exp test would sometimes
Andrew> timeout when my machine was more heavily loaded.  Turns out the test
Andrew> is reading all the shared libraries over GDB's remote protocol, which
Andrew> can be slow.

Andrew> We avoid this in other tests by setting the sysroot in GDBFLAGS,
Andrew> something which is missing from the gdb.server/server-pipe.exp test.

Andrew> Fix the timeouts by setting sysroot in GDBFLAGS, after this the shared
Andrew> libraries are no longer copied over the remote protocol, and I no
Andrew> longer see the test timeout.

Seems good to me.  Thank you.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: fix timeout in server-pipe.exp test
  2022-04-04 16:56 ` Tom Tromey
@ 2022-04-04 22:23   ` Andrew Burgess
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2022-04-04 22:23 UTC (permalink / raw)
  To: Tom Tromey, Andrew Burgess via Gdb-patches

Tom Tromey <tom@tromey.com> writes:

>>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Andrew> I noticed that the gdb.server/server-pipe.exp test would sometimes
> Andrew> timeout when my machine was more heavily loaded.  Turns out the test
> Andrew> is reading all the shared libraries over GDB's remote protocol, which
> Andrew> can be slow.
>
> Andrew> We avoid this in other tests by setting the sysroot in GDBFLAGS,
> Andrew> something which is missing from the gdb.server/server-pipe.exp test.
>
> Andrew> Fix the timeouts by setting sysroot in GDBFLAGS, after this the shared
> Andrew> libraries are no longer copied over the remote protocol, and I no
> Andrew> longer see the test timeout.
>
> Seems good to me.  Thank you.

Thanks, pushed.

Andrew


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-04 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 18:46 [PATCH] gdb/testsuite: fix timeout in server-pipe.exp test Andrew Burgess
2022-04-04 16:56 ` Tom Tromey
2022-04-04 22:23   ` Andrew Burgess

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).