This is the mail archive of the gdb-cvs@sourceware.org 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]

[binutils-gdb] Increase timeout in gdb.mi/list-thread-groups-available.exp


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=580f1034d10934b757703110db068397c0c1e7bb

commit 580f1034d10934b757703110db068397c0c1e7bb
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Mon Aug 5 10:21:22 2019 -0400

    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 when running under
    	check-read1.

Diff:
---
 gdb/testsuite/ChangeLog                               |  7 +++++++
 gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 13 +++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 00b8a14..236c0e2 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-05  Simon Marchi  <simon.marchi@efficios.com>
+
+	PR gdb/24863
+	* gdb.mi/list-thread-groups-available.exp: Increase timeout for
+	-list-thread-groups --available test when running under
+	check-read1.
+
 2019-08-05  Tom de Vries  <tdevries@suse.de>
 
 	PR testsuite/24863
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index 792c3ba..ab5c716 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_read1_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]


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