diff options
author | Tom de Vries <tdevries@suse.de> | 2021-10-13 11:06:36 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-10-13 11:06:36 +0200 |
commit | 746723ba6c1b36d6ec88de3f772a80a8d2de6e4d (patch) | |
tree | 523610dfae2a668c1baba392ad4c8e45041e2a1b /gdb | |
parent | 7110a5d8e8523b6ecd1d97ab3936cdea03bf7b39 (diff) | |
download | gdb-746723ba6c1b36d6ec88de3f772a80a8d2de6e4d.zip gdb-746723ba6c1b36d6ec88de3f772a80a8d2de6e4d.tar.gz gdb-746723ba6c1b36d6ec88de3f772a80a8d2de6e4d.tar.bz2 |
[gdb/testsuite] Fix gdb.base/batch-exit-status.exp with native-gdbserver
When running test-case gdb.base/batch-exit-status.exp with target board
native-gdbserver, I run into (added missing double quotes for clarity):
...
builtin_spawn $build/gdb/testsuite/../../gdb/gdb -nw -nx \
-data-directory $build/gdb/testsuite/../data-directory \
-iex "set height 0" -iex "set width 0" \
-ex "set auto-connect-native-target off" \
-iex "set sysroot" -batch ""^M
: No such file or directory.^M
PASS: gdb.base/batch-exit-status.exp: 1x: \
No such file or directory: [lindex $result 2] == 0
FAIL: gdb.base/batch-exit-status.exp: 1x: \
No such file or directory: [lindex $result 3] == $expect_status
...
As in commit a02a90c114c "[gdb/testsuite] Set sysroot earlier in
local-board.exp", the problem is the use of -ex for
"set auto-connect-native-target off", which makes that the last command to
be executed, and consequently determines the return status.
Fix this by using -iex instead.
Tested on x86_64-linux.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/boards/gdbserver-base.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/boards/gdbserver-base.exp b/gdb/testsuite/boards/gdbserver-base.exp index 03bdffe..8939b8c 100644 --- a/gdb/testsuite/boards/gdbserver-base.exp +++ b/gdb/testsuite/boards/gdbserver-base.exp @@ -31,4 +31,4 @@ set_board_info gdb,nofileio 1 # The predefined TSVs in GDBserver. set_board_info gdb,predefined_tsv "\\\$trace_timestamp" -set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\"" +set GDBFLAGS "${GDBFLAGS} -iex \"set auto-connect-native-target off\"" |