Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Fix gdb.tui/new-ui.exp on cygwin
Date: Mon, 28 Sep 2026 14:03:20 +0200	[thread overview]
Message-ID: <20260928120320.1780087-1-tdevries@suse.de> (raw)

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


                 reply	other threads:[~2026-09-28 12:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260928120320.1780087-1-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox