public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Add missing wait in gdb.python/tui-window-disabled.exp
@ 2023-06-07  9:36 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-06-07  9:36 UTC (permalink / raw)
  To: gdb-cvs

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

commit d033023bc4ce9e61fe47172ee451cce2b96cdc98
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Jun 7 11:36:19 2023 +0200

    [gdb/testsuite] Add missing wait in gdb.python/tui-window-disabled.exp
    
    While working on PR tui/30526, I noticed a bug in test-case
    gdb.python/tui-window-disabled.exp.
    
    Here we send "tui enable" to gdb, but don't wait for it to arrive before
    checking for a window box:
    ...
        send_gdb "tui enable\n"
        Term::check_box "check for python window" 0 0 80 16
    ...
    
    Fix this by waiting for the prompt to be issued in TUI before doing the check.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.python/tui-window-disabled.exp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp
index bee58a86caa..fc69b2b16c2 100644
--- a/gdb/testsuite/gdb.python/tui-window-disabled.exp
+++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp
@@ -186,7 +186,10 @@ proc run_test { cleanup_properly } {
 
     Term::command "layout test"
     Term::command "tui disable"
+
     send_gdb "tui enable\n"
+    gdb_assert { [Term::wait_for "^$::gdb_prompt tui disable"] } "TUI renabled"
+
     Term::check_box "check for python window" 0 0 80 16
 }

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

only message in thread, other threads:[~2023-06-07  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07  9:36 [binutils-gdb] [gdb/testsuite] Add missing wait in gdb.python/tui-window-disabled.exp 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).