public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests
@ 2023-03-13 16:20 Tom de Vries
  2023-03-13 16:20 ` [pushed 1/8] [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp Tom de Vries
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

I ran the gdb.tui/*.exp and gdb.pyton/tui-*.exp test-cases with various
host/target boards from gdb/testsuite/boards and fixed issues, most of which
had to do with remote host testing.

Results after the fixes:
...
 $ ./test-all.sh
 HOST/TARGET: local
 # of expected passes            724
 HOST: local, TARGET: native-gdbserver
 # of expected passes            709
 # of unsupported tests          2
 HOST: local, TARGET: native-extended-gdbserver
 # of expected passes            717
 # of unsupported tests          1
 HOST: local, TARGET: native-stdio-gdbserver
 # of expected passes            709
 # of unsupported tests          2
 HOST: local, TARGET: remote-gdbserver-on-localhost
 # of expected passes            709
 # of unsupported tests          2
 HOST: local, TARGET: remote-stdio-gdbserver
 # of expected passes            709
 # of unsupported tests          2
 HOST: local, TARGET: remote-stdio-gdbserver-remotedir
 # of expected passes            709
 # of unsupported tests          2
 HOST: local-remote-host-notty, TARGET: native-gdbserver
 # of expected passes            336
 # of unsupported tests          33
 HOST: local-remote-host-notty, TARGET: native-extended-gdbserver
 # of expected passes            337
 # of unsupported tests          33
 HOST: local-remote-host-notty, TARGET: native-stdio-gdbserver
 # of expected passes            336
 # of unsupported tests          33
 HOST: local-remote-host-notty, TARGET: remote-gdbserver-on-localhost
 # of expected passes            336
 # of unsupported tests          33
 HOST: local-remote-host-notty, TARGET: remote-stdio-gdbserver
 # of expected passes            336
 # of unsupported tests          33
 HOST: local-remote-host-notty, TARGET: remote-stdio-gdbserver-remotedir
 # of expected passes            336
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: native-gdbserver
 # of expected passes            340
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: native-extended-gdbserver
 # of expected passes            341
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: native-stdio-gdbserver
 # of expected passes            340
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: remote-gdbserver-on-localhost
 # of expected passes            340
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: remote-stdio-gdbserver
 # of expected passes            340
 # of unsupported tests          33
 HOST: local-remote-host, TARGET: remote-stdio-gdbserver-remotedir
 # of expected passes            340
 # of unsupported tests          33
 HOST/TARGET: local-remote-host-native
 # of expected passes            333
 # of unsupported tests          31
 # of untested testcases         1
...

Tested on x86_64-linux.

Tom de Vries (8):
  [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp
  [gdb/testsuite] Handle USE_TUI in gdb.tui/corefile-run.exp
  [gdb/testsuite] Require ![is_remote host] for TUI
  [gdb/testsuite] Fix gdb.tui/tui-nl-filtered-output.exp for remote host
  [gdb/testsuite] Fix gdb.tui/tui-layout.exp for remote host
  [gdb/testsuite] Fix gdb.tui/completion.exp for local-remote-host-notty
  [gdb/testsuite] Fix gdb.python/tui-window.exp for remote host
  [gdb/testsuite] Fix gdb.python/tui-window-factory.exp for remote host

 .../gdb.python/tui-window-factory.exp         |  5 +++-
 gdb/testsuite/gdb.python/tui-window.exp       |  1 +
 gdb/testsuite/gdb.tui/completion.exp          | 13 ++++++----
 gdb/testsuite/gdb.tui/corefile-run.exp        | 24 ++++++++++++-------
 gdb/testsuite/gdb.tui/tui-layout.exp          |  4 ++++
 .../gdb.tui/tui-nl-filtered-output.exp        |  5 +++-
 gdb/testsuite/lib/gdb.exp                     | 22 ++++++++++++++++-
 gdb/testsuite/lib/tuiterm.exp                 |  8 +++++++
 8 files changed, 66 insertions(+), 16 deletions(-)


base-commit: 275589d9a0fda6fe898aae678588bb3841d3fed1
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 1/8] [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 2/8] [gdb/testsuite] Handle USE_TUI " Tom de Vries
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

In test-case gdb.tui/corefile-run.exp, we have this bit:
...
require !use_gdb_stub
if { [target_info gdb_protocol] == "extended-remote" } {
    untested "not supported"
    return
}
...

So with target board native-gdbserver we get:
...
UNSUPPORTED: gdb.tui/corefile-run.exp: require failed: !use_gdb_stub
...
and with target board native-extended-gdbserver instead:
...
UNTESTED: gdb.tui/corefile-run.exp: not supported
...

Fix this by:
- adding an optional argument target_description to proc
  target_can_use_run_cmd
- handling the target_description == core &&
  [target_info gdb_protocol] == "extended-remote" case in the proc
- using require {target_can_use_run_cmd core}
such that now in both cases we have:
...
UNSUPPORTED: gdb.tui/corefile-run.exp: require failed: \
  target_can_use_run_cmd core
...

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/corefile-run.exp |  6 +-----
 gdb/testsuite/lib/gdb.exp              | 22 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp
index 02606ee286d..2109a0ae3eb 100644
--- a/gdb/testsuite/gdb.tui/corefile-run.exp
+++ b/gdb/testsuite/gdb.tui/corefile-run.exp
@@ -29,11 +29,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
 }
 
 # Only run on native boards.
-require !use_gdb_stub
-if { [target_info gdb_protocol] == "extended-remote" } {
-    untested "not supported"
-    return
-}
+require {target_can_use_run_cmd core}
 
 if { ![runto_main] } {
     return -1
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e2b08c64eae..23277c4ab79 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -385,13 +385,33 @@ proc delete_breakpoints {} {
 
 # Returns true iff the target supports using the "run" command.
 
-proc target_can_use_run_cmd {} {
+proc target_can_use_run_cmd { {target_description ""} } {
+    if { $target_description == "" } {
+	set have_core 0
+    } elseif { $target_description == "core" } {
+	# We could try to figure this out by issuing an "info target" and
+	# checking for "Local core dump file:", but it would mean the proc
+	# would start requiring a current target. Also, uses while gdb
+	# produces non-standard output due to, say annotations would
+	# have to be moved around or eliminated, which would further limit
+	# usability.
+	set have_core 1
+    } else {
+	error "invalid argument: $target_description"
+    }
+
     if [target_info exists use_gdb_stub] {
 	# In this case, when we connect, the inferior is already
 	# running.
 	return 0
     }
 
+    if { $have_core && [target_info gdb_protocol] == "extended-remote" } {
+	# In this case, when we connect, the inferior is not running but
+	# cannot be made to run.
+	return 0
+    }
+
     # Assume yes.
     return 1
 }
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 2/8] [gdb/testsuite] Handle USE_TUI in gdb.tui/corefile-run.exp
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
  2023-03-13 16:20 ` [pushed 1/8] [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 3/8] [gdb/testsuite] Require ![is_remote host] for TUI Tom de Vries
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

