public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
@ 2022-10-10 8:58 vries at gcc dot gnu.org
2022-10-10 9:38 ` [Bug testsuite/29664] " vries at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 8:58 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
Bug ID: 29664
Summary: [gdb/testsuite, taskset -c 0] FAIL:
gdb.base/style.exp: capture_command_output for x/1i
*main
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: testsuite
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
When running test-case gdb.base/style.exp with taskset -c 0, I run into:
...
(gdb) PASS: gdb.base/style.exp: have style markers when Pygments is working
fine
python^M
>def replacement_colorize_disasm(content,gdbarch):^M
> return None^M
>gdb.styling.colorize_disasm = replacement_colorize_disasm^M
>quit^M
(gdb) PASS: gdb.base/style.exp: setup replacement colorize_disasm function
^M
(gdb) FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
x/1i *main^M
^[[34m0x4004b2^[[m <^[[33mmain^[[m>: push %rbp^M
(gdb) PASS: gdb.base/style.exp: have no style markers when Pygments is broken
...
Without taskset -c 0, we have instead:
...
(gdb) PASS: gdb.base/style.exp: have style markers when Pygments is working
fine
python^M
>def replacement_colorize_disasm(content,gdbarch):^M
> return None^M
>gdb.styling.colorize_disasm = replacement_colorize_disasm^M
>quit^M
(gdb) ^M
(gdb) PASS: gdb.base/style.exp: setup replacement colorize_disasm function
x/1i *main^M
^[[34m0x4004b2^[[m <^[[33mmain^[[m>: push %rbp^M
(gdb) PASS: gdb.base/style.exp: have no style markers when Pygments is broken
...
Note that the "PASS: gdb.base/style.exp: setup replacement colorize_disasm
function" in the latter case consumes two prompts, but in the former case only
one.
At this point, I don't understand why we see two prompts in the first place.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
@ 2022-10-10 9:38 ` vries at gcc dot gnu.org
2022-10-10 9:41 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 9:38 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
A minimal reproducer:
...
$ cat gdb/testsuite/gdb.base/style.exp
load_lib gdb-python.exp
clean_restart
gdb_py_test_silent_cmd \
[multi_line_input \
"python" \
"\004"] \
"python, ^D" \
true
set command "print 1"
set test "capture_command_output for $command"
set re_command [string_to_regexp ${command}]
gdb_test_multiple "$command" "$test - match command" {
-re "^$re_command\r\n" {
pass $gdb_test_name
}
}
gdb_test_multiple "" "$test - match output" {
-re "^(\[^\r\n\]+\r\n)" {
exp_continue
}
-re "^$gdb_prompt $" {
pass $gdb_test_name
}
}
...
I think there's a bug in the fact that we're handling a single command output
using two gdb_test_multiples.
But I think the root cause here is another one: we're using
gdb_py_test_silent_cmd to send a command ending in ^D, but doing so adds a "\n"
at the end.
This fixes it:
...
set command \
[multi_line_input \
"python" \
"\004"]
send_gdb $command
gdb_py_test_silent_cmd \
"" \
"python, ^D" \
true
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
2022-10-10 9:38 ` [Bug testsuite/29664] " vries at gcc dot gnu.org
@ 2022-10-10 9:41 ` vries at gcc dot gnu.org
2022-10-10 10:24 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 9:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> gdb_py_test_silent_cmd \
> [multi_line_input \
> "python" \
> "\004"] \
> "python, ^D" \
> true
And well, the simplest way to fix this is replacing "\004" with "end".
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
2022-10-10 9:38 ` [Bug testsuite/29664] " vries at gcc dot gnu.org
2022-10-10 9:41 ` vries at gcc dot gnu.org
@ 2022-10-10 10:24 ` vries at gcc dot gnu.org
2022-10-10 10:27 ` vries at gcc dot gnu.org
2022-10-10 10:33 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 10:24 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
This seems to be fixed by
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f91822c2b9f9fed0c2717b17f380e5216502ea32
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-10-10 10:24 ` vries at gcc dot gnu.org
@ 2022-10-10 10:27 ` vries at gcc dot gnu.org
2022-10-10 10:33 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 10:27 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Ah, the problem reported in this PR was already mentioned at:
https://sourceware.org/pipermail/gdb-patches/2022-October/192476.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-10-10 10:27 ` vries at gcc dot gnu.org
@ 2022-10-10 10:33 ` vries at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vries at gcc dot gnu.org @ 2022-10-10 10:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29664
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |13.1
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by aforementioned commit.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-10 10:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 8:58 [Bug testsuite/29664] New: [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main vries at gcc dot gnu.org
2022-10-10 9:38 ` [Bug testsuite/29664] " vries at gcc dot gnu.org
2022-10-10 9:41 ` vries at gcc dot gnu.org
2022-10-10 10:24 ` vries at gcc dot gnu.org
2022-10-10 10:27 ` vries at gcc dot gnu.org
2022-10-10 10:33 ` 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).