public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout)
@ 2020-11-26 14:02 vries at gcc dot gnu.org
2020-11-26 16:41 ` [Bug testsuite/26951] " vries at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-26 14:02 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26951
Bug ID: 26951
Summary: FAIL: gdb.base/batch-preserve-term-settings.exp: batch
run: spawn shell (timeout)
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: ---
The test-case hardcodes an assumption for PS1 to end in '$'.
On my laptop, we have:
...
$ sh
sh-4.4$ echo $PS1
\s-\v\$
...
and the test passes.
On another machine, I get:
...
$ sh
hostname:/dir> echo $PS1
\h:\w>
...
and the tests times out waiting for '$'.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/26951] FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout)
2020-11-26 14:02 [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout) vries at gcc dot gnu.org
@ 2020-11-26 16:41 ` vries at gcc dot gnu.org
2020-12-14 6:55 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-26 16:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26951
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
index 7ae3518..b0abe3f 100644
--- a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
+++ b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
@@ -28,12 +28,13 @@ if [is_remote host] {
}
# The shell's prompt.
-set shell_prompt_re "\[$#\] "
+set shell_prompt "gdb-subshell$ "
+set shell_prompt_re [string_to_regexp $shell_prompt]
# Spawn shell. Returns true on success, false otherwise.
proc spawn_shell {} {
- global shell_prompt_re
+ global shell_prompt shell_prompt_re
set res [remote_spawn host "/bin/sh"]
if { $res < 0 || $res == "" } {
@@ -41,6 +42,8 @@ proc spawn_shell {} {
return 0
}
+ send_gdb "PS1=\"$shell_prompt\"\n"
+
set gotit 0
set test "spawn shell"
gdb_expect {
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/26951] FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout)
2020-11-26 14:02 [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout) vries at gcc dot gnu.org
2020-11-26 16:41 ` [Bug testsuite/26951] " vries at gcc dot gnu.org
@ 2020-12-14 6:55 ` vries at gcc dot gnu.org
2020-12-14 16:05 ` cvs-commit at gcc dot gnu.org
2020-12-14 16:06 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2020-12-14 6:55 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26951
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2020-December/174061.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/26951] FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout)
2020-11-26 14:02 [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout) vries at gcc dot gnu.org
2020-11-26 16:41 ` [Bug testsuite/26951] " vries at gcc dot gnu.org
2020-12-14 6:55 ` vries at gcc dot gnu.org
@ 2020-12-14 16:05 ` cvs-commit at gcc dot gnu.org
2020-12-14 16:06 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-14 16:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26951
--- Comment #3 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=153f6e6cb0266f8312ba85956b256ce1e3a2cb8e
commit 153f6e6cb0266f8312ba85956b256ce1e3a2cb8e
Author: Tom de Vries <tdevries@suse.de>
Date: Mon Dec 14 17:05:11 2020 +0100
[gdb/testsuite] Handle shell prompt in batch-preserve-term-settings.exp
On SLE-11, I run into:
...
FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell \
(timeout)
...
The problem is that the shell prompt has PS1="\h:\w> ", but the test
expects
a shell prompt ending in a space preceded by either '$' or '#':
...
set shell_prompt_re "\[$#\] "
...
We could easily fix this by adding '>' to shell_prompt_re, but this
wouldn't
work for other PS1 setting.
Fix this instead by setting the shell prompt to "gdb-subshell$ " (as in
gdb.base/multi-line-starts-subshell.exp).
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-12-14 Tom de Vries <tdevries@suse.de>
PR testsuite/26951
* gdb.base/batch-preserve-term-settings.exp: Use "gdb-subshell$ "
as
shell prompt.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/26951] FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout)
2020-11-26 14:02 [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout) vries at gcc dot gnu.org
` (2 preceding siblings ...)
2020-12-14 16:05 ` cvs-commit at gcc dot gnu.org
@ 2020-12-14 16:06 ` vries at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2020-12-14 16:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=26951
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Target Milestone|--- |11.1
Resolution|--- |FIXED
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Patch fixing test-case committed, marking resolved-fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-14 16:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 14:02 [Bug testsuite/26951] New: FAIL: gdb.base/batch-preserve-term-settings.exp: batch run: spawn shell (timeout) vries at gcc dot gnu.org
2020-11-26 16:41 ` [Bug testsuite/26951] " vries at gcc dot gnu.org
2020-12-14 6:55 ` vries at gcc dot gnu.org
2020-12-14 16:05 ` cvs-commit at gcc dot gnu.org
2020-12-14 16:06 ` 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).