Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix test failures when TUI is not enabled
Date: Fri, 9 Aug 2024 11:28:41 +0200	[thread overview]
Message-ID: <1cdc325d-4692-425d-a2cb-52197054c015@suse.de> (raw)
In-Reply-To: <AS1PR01MB9465A0E9D2A805F010AF01CAE4BA2@AS1PR01MB9465.eurprd01.prod.exchangelabs.com>

On 8/9/24 10:47, Bernd Edlinger wrote:
> This adds some missing require allow_tui_tests.
> 
> When tui is not enabled those test cases do typically
> fail, but most of them only after a long time-out:
> 
> FAIL: gdb.base/new-ui.exp: do_test_invalid_args: new-ui with tui
> FAIL: gdb.base/wrap-line.exp: term=ansi: width-hard-coded: wrap (timeout)
> FAIL: gdb.base/wrap-line.exp: term=ansi: width-auto-detected: wrap (timeout)
> FAIL: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: $gdb_width == $readline_width
> FAIL: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: wrap (timeout)
> FAIL: gdb.base/wrap-line.exp: term=xterm: width-auto-detected: $gdb_width == $readline_width
> FAIL: gdb.base/wrap-line.exp: term=xterm: width-auto-detected: wrap (timeout)
> FAIL: gdb.tui/wrap-line.exp: width-hard-coded: cli: wrap
> FAIL: gdb.tui/wrap-line.exp: width-hard-coded: cli: prompt after wrap
> FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: wrap
> FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
> ---

Hi,

I disabled tui support using --disable-tui, and can't reproduce the 
wrap-line fails you see.

Is it possible that you're running into "[gdb/testsuite, stub-termcap] 
FAIL: gdb.base/wrap-line.exp: term=ansi: width-hard-coded: wrap 
(timeout)" @ https://sourceware.org/bugzilla/show_bug.cgi?id=31201 ?

Anyway, adding require allow_tui_tests in those two test-cases looks wrong.

In the case of gdb.tui/wrap-line.exp, there is already a test that bails
out if TUI is unsupported, but still allows testing of things that 
should work regardless.

In the case of gdb.base/wrap-line.exp, it's a test-case I added 
specifically to test the behaviour of prompt wrapping in the CLI, not in 
TUI, so requiring allow_tui_tests there is non-sensical.

The change in gdb.base/new-ui.exp LGTM.  You could submit a v2 with just 
that change.

Thanks,
- Tom

>   gdb/testsuite/gdb.base/new-ui.exp    | 8 +++++---
>   gdb/testsuite/gdb.base/wrap-line.exp | 1 +
>   gdb/testsuite/gdb.tui/wrap-line.exp  | 1 +
>   3 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.base/new-ui.exp b/gdb/testsuite/gdb.base/new-ui.exp
> index 2dfcbf7e108..a56d213e527 100644
> --- a/gdb/testsuite/gdb.base/new-ui.exp
> +++ b/gdb/testsuite/gdb.base/new-ui.exp
> @@ -184,9 +184,11 @@ proc_with_prefix do_test_invalid_args {} {
>   	     "new-ui with bad interpreter name"
>   
>       # Test that the TUI cannot be used for a new UI.
> -    gdb_test "new-ui tui $extra_tty_name" \
> -	"interpreter 'tui' cannot be used with a new UI" \
> -	"new-ui with tui"
> +    if [allow_tui_tests] {
> +	gdb_test "new-ui tui $extra_tty_name" \
> +	    "interpreter 'tui' cannot be used with a new UI" \
> +	    "new-ui with tui"
> +    }
>   
>       # Test that we can continue working normally.
>       if ![runto_main] {
> diff --git a/gdb/testsuite/gdb.base/wrap-line.exp b/gdb/testsuite/gdb.base/wrap-line.exp
> index b0931a3bbb8..1a1b47410ee 100644
> --- a/gdb/testsuite/gdb.base/wrap-line.exp
> +++ b/gdb/testsuite/gdb.base/wrap-line.exp
> @@ -18,6 +18,7 @@
>   # We set TERM on build, but we need to set it on host.  That only works if
>   # build == host.
>   require {!is_remote host}
> +require allow_tui_tests
>   
>   # Test both ansi (no auto-wrap) and xterm (auto-wrap).
>   set terms {ansi xterm}
> diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp
> index 9cddcf14995..48a04ebc330 100644
> --- a/gdb/testsuite/gdb.tui/wrap-line.exp
> +++ b/gdb/testsuite/gdb.tui/wrap-line.exp
> @@ -17,6 +17,7 @@
>   
>   # Required for tuiterm.
>   require {!is_remote host}
> +require allow_tui_tests
>   
>   tuiterm_env
>   


  reply	other threads:[~2024-08-09  9:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  8:47 Bernd Edlinger
2024-08-09  9:28 ` Tom de Vries [this message]
2024-08-09  9:48   ` Bernd Edlinger
2024-08-09 11:11     ` Bernd Edlinger
2024-08-09 11:17     ` Tom de Vries
2024-08-12  4:54       ` Bernd Edlinger
2024-08-12  9:43         ` [PATCH] Fix test failures when tui " Bernd Edlinger

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=1cdc325d-4692-425d-a2cb-52197054c015@suse.de \
    --to=tdevries@suse.de \
    --cc=bernd.edlinger@hotmail.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