public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Add warning for timeout in accept_gdb_output
@ 2023-04-25  6:33 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-04-25  6:33 UTC (permalink / raw)
  To: gdb-cvs

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

commit 0d00a5f9d429c7cbae87b9d1057fb4f9e4ae18c2
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Apr 25 08:33:56 2023 +0200

    [gdb/testsuite] Add warning for timeout in accept_gdb_output
    
    In accept_gdb_output we have:
    ...
                timeout {
                    # Assume a timeout means we somehow missed the
                    # expected result, and carry on.
                    return 0
                }
    ...
    
    The timeout is silent, and though in some places the return value is checked,
    this is not done consistently, and consequently there are silent timeouts
    when running the TUI testsuite (gdb.tui/*.exp and gdb.python/tui*.exp).
    
    Each timeout is 10 seconds, and there are 5 in total in the TUI tests, taking
    50 seconds overall:
    ...
    real    1m0.275s
    user    0m10.440s
    sys     0m1.343s
    ...
    
    With an entire testsuite run taking about 30 minutes, that is about 2.5% of
    the time spent waiting in TUI tests.
    
    Let's make the timeouts visible using a warning, such that they can be fixed.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/lib/tuiterm.exp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 05edfe9a5b1..ff38af082da 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -707,6 +707,8 @@ namespace eval Term {
 	    timeout {
 		# Assume a timeout means we somehow missed the
 		# expected result, and carry on.
+		warning "timeout in accept_gdb_output"
+		dump_screen
 		return 0
 	    }
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-25  6:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25  6:33 [binutils-gdb] [gdb/testsuite] Add warning for timeout in accept_gdb_output Tom de Vries

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