Once in a while I find myself rewriting a TUI test-case into a non-TUI
test-case, to better understand whether the problem I'm looking at is
related to the TUI or not.

I've got the impression that I've done this sufficiently often that it's worth
committing the non-TUI version, so having just written a non-TUI version of
gdb.tui/corefile-run.exp, let's commit it.

The non-TUI version can be enabled by doing:
...
$ make check "RUNTESTFLAGS=gdb.tui/corefile-run.exp USE_TUI=0"
...

Also remove hard-coding of a source line number.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/corefile-run.exp | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp
index 2109a0ae3eb..6769dfbd800 100644
--- a/gdb/testsuite/gdb.tui/corefile-run.exp
+++ b/gdb/testsuite/gdb.tui/corefile-run.exp
@@ -40,6 +40,19 @@ if { ![gdb_gcore_cmd "$core" "save a corefile"] } {
     return -1
 }
 
+set src_line "return 0;"
+set src_line_nr [gdb_get_line_number $src_line]
+
+set run_re \
+    "\\\[Inferior $decimal \\\(process $decimal\\\) exited normally\\]"
+
+if { [info exists USE_TUI] && $USE_TUI == 0 } {
+    clean_restart $testfile
+    gdb_test "core-file $core" $src_line "load corefile"
+    gdb_test "run" $run_re "run until the end"
+    return
+}
+
 Term::clean_restart 24 80 $testfile
 if {![Term::enter_tui]} {
     unsupported "TUI not supported"
@@ -51,8 +64,7 @@ gdb_assert {![string match "No Source Available" $text]} \
     "initial source listing"
 
 Term::command "core-file $core"
-Term::check_contents "load corefile" "21 *return 0.*$gdb_prompt .*"
+Term::check_contents "load corefile" "$src_line_nr *$src_line.*$gdb_prompt .*"
 
 Term::command "run"
-Term::check_contents "run until the end" \
-    "\\\[Inferior $decimal \\\(process $decimal\\\) exited normally\\]"
+Term::check_contents "run until the end" $run_re
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 3/8] [gdb/testsuite] Require ![is_remote host] for TUI
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
  2023-03-13 16:20 ` [pushed 1/8] [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp Tom de Vries
  2023-03-13 16:20 ` [pushed 2/8] [gdb/testsuite] Handle USE_TUI " Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 4/8] [gdb/testsuite] Fix gdb.tui/tui-nl-filtered-output.exp for remote host Tom de Vries
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.tui/corefile-run.exp with both host and target board
local-remote-host-native.exp, we run into:
...
FAIL: gdb.tui/corefile-run.exp: load corefile
...
while this passes with USE_TUI=0.

