From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/4] [gdb/testsuite] Check internal-error in gdb.tui/new-ui.exp
Date: Wed, 21 Oct 2026 10:01:18 +0200 [thread overview]
Message-ID: <20261021080120.349861-3-tdevries@suse.de> (raw)
In-Reply-To: <20261021080120.349861-1-tdevries@suse.de>
Test-case gdb.tui/new-ui.exp has a setup where the main UI is in TUI mode,
and a new UI is in CLI mode.
Check the case that we do "maint internal-error" in the new UI.
We'd expect something like:
...
❌ Command aborted.
(gdb)
...
but instead we get:
...
(gdb) maint internal-error
Cannot enable or disable the TUI when the interpreter is 'console'
(gdb) PASS: $exp: new-ui: maint internal-error
...
For now, just accept this output.
---
gdb/testsuite/gdb.tui/new-ui.exp | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gdb/testsuite/gdb.tui/new-ui.exp b/gdb/testsuite/gdb.tui/new-ui.exp
index fcf66f05f43..3063868334b 100644
--- a/gdb/testsuite/gdb.tui/new-ui.exp
+++ b/gdb/testsuite/gdb.tui/new-ui.exp
@@ -99,3 +99,35 @@ with_test_prefix main-ui {
"Check that UI is responsive"
Term::dump_screen
}
+
+with_test_prefix new-ui {
+ with_spawn_id $new_ui_spawn_id {
+ # Check handling of "maint internal-error" on new-ui while main-ui is
+ # in TUI mode.
+
+ # Don't quit, don't produce a core file.
+ gdb_test_no_output "maint set internal-error corefile no"
+ gdb_test_no_output "maint set internal-error quit no"
+
+ set cmd "maint internal-error"
+ send_gdb "$cmd\n"
+ set re \
+ [multi_line \
+ $re_cannot_enable_disable_tui \
+ "$gdb_prompt $"]
+ gdb_expect {
+ -re $re {
+ pass $cmd
+ }
+ -re "$gdb_prompt $" {
+ fail $cmd
+ }
+ timeout {
+ fail "$cmd (timeout)"
+ }
+ eof {
+ fail "$cmd (eof)"
+ }
+ }
+ }
+}
--
2.51.0
next prev parent reply other threads:[~2026-10-21 8:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 8:01 [PATCH 0/4] [gdb/tui] Fix hang in tui_disable in handle_fatal_signal Tom de Vries
2026-10-21 8:01 ` [PATCH 1/4] [gdb] Add logging_file::fd Tom de Vries
2026-10-21 16:54 ` Tom Tromey
2026-10-23 8:02 ` Tom de Vries
2026-10-23 17:41 ` Tom Tromey
2026-10-23 18:25 ` Tom de Vries
2026-10-21 8:01 ` Tom de Vries [this message]
2026-10-21 8:01 ` [PATCH 3/4] [gdb/tui] Switch to main UI before disabling TUI Tom de Vries
2026-10-21 8:01 ` [PATCH 4/4] [gdb/tui] Fix hang in tui_disable in handle_fatal_signal Tom de Vries
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=20261021080120.349861-3-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