public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
@ 2023-05-17 15:07 simon.marchi at polymtl dot ca
2023-05-18 6:08 ` [Bug testsuite/30458] " vries at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: simon.marchi at polymtl dot ca @ 2023-05-17 15:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
Bug ID: 30458
Summary: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli:
prompt after wrap
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: simon.marchi at polymtl dot ca
Target Milestone: ---
I sometimes see this failure on my CI. This time, it was with the
native-gdbserver board, not sure if it matters (maybe it does for timing). I
haven't been able to reproduce it locally yet.
Here's a snippet from gdb.log
maint info screen
Number of characters gdb thinks are in a line is 50.
Number of characters readline reports are in a line is 49.
Number of characters curses thinks are in a line is 50.
Number of characters environment thinks are in a line is 50 (COLUMNS).
Number of lines gdb thinks are in a page is 4294967295 (unlimited).
Number of lines readline reports are in a page is 32767 (unlimited).
Number of lines curses thinks are in a page is 24.
Number of lines environment thinks are in a page is 24 (LINES).
(gdb) PASS: gdb.tui/wrap-line.exp: width-auto-detected: maint info screen
PASS: gdb.tui/wrap-line.exp: width-auto-detected: width
PASS: gdb.tui/wrap-line.exp: width-auto-detected: $gdb_width == [expr
$readline_width + 1]
Quit
(gdb) PASS: gdb.tui/wrap-line.exp: width-auto-detected: cli: start line
7890123456789012345678901234567890123456789
WBox Dump (50 x 24) @ (0, 0):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Box Dump (50 x 24) @ (0, 0):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Box Dump (50 x 24) @ (0, 0):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Box Dump (50 x 24) @ (0, 0):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Box Dump (50 x 24) @ (0, 0):
0 Quit
1 (gdb) 7890123456789012345678901234567890123456789
2 W
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
@ 2023-05-18 6:08 ` vries at gcc dot gnu.org
2023-05-18 6:11 ` vries at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-18 6:08 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
Component|gdb |testsuite
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
2023-05-18 6:08 ` [Bug testsuite/30458] " vries at gcc dot gnu.org
@ 2023-05-18 6:11 ` vries at gcc dot gnu.org
2023-05-21 16:02 ` vries at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-18 6:11 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2023-May/199662.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
2023-05-18 6:08 ` [Bug testsuite/30458] " vries at gcc dot gnu.org
2023-05-18 6:11 ` vries at gcc dot gnu.org
@ 2023-05-21 16:02 ` vries at gcc dot gnu.org
2023-05-21 16:03 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-21 16:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aburgess at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (2 preceding siblings ...)
2023-05-21 16:02 ` vries at gcc dot gnu.org
@ 2023-05-21 16:03 ` vries at gcc dot gnu.org
2023-05-21 16:09 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-21 16:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
After adding:
...
diff --git a/readline/readline/signals.c b/readline/readline/signals.c
index 8fedc370a1a..1cfbf6f22df 100644
--- a/readline/readline/signals.c
+++ b/readline/readline/signals.c
@@ -46,6 +46,8 @@
#include "rlprivate.h"
+#include <assert.h>
+
#if defined (HANDLE_SIGNALS)
#if !defined (RETSIGTYPE)
@@ -753,6 +755,8 @@ rl_echo_signal_char (int sig)
if (_rl_echoctl == 0 || _rl_echo_control_chars == 0)
return;
+ assert (0);
+
switch (sig)
{
case SIGINT: c = _rl_intr_char; break;
...
I get:
...
(gdb) bt
#0 0x00007fe4160c071b in raise () from /lib64/libpthread.so.0
#1 0x000000000078ae45 in handle_fatal_signal (sig=6) at
/data/vries/gdb/src/gdb/event-top.c:903
#2 <signal handler called>
#3 0x00007fe413f83c6b in raise () from /lib64/libc.so.6
#4 0x00007fe413f85305 in abort () from /lib64/libc.so.6
#5 0x00007fe413f7bc6a in __assert_fail_base () from /lib64/libc.so.6
#6 0x00007fe413f7bcf2 in __assert_fail () from /lib64/libc.so.6
#7 0x0000000000d8f8bb in rl_echo_signal_char (sig=2) at
/data/vries/gdb/src/readline/readline/signals.c:758
#8 0x0000000000d8f124 in _rl_handle_signal (sig=2) at
/data/vries/gdb/src/readline/readline/signals.c:276
#9 0x0000000000d8f00b in _rl_signal_handler (sig=2) at
/data/vries/gdb/src/readline/readline/signals.c:163
#10 0x0000000000d8f7f9 in _rl_release_sigint () at
/data/vries/gdb/src/readline/readline/signals.c:685
#11 0x0000000000d8ac5e in rl_redisplay () at
/data/vries/gdb/src/readline/readline/display.c:1570
#12 0x0000000000d734c5 in _rl_internal_char_cleanup () at
/data/vries/gdb/src/readline/readline/readline.c:533
#13 0x0000000000d7380c in readline_internal_char () at
/data/vries/gdb/src/readline/readline/readline.c:681
#14 0x0000000000d93875 in rl_callback_read_char () at
/data/vries/gdb/src/readline/readline/callback.c:264
#15 0x0000000000789cd8 in gdb_rl_callback_read_char_wrapper_noexcept () at
/data/vries/gdb/src/gdb/event-top.c:192
#16 0x0000000000789d74 in gdb_rl_callback_read_char_wrapper
(client_data=0x2a98e60)
at /data/vries/gdb/src/gdb/event-top.c:225
#17 0x0000000000cb0cc2 in stdin_event_handler (error=0, client_data=0x2a98e60)
at /data/vries/gdb/src/gdb/ui.c:155
#18 0x000000000149e214 in handle_file_event (file_ptr=0x2d1de60, ready_mask=1)
at /data/vries/gdb/src/gdbsupport/event-loop.cc:573
#19 0x000000000149e7aa in gdb_wait_for_event (block=1) at
/data/vries/gdb/src/gdbsupport/event-loop.cc:694
#20 0x000000000149d670 in gdb_do_one_event (mstimeout=-1) at
/data/vries/gdb/src/gdbsupport/event-loop.cc:264
#21 0x000000000091288b in start_event_loop () at
/data/vries/gdb/src/gdb/main.c:412
#22 0x00000000009129db in captured_command_loop () at
/data/vries/gdb/src/gdb/main.c:476
#23 0x00000000009141c7 in captured_main (data=0x7ffcc1751f90) at
/data/vries/gdb/src/gdb/main.c:1320
#24 0x0000000000914261 in gdb_main (args=0x7ffcc1751f90) at
/data/vries/gdb/src/gdb/main.c:1339
#25 0x00000000004194ce in main (argc=10, argv=0x7ffcc17520a8) at
/data/vries/gdb/src/gdb/gdb.c:32
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (3 preceding siblings ...)
2023-05-21 16:03 ` vries at gcc dot gnu.org
@ 2023-05-21 16:09 ` vries at gcc dot gnu.org
2023-05-21 16:18 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-21 16:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Passes reliably with:
...
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 133d914aff8..82d66373c7e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6351,7 +6351,10 @@ proc default_gdb_init { test_file_name } {
# before 8.0 will not understand this and will issue a warning.
# We tried using a $if to guard it, but Readline 8.1 had a bug in
# its version-comparison code that prevented this for working.
- setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off"]
+ setenv INPUTRC [cached_file inputrc {
+ set enable-bracketed-paste off
+ set echo-control-characters off
+ }]
# This disables style output, which would interfere with many
# tests.
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (4 preceding siblings ...)
2023-05-21 16:09 ` vries at gcc dot gnu.org
@ 2023-05-21 16:18 ` vries at gcc dot gnu.org
2023-05-21 16:21 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-21 16:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #3)
> Passes reliably with:
Alternatively:
...
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 64a883e89a3..a4c9e598a65 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -652,7 +652,7 @@ namespace eval Term {
# Initialize.
proc _setup {rows cols} {
global stty_init
- set stty_init "rows $rows columns $cols"
+ set stty_init "rows $rows columns $cols -ctlecho"
variable _rows
variable _cols
...
Both these are related to this condition:
...
rl_echo_signal_char (int sig)
{
...
if (_rl_echoctl == 0 || _rl_echo_control_chars == 0)
return;
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (5 preceding siblings ...)
2023-05-21 16:18 ` vries at gcc dot gnu.org
@ 2023-05-21 16:21 ` vries at gcc dot gnu.org
2023-06-21 14:16 ` cvs-commit at gcc dot gnu.org
2023-06-21 14:19 ` vries at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-05-21 16:21 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
FTR, managed to reproduce this by doing taskset -c 0 in combination with
make-check-all.sh.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (6 preceding siblings ...)
2023-05-21 16:21 ` vries at gcc dot gnu.org
@ 2023-06-21 14:16 ` cvs-commit at gcc dot gnu.org
2023-06-21 14:19 ` vries at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-21 14:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
--- Comment #6 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b96cac16078d282ee0924296817c6eee52196669
commit b96cac16078d282ee0924296817c6eee52196669
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Jun 21 16:16:50 2023 +0200
[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
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/30458] FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
` (7 preceding siblings ...)
2023-06-21 14:16 ` cvs-commit at gcc dot gnu.org
@ 2023-06-21 14:19 ` vries at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2023-06-21 14:19 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=30458
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |14.1
Resolution|--- |FIXED
--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-06-21 14:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 15:07 [Bug gdb/30458] New: FAIL: gdb.tui/wrap-line.exp: width-auto-detected: cli: prompt after wrap simon.marchi at polymtl dot ca
2023-05-18 6:08 ` [Bug testsuite/30458] " vries at gcc dot gnu.org
2023-05-18 6:11 ` vries at gcc dot gnu.org
2023-05-21 16:02 ` vries at gcc dot gnu.org
2023-05-21 16:03 ` vries at gcc dot gnu.org
2023-05-21 16:09 ` vries at gcc dot gnu.org
2023-05-21 16:18 ` vries at gcc dot gnu.org
2023-05-21 16:21 ` vries at gcc dot gnu.org
2023-06-21 14:16 ` cvs-commit at gcc dot gnu.org
2023-06-21 14:19 ` vries at gcc dot gnu.org
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).