The problem is that the TUI setup code uses "setenv TERM ansi", which has no
effect on remote host.

I can confirm this analysis by working around this problem in
local-remote-host-native.exp like this:
...
-    spawn $RSH -t -l $username $remote $cmd
+    spawn $RSH -t -l $username $remote "export TERM=ansi; $cmd"
...

For now, simply make TUI unsupported for remote host, by returning 0 in
prepare_for_tui.

Tested on x86_64-linux.
---
 gdb/testsuite/lib/tuiterm.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 8a3f7a48acc..05edfe9a5b1 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -792,6 +792,14 @@ namespace eval Term {
     # Setup ready for starting the tui, but don't actually start it.
     # Returns 1 on success, 0 if TUI tests should be skipped.
     proc prepare_for_tui {} {
+	if { [is_remote host] } {
+	    # In clean_restart, we're using "setenv TERM ansi", which has
+	    # effect on build.  If we have [is_remote host] == 0, so
+	    # build == host, then it also has effect on host.  But for
+	    # [is_remote host] == 1, it has no effect on host.
+	    return 0
+	}
+
 	if {![allow_tui_tests]} {
 	    return 0
 	}
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 4/8] [gdb/testsuite] Fix gdb.tui/tui-nl-filtered-output.exp for remote host
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
                   ` (2 preceding siblings ...)
  2023-03-13 16:20 ` [pushed 3/8] [gdb/testsuite] Require ![is_remote host] for TUI Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 5/8] [gdb/testsuite] Fix gdb.tui/tui-layout.exp " Tom de Vries
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.tui/tui-nl-filtered-output.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
FAIL: gdb.tui/tui-nl-filtered-output.exp: check printf output
...

The problem is that Term::enter_tui is returning 0, but the test-case doesn't
check for this, and consequently runs unsupported tests.

Fix this by adding the missing check.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
index 5b1d6b7d9ba..8f85ae7ce49 100644
--- a/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
+++ b/gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp
@@ -36,7 +36,10 @@ tuiterm_env
 
 # Setup and enter TUI mode.
 Term::clean_restart 24 80
-Term::enter_tui
+if {![Term::enter_tui]} {
+    unsupported "TUI not supported"
+    return
+}
 
 # Send the command, and check the output is correctly split over
 # multiple lines.
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 5/8] [gdb/testsuite] Fix gdb.tui/tui-layout.exp for remote host
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
                   ` (3 preceding siblings ...)
  2023-03-13 16:20 ` [pushed 4/8] [gdb/testsuite] Fix gdb.tui/tui-nl-filtered-output.exp for remote host Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 6/8] [gdb/testsuite] Fix gdb.tui/completion.exp for local-remote-host-notty Tom de Vries
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.tui/tui-layout.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
FAIL: gdb.tui/tui-layout.exp: terminal=dumb: execution=false: layout=asm: \
  layout asm (timeout)
...

The problem is that the test-case expects that the default "setenv TERM dumb"
has effect, which is not the case for remote host.

Fix this by skipping the test for remote host.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/tui-layout.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/gdb.tui/tui-layout.exp b/gdb/testsuite/gdb.tui/tui-layout.exp
index c7fdb1b0c0a..13823387e72 100644
--- a/gdb/testsuite/gdb.tui/tui-layout.exp
+++ b/gdb/testsuite/gdb.tui/tui-layout.exp
@@ -61,6 +61,10 @@ proc test_layout_or_focus {layout_name terminal execution} {
     }
 
     if {$dumb_terminal} {
+	if { [is_remote host] } {
+	    # setenv TERM dummy has no effect on remote host.
+	    return
+	}
 	gdb_test "layout $layout_name" \
 	    "Cannot enable the TUI: terminal doesn't support cursor addressing \\\[TERM=dumb\\\]"
     } else {
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 6/8] [gdb/testsuite] Fix gdb.tui/completion.exp for local-remote-host-notty
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
                   ` (4 preceding siblings ...)
  2023-03-13 16:20 ` [pushed 5/8] [gdb/testsuite] Fix gdb.tui/tui-layout.exp " Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 7/8] [gdb/testsuite] Fix gdb.python/tui-window.exp for remote host Tom de Vries
  2023-03-13 16:20 ` [pushed 8/8] [gdb/testsuite] Fix gdb.python/tui-window-factory.exp " Tom de Vries
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running test-case gdb.tui/completion.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
FAIL: gdb.tui/completion.exp: completion of layout names: \
  tab completion (timeout)
...

The test-case contains a few tests that do tab completion, which requires
readline, which is unavailable with host board local-remote-host-notty.

Fix this by adding the missing check for readline_is_used.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.tui/completion.exp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp
index 0a959b4ff8b..85abd4a958b 100644
--- a/gdb/testsuite/gdb.tui/completion.exp
+++ b/gdb/testsuite/gdb.tui/completion.exp
@@ -48,12 +48,15 @@ proc test_tab_completion {input_line expected_re} {
     }
 }
 
-with_test_prefix "completion of layout names" {
-    test_tab_completion "layout" "asm *next *prev *regs *split *src *"
-}
+if { [readline_is_used] } {
+    with_test_prefix "completion of layout names" {
+	test_tab_completion "layout" "asm *next *prev *regs *split *src *"
+    }
 
-with_test_prefix "completion of focus command" {
-    test_tab_completion "focus" "cmd *next *prev *src *"
+
+    with_test_prefix "completion of focus command" {
+	test_tab_completion "focus" "cmd *next *prev *src *"
+    }
 }
 
 # Now run some completion tests when TUI mode is enabled.
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 7/8] [gdb/testsuite] Fix gdb.python/tui-window.exp for remote host
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
                   ` (5 preceding siblings ...)
  2023-03-13 16:20 ` [pushed 6/8] [gdb/testsuite] Fix gdb.tui/completion.exp for local-remote-host-notty Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  2023-03-13 16:20 ` [pushed 8/8] [gdb/testsuite] Fix gdb.python/tui-window-factory.exp " Tom de Vries
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running gdb.python/tui-window.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
UNSUPPORTED: gdb.python/tui-window.exp: TUI not supported
FAIL: gdb.python/tui-window.exp: test title
...

