Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix gdb.tui/new-ui.exp on cygwin
@ 2026-09-28 12:03 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-09-28 12:03 UTC (permalink / raw)
  To: gdb-patches

On cygwin, with test-case gdb.tui/new-ui.exp I run into:
...
(gdb) tui enable
(gdb) FAIL: $exp: new-ui: tui enable
...

The test-case sets up an additional UI.  After setup, the initial prompt needs
to be consumed, and that part is missing, causing things to get out of sync
afterwards.

Fix this by copying the missing part from gdb.base/new-ui.exp, getting us:
...
(gdb) tui enable
Cannot enable or disable the TUI when the interpreter is 'console'
(gdb) PASS: $exp: new-ui: tui enable
...

Tested on x86_64-linux and x86_64-cygwin.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34677
---
 gdb/testsuite/gdb.tui/new-ui.exp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gdb/testsuite/gdb.tui/new-ui.exp b/gdb/testsuite/gdb.tui/new-ui.exp
index e6c6409e233..fcf66f05f43 100644
--- a/gdb/testsuite/gdb.tui/new-ui.exp
+++ b/gdb/testsuite/gdb.tui/new-ui.exp
@@ -48,6 +48,12 @@ with_test_prefix main-ui {
 
 with_test_prefix new-ui {
     with_spawn_id $new_ui_spawn_id {
+	gdb_test_multiple "" "initial prompt on new ui" {
+	    -re "$gdb_prompt $" {
+		pass $gdb_test_name
+	    }
+	}
+
 	# Check that we cannot enable TUI in the new UI.
 	gdb_test "tui enable" $re_cannot_enable_disable_tui
     }

base-commit: 73f152f71e10498dcd9b6cca700865c7d198ff80
-- 
2.51.0


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

only message in thread, other threads:[~2026-09-28 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 12:03 [pushed] [gdb/testsuite] Fix gdb.tui/new-ui.exp on cygwin 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