* [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp
@ 2019-08-01 14:39 Simon Marchi
2019-08-01 18:18 ` Tom Tromey
2019-08-15 17:58 ` Pedro Alves
0 siblings, 2 replies; 9+ messages in thread
From: Simon Marchi @ 2019-08-01 14:39 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom de Vries, Simon Marchi
Running
make check-read1 TESTS="gdb.mi/list-thread-groups-available.exp"
on my machine results in timeout failures. Running it while having
`tail -F testsuite/gdb.log` on the side shows that the test is never
really blocked, it is just slow at consuming the large output generated
by `-list-thread-groups --available` (which lists all the processes on
the system).
If I increase the timeout to a large value, the test passes in ~30
seconds (compared to under 1 second normally).
Increase the timeout for the particular mi_gdb_test that is long to
execute under read1. The new timeout value is a bit arbitrary. The
default timeout is 10 seconds, so I set the new timeout to be
"old-timeout * 10", so 100 seconds in the typical case.
gdb/testsuite/ChangeLog:
PR gdb/24863
* gdb.mi/list-thread-groups-available.exp: Increase timeout for
-list-thread-groups --available test.
---
.../gdb.mi/list-thread-groups-available.exp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 792c3bac8962..c8486ce1f3d1 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -54,10 +54,18 @@ set cores_re "cores=\\\[(\"$decimal\"(,\"$decimal\")*)?\\\]"
# List all available processes.
set process_entry_re "{${id_re},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}"
-mi_gdb_test \
- "-list-thread-groups --available" \
- "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \
- "list available thread groups"
+save_vars { timeout } {
+ # Increase the timeout: when running with `make check-read1`, this can take
+ # a bit of time, as there is a lot of output generated, hence a lot of read
+ # syscalls.
+ set timeout [expr $timeout * 10]
+
+ mi_gdb_test \
+ "-list-thread-groups --available" \
+ "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \
+ "list available thread groups"
+}
+
# List specific processes, make sure there are two entries.
set spawn_id_1 [remote_spawn target $binfile]
--
2.22.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp
2019-08-01 14:39 [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp Simon Marchi
@ 2019-08-01 18:18 ` Tom Tromey
2019-08-01 19:16 ` Simon Marchi
2019-08-15 17:58 ` Pedro Alves
1 sibling, 1 reply; 9+ messages in thread
From: Tom Tromey @ 2019-08-01 18:18 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches, Tom de Vries
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> PR gdb/24863
Simon> * gdb.mi/list-thread-groups-available.exp: Increase timeout for
Simon> -list-thread-groups --available test.
Simon> +save_vars { timeout } {
Simon> + # Increase the timeout: when running with `make check-read1`, this can take
Simon> + # a bit of time, as there is a lot of output generated, hence a lot of read
Simon> + # syscalls.
Simon> + set timeout [expr $timeout * 10]
Maybe this should use with_timeout_factor.
Tom
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp
2019-08-01 18:18 ` Tom Tromey
@ 2019-08-01 19:16 ` Simon Marchi
[not found] ` <cba4616c-4e3c-4217-7c7a-40fb576ea351@suse.de>
0 siblings, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2019-08-01 19:16 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, Tom de Vries
On 2019-08-01 2:18 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> PR gdb/24863
> Simon> * gdb.mi/list-thread-groups-available.exp: Increase timeout for
> Simon> -list-thread-groups --available test.
>
> Simon> +save_vars { timeout } {
> Simon> + # Increase the timeout: when running with `make check-read1`, this can take
> Simon> + # a bit of time, as there is a lot of output generated, hence a lot of read
> Simon> + # syscalls.
> Simon> + set timeout [expr $timeout * 10]
>
> Maybe this should use with_timeout_factor.
Ah, totally, I forgot about its existence. Here's a version using that.
From d55b3eb5acd69b87495c9eeb57f96e4228911dbc Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Thu, 1 Aug 2019 10:28:52 -0400
Subject: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp
Running
make check-read1 TESTS="gdb.mi/list-thread-groups-available.exp"
on my machine results in timeout failures. Running it while having
`tail -F testsuite/gdb.log` on the side shows that the test is never
really blocked, it is just slow at consuming the large output generated
by `-list-thread-groups --available` (which lists all the processes on
the system).
If I increase the timeout to a large value, the test passes in ~30
seconds (compared to under 1 second normally).
Increase the timeout for the particular mi_gdb_test that is long to
execute under read1. The new timeout value is a bit arbitrary. The
default timeout is 10 seconds, so I set the new timeout to be
"old-timeout * 10", so 100 seconds in the typical case.
gdb/testsuite/ChangeLog:
PR gdb/24863
* gdb.mi/list-thread-groups-available.exp: Increase timeout for
-list-thread-groups --available test.
---
.../gdb.mi/list-thread-groups-available.exp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 792c3bac8962..2fbf282c661e 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -54,10 +54,15 @@ set cores_re "cores=\\\[(\"$decimal\"(,\"$decimal\")*)?\\\]"
# List all available processes.
set process_entry_re "{${id_re},${type_re}(,$description_re)?(,$user_re)?(,$cores_re)?}"
-mi_gdb_test \
- "-list-thread-groups --available" \
- "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \
- "list available thread groups"
+# Increase the timeout: when running with `make check-read1`, this can take
+# a bit of time, as there is a lot of output generated, hence a lot of read
+# syscalls.
+with_timeout_factor 10 {
+ mi_gdb_test \
+ "-list-thread-groups --available" \
+ "\\^done,groups=\\\[${process_entry_re}(,$process_entry_re)*\\\]" \
+ "list available thread groups"
+}
# List specific processes, make sure there are two entries.
set spawn_id_1 [remote_spawn target $binfile]
--
2.22.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp
2019-08-01 14:39 [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp Simon Marchi
2019-08-01 18:18 ` Tom Tromey
@ 2019-08-15 17:58 ` Pedro Alves
1 sibling, 0 replies; 9+ messages in thread
From: Pedro Alves @ 2019-08-15 17:58 UTC (permalink / raw)
To: Simon Marchi, gdb-patches; +Cc: Tom de Vries
On 8/1/19 3:38 PM, Simon Marchi wrote:
> Running
>
> make check-read1 TESTS="gdb.mi/list-thread-groups-available.exp"
>
> on my machine results in timeout failures. Running it while having
> `tail -F testsuite/gdb.log` on the side shows that the test is never
> really blocked, it is just slow at consuming the large output generated
> by `-list-thread-groups --available` (which lists all the processes on
> the system).
>
> If I increase the timeout to a large value, the test passes in ~30
> seconds (compared to under 1 second normally).
>
> Increase the timeout for the particular mi_gdb_test that is long to
> execute under read1. The new timeout value is a bit arbitrary. The
> default timeout is 10 seconds, so I set the new timeout to be
> "old-timeout * 10", so 100 seconds in the typical case.
>
> gdb/testsuite/ChangeLog:
>
> PR gdb/24863
> * gdb.mi/list-thread-groups-available.exp: Increase timeout for
> -list-thread-groups --available test.
A better approach to fix this is match a line at a time using gdb_test_multiple
and exp_continue.
-re "$process_entry_re" {
exp_continue
}
No need to bump the timeout that way, since by default exp_continue resets
the timeout timer.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-08-15 17:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 14:39 [PATCH] Increase timeout in gdb.mi/list-thread-groups-available.exp Simon Marchi
2019-08-01 18:18 ` Tom Tromey
2019-08-01 19:16 ` Simon Marchi
[not found] ` <cba4616c-4e3c-4217-7c7a-40fb576ea351@suse.de>
2019-08-02 13:43 ` Tom Tromey
2019-08-02 14:46 ` Simon Marchi
2019-08-05 13:58 ` Tom de Vries
2019-08-05 14:23 ` Simon Marchi
2019-08-05 13:53 ` Tom de Vries
2019-08-15 17:58 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox