public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout)
@ 2020-11-26 14:47 vries at gcc dot gnu.org
  2020-11-26 16:34 ` [Bug testsuite/26952] " 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:47 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26952

            Bug ID: 26952
           Summary: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn
                    subshell from multi-line (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: ---

...
(gdb) if 1^M
 >shell HOME=/dev/null PS1="gdb-subshell$ " /bin/sh^M
 >end^M
hostname:/dir> FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell
from multi-line (timeout)
...

The PS1 setting doesn't seem to have an effect:
...
$ HOME=/dev/null PS1="gdb-subshell$ " /bin/sh 
hostname:/dir> 
hostname:/dir> echo $PS1
\h:\w>
hostname:/dir> echo $HOME
/dev/null
...
while the HOME setting does.

-- 
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/26952] FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout)
  2020-11-26 14:47 [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout) vries at gcc dot gnu.org
@ 2020-11-26 16:34 ` vries at gcc dot gnu.org
  2020-12-14  6:56 ` 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:34 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26952

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/testsuite/gdb.base/multi-line-starts-subshell.exp
b/gdb/testsuite/gdb.base
/multi-line-starts-subshell.exp
index 710c3916c6e..4379abbb4b9 100644
--- a/gdb/testsuite/gdb.base/multi-line-starts-subshell.exp
+++ b/gdb/testsuite/gdb.base/multi-line-starts-subshell.exp
@@ -27,10 +27,10 @@ set shell_prompt_re [string_to_regexp $shell_prompt]

 # Point HOME nowhere to avoid the shell sourcing the user's init
 # scripts.
-set shell_cmd "HOME=/dev/null PS1=\"$shell_prompt\" /bin/sh"
+set shell_cmd "HOME=/dev/null /bin/sh"

 set test "spawn subshell from multi-line"
-gdb_test_multiple "if 1\nshell ${shell_cmd}\nend" $test {
+gdb_test_multiple "if 1\nshell ${shell_cmd}\nend\nPS1=\"$shell_prompt\"" $test
{
     -re "$shell_prompt_re$" {
        pass $test

...

-- 
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/26952] FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout)
  2020-11-26 14:47 [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout) vries at gcc dot gnu.org
  2020-11-26 16:34 ` [Bug testsuite/26952] " vries at gcc dot gnu.org
@ 2020-12-14  6:56 ` vries at gcc dot gnu.org
  2020-12-15  9:18 ` cvs-commit at gcc dot gnu.org
  2020-12-15  9:19 ` 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:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26952

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2020-December/174062.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/26952] FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout)
  2020-11-26 14:47 [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout) vries at gcc dot gnu.org
  2020-11-26 16:34 ` [Bug testsuite/26952] " vries at gcc dot gnu.org
  2020-12-14  6:56 ` vries at gcc dot gnu.org
@ 2020-12-15  9:18 ` cvs-commit at gcc dot gnu.org
  2020-12-15  9:19 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-15  9:18 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26952

--- 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=77c8aaf716d9f93dc5850f8b2481da5eb7a53662

commit 77c8aaf716d9f93dc5850f8b2481da5eb7a53662
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Dec 15 10:18:23 2020 +0100

    [gdb/testsuite] Handle PS1 quirk in gdb.base/multi-line-starts-subshell.exp

    On SLE-11, I run into:
    ...
    (gdb) if 1^M
     >shell HOME=/dev/null PS1="gdb-subshell$ " /bin/sh^M
     >end^M
    hostname:/dir> FAIL: gdb.base/multi-line-starts-subshell.exp: \
      spawn subshell from multi-line (timeout)
    ...

    The problem is that the PS1 setting has no effect, due to a bug on older
    openSUSE/SLE version.  The mechanism there is:
    - /etc/profile sets ENV=/etc/bash.bashrc
    - /bin/sh is started
    - /bin/sh executes ENV, in other words /etc/bash.bashrc
    - during the execution of /etc/bash.bashrc, PS1 is set unconditionally

    Fix this by setting PS1 after spawning the subshell.

    Tested on x86_64-linux.

    2020-12-15  Tom de Vries  <tdevries@suse.de>

            PR testsuite/26952
            * gdb.base/multi-line-starts-subshell.exp: Set PS1 after spawning
            shell.

-- 
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/26952] FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout)
  2020-11-26 14:47 [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-12-15  9:18 ` cvs-commit at gcc dot gnu.org
@ 2020-12-15  9:19 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2020-12-15  9:19 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26952

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.1
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
test-case patch 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-15  9:19 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:47 [Bug testsuite/26952] New: FAIL: gdb.base/multi-line-starts-subshell.exp: spawn subshell from multi-line (timeout) vries at gcc dot gnu.org
2020-11-26 16:34 ` [Bug testsuite/26952] " vries at gcc dot gnu.org
2020-12-14  6:56 ` vries at gcc dot gnu.org
2020-12-15  9:18 ` cvs-commit at gcc dot gnu.org
2020-12-15  9: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).