From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH] [gdb/testsuite] Fix gdb.tui/wrap-line.exp
Date: Wed, 21 Jun 2023 16:19:03 +0200 [thread overview]
Message-ID: <276da7ff-41c5-9f33-82e1-338f9e17ee21@suse.de> (raw)
In-Reply-To: <87ilc74esx.fsf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
On 6/1/23 13:12, Andrew Burgess via Gdb-patches wrote:
> Reported this issue on the readline list:
>
> https://lists.gnu.org/archive/html/bug-readline/2023-06/msg00000.html
I've updated the patch to mention this issue, and committed.
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-testsuite-Fix-gdb.tui-wrap-line.exp.patch --]
[-- Type: text/x-patch, Size: 2603 bytes --]
From e80061d934f25a0bb97aa4ec2f9ec35a9437d865 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Thu, 18 May 2023 07:58:20 +0200
Subject: [pushed] [gdb/testsuite] Fix gdb.tui/wrap-line.exp
PR testsuite/30458 reports the following FAIL:
...
PASS: gdb.tui/wrap-line.exp: width-auto-detected: cli: wrap
^CQuit
(gdb) WARNING: timeout in accept_gdb_output
Screen Dump (size 50 columns x 24 rows, cursor at column 6, row 3):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2 W^CQuit
3 (gdb)
...
FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
...
The problem is that the regexp doesn't account for the ^C:
...
gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap"
...
The ^C occurs occasionally. This is something we'd like to fix. It's
reported as a readline problem here (
https://lists.gnu.org/archive/html/bug-readline/2023-06/msg00000.html ).
For now, fix this by updating the regexp, and likewise in another place in the
test-case where we use ^C.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30458
---
gdb/testsuite/gdb.tui/wrap-line.exp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp
index 2f0e4a5e795..1aac6fa69f6 100644
--- a/gdb/testsuite/gdb.tui/wrap-line.exp
+++ b/gdb/testsuite/gdb.tui/wrap-line.exp
@@ -25,6 +25,12 @@ set cols 50
set lines 24
set dims [list $lines $cols]
+# Sometimes we see ^C. This is something we'd like to fix. It's reported as
+# a readline problem here (
+# https://lists.gnu.org/archive/html/bug-readline/2023-06/msg00000.html ).
+# For now, ignore it.
+set re_control_c "(\\^C)?Quit"
+
# Fill line, assuming we start after the gdb prompt.
proc fill_line { width } {
set res ""
@@ -47,7 +53,7 @@ proc fill_line { width } {
proc test_wrap { wrap_width } {
# Generate a prompt and parse it.
send_gdb "\003"
- gdb_assert { [Term::wait_for "(^|$::gdb_prompt )Quit"] } "start line"
+ gdb_assert { [Term::wait_for "(^|$::gdb_prompt )$::re_control_c"] } "start line"
# Fill the line to just before wrapping.
set str [fill_line $wrap_width]
@@ -64,7 +70,7 @@ proc test_wrap { wrap_width } {
# Generate a prompt and parse it.
send_gdb "\003"
- gdb_assert { [Term::wait_for "^WQuit"] } "prompt after wrap"
+ gdb_assert { [Term::wait_for "^W$::re_control_c"] } "prompt after wrap"
}
# Test wrapping in both CLI and TUI.
base-commit: 9f889c4856f38db1eade7efa2d12eb7994f2c55e
--
2.35.3
next prev parent reply other threads:[~2023-06-21 14:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 6:10 Tom de Vries
2023-05-19 10:12 ` Bruno Larsen
2023-05-21 8:51 ` Andrew Burgess
2023-05-21 9:00 ` Andreas Schwab
2023-05-23 9:34 ` Andrew Burgess
2023-05-21 16:48 ` Tom de Vries
2023-05-30 9:06 ` Tom de Vries
2023-05-30 10:12 ` Andrew Burgess
2023-05-30 13:45 ` Andrew Burgess
2023-05-31 15:49 ` Tom de Vries
2023-06-01 11:12 ` Andrew Burgess
2023-06-21 14:19 ` Tom de Vries [this message]
2023-06-21 14:24 ` 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=276da7ff-41c5-9f33-82e1-338f9e17ee21@suse.de \
--to=tdevries@suse.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).