diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-28 14:18:44 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-28 14:18:44 +0200 |
commit | 134ec14b1502f30f0028293b35f57c18e44614d0 (patch) | |
tree | 2e103c24cc1623495d9b37f343025317cb3f8fea /gdb | |
parent | c61b7b7b8ea5e3a55b4642dade4798e5c896df66 (diff) | |
download | gdb-134ec14b1502f30f0028293b35f57c18e44614d0.zip gdb-134ec14b1502f30f0028293b35f57c18e44614d0.tar.gz gdb-134ec14b1502f30f0028293b35f57c18e44614d0.tar.bz2 |
[gdb/testsuite] Fix gdb.server/non-existing-program.exp with remote-gdbserver-on-localhost
With test-case gdb.server/non-existing-program.exp and native, I have reliably:
...
(gdb) builtin_spawn gdbserver stdio non-existing-program^M
stdin/stdout redirected^M
/bin/bash: line 0: exec: non-existing-program: not found^M
During startup program exited with code 127.^M
Exiting^M
PASS: gdb.server/non-existing-program.exp: gdbserver exits cleanly
...
But with target board remote-gdbserver-on-localhost I sometimes have:
...
(gdb) builtin_spawn /usr/bin/ssh -t -l remote-target localhost gdbserver \
stdio non-existing-program^M
stdin/stdout redirected^M
/bin/bash: line 0: exec: non-existing-program: not found^M
During startup program exited with code 127.^M
Exiting^M
Connection to localhost closed.^M^M
PASS: gdb.server/non-existing-program.exp: gdbserver exits cleanly
...
and sometimes the exact same output, but a FAIL instead.
Fix this by replacing "Exiting\r\n$" with "Exiting\r\n" in the regexps.
Tested on x86_64-linux.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.server/non-existing-program.exp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index 32f27fa..eea1eb1 100644 --- a/gdb/testsuite/gdb.server/non-existing-program.exp +++ b/gdb/testsuite/gdb.server/non-existing-program.exp @@ -40,18 +40,18 @@ expect { # This is what we get on ptrace-based targets with # startup-with-shell disabled (e.g., when the SHELL variable is # unset). - -re "stdin/stdout redirected.*gdbserver: Cannot exec non-existing-program\r\ngdbserver: Error: No such file or directory\r\n\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" { + -re "stdin/stdout redirected.*gdbserver: Cannot exec non-existing-program\r\ngdbserver: Error: No such file or directory\r\n\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" { set saw_exiting 1 exp_continue } # Likewise, but with startup-with-shell enabled, which is the # default behaviour. - -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" { + -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" { set saw_exiting 1 exp_continue } # This is what we get on Windows. - -re "Error creating process\r\n\r\nExiting\r\n$" { + -re "Error creating process\r\n\r\nExiting\r\n" { set saw_exiting 1 exp_continue } |