Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Tom de Vries <tdevries@suse.de>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix test failures when TUI is not enabled
Date: Mon, 12 Aug 2024 06:54:18 +0200	[thread overview]
Message-ID: <AS1PR01MB94659DACFF3760A0377327C4E4852@AS1PR01MB9465.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <0b383d4f-9d37-403a-9fc5-cae7e27b1673@suse.de>



On 8/9/24 13:17, Tom de Vries wrote:
> 
> That sounds like you ran into that PR then.
> 
>>> Anyway, adding require allow_tui_tests in those two test-cases looks wrong.
>>>
>>
>> Okay, but what is going on then?
>>
> 
> We can get the same effect using "TERM=dumb gdb".
> 
> It forces readline's horizontal-scroll-mode to activate (unfortunately, without affecting the value of the corresponding variable that we can read with bind -v).
> 
>>> 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.
>>>
>>
>> Well is there a better way to detect the issue without going into this long timeout,
>> or can it be fixed somehow?
>>
> 
> We could accept the string produced by horizontal-scroll-mode and produce an unsupported and bail out.
> 


Hmm...,


--- a/gdb/testsuite/gdb.base/wrap-line.exp
+++ b/gdb/testsuite/gdb.base/wrap-line.exp
@@ -115,6 +115,9 @@ proc test_wrap { width_auto_detected } {
        -re $re {
            pass $gdb_test_name
        }
+       -re "\r<.*" {
+           unsupported $gdb_test_name
+       }
     }
 
     # Generate a prompt.


This works as expected, but I see no way how to do the same
in gdb.tui/wrap-line.exp because the 

... and other than that there is also
FAIL: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: $gdb_width == $readline_width
FAIL: gdb.base/wrap-line.exp: term=xterm: width-auto-detected: $gdb_width == $readline_width

(gdb) PASS: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: set width 80
show editing^M
Editing of command lines as they are typed is on.^M
(gdb) maint info screen^M
Number of characters gdb thinks are in a line is 80.^M
Number of characters readline reports are in a line is 79.^M
Number of characters environment thinks are in a line is 80 (COLUMNS).^M
Number of lines gdb thinks are in a page is 4294967295 (unlimited).^M
Number of lines readline reports are in a page is 32767 (unlimited).^M
Number of lines environment thinks are in a page is 25 (LINES).^M
(gdb) PASS: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: maint info screen
FAIL: gdb.base/wrap-line.exp: term=xterm: width-hard-coded: $gdb_width == $readline_width

I wonder whether that can be used to detect this situation,
when bind -v is not able to it?


Thanks
Bernd.

  reply	other threads:[~2024-08-12  4:54 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
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 [this message]
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=AS1PR01MB94659DACFF3760A0377327C4E4852@AS1PR01MB9465.eurprd01.prod.exchangelabs.com \
    --to=bernd.edlinger@hotmail.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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