Fix this by adding the missing return after the unsupported.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.python/tui-window.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp
index af2a866e78b..9b5d17c35d4 100644
--- a/gdb/testsuite/gdb.python/tui-window.exp
+++ b/gdb/testsuite/gdb.python/tui-window.exp
@@ -40,6 +40,7 @@ gdb_test_no_output "tui new-layout fail fail 1 status 0 cmd 1"
 
 if {![Term::enter_tui]} {
     unsupported "TUI not supported"
+    return
 }
 
 Term::command "layout test"
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [pushed 8/8] [gdb/testsuite] Fix gdb.python/tui-window-factory.exp for remote host
  2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
                   ` (6 preceding siblings ...)
  2023-03-13 16:20 ` [pushed 7/8] [gdb/testsuite] Fix gdb.python/tui-window.exp for remote host Tom de Vries
@ 2023-03-13 16:20 ` Tom de Vries
  7 siblings, 0 replies; 9+ messages in thread
From: Tom de Vries @ 2023-03-13 16:20 UTC (permalink / raw)
  To: gdb-patches

When running gdb.python/tui-window.exp with host board
local-remote-host-notty and target board native-gdbserver, I get:
...
FAIL: gdb.python/tui-window-factory.exp: msg_2: \
  check test_window box (box check: ul corner is l, not +)
...

The problem is that the result of Term::prepare_for_tui is not checked.

Fix this by adding the missing check.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.python/tui-window-factory.exp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.python/tui-window-factory.exp b/gdb/testsuite/gdb.python/tui-window-factory.exp
index 3e898d01c7b..e3b403bdea0 100644
--- a/gdb/testsuite/gdb.python/tui-window-factory.exp
+++ b/gdb/testsuite/gdb.python/tui-window-factory.exp
@@ -32,7 +32,10 @@ set pyfile [gdb_remote_download host \
 		${srcdir}/${subdir}/${gdb_test_file_name}.py]
 
 Term::clean_restart 24 80
-Term::prepare_for_tui
+if { ![Term::prepare_for_tui] } {
+    unsupported "TUI not supported"
+    return
+}
 
 gdb_test "source ${pyfile}" "Python script imported" \
     "import python scripts"
-- 
2.35.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-13 16:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 16:20 [pushed 0/8] [gdb/testsuite] Fix remote host issues in TUI tests Tom de Vries
2023-03-13 16:20 ` [pushed 1/8] [gdb/testsuite] Fix untested message in gdb.tui/corefile-run.exp Tom de Vries
2023-03-13 16:20 ` [pushed 2/8] [gdb/testsuite] Handle USE_TUI " Tom de Vries
2023-03-13 16:20 ` [pushed 3/8] [gdb/testsuite] Require ![is_remote host] for TUI Tom de Vries
2023-03-13 16:20 ` [pushed 4/8] [gdb/testsuite] Fix gdb.tui/tui-nl-filtered-output.exp for remote host Tom de Vries
2023-03-13 16:20 ` [pushed 5/8] [gdb/testsuite] Fix gdb.tui/tui-layout.exp " Tom de Vries
2023-03-13 16:20 ` [pushed 6/8] [gdb/testsuite] Fix gdb.tui/completion.exp for local-remote-host-notty Tom de Vries
2023-03-13 16:20 ` [pushed 7/8] [gdb/testsuite] Fix gdb.python/tui-window.exp for remote host Tom de Vries
2023-03-13 16:20 ` [pushed 8/8] [gdb/testsuite] Fix gdb.python/tui-window-factory.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).