I see this failure:
$ make check TESTS="gdb.base/with.exp" RUNTESTFLAGS="--target_board=native-extended-gdbserver"
FAIL: gdb.base/with.exp: repeat: reinvoke with no previous command to relaunch
It seems like that failure has always been there and I didn't notice?
I'm not sure what is the intent of the test exactly. It sounds like it
is meant to test what happens when you use command "with language ada"
as the very first command of a GDB session? However, clean_restart and
gdb_load issue some commands before that test. The different between
the native-extended-gdbserver board and the other boards is: for other
boards, the previous command is a "file" command, which is a "no repeat"
command, which gives the expected error message. With the
native-extended-gdbserver board, the previous command is "set remote
exec-file", which is a repeatable command.
"Fix" it by making a "no repeat" command just before the test, so that
it works the same regardless of the target board.
Change-Id: I254faf196f49e9efd492fc9dd5f6ce7b96f72af7
Approved-By: Tom Tromey <tom@tromey.com>
gdb_load $binfile
# "with" with no command reinvokes the previous command.
+
+ # Test after a "no repeat" command (which "delete" is).
+ gdb_test "delete 9999" "No breakpoint number 9999\\."
gdb_test "with language ada" \
"No previous command to relaunch" \
"reinvoke with no previous command to relaunch"
+ # Test after a repeatable command.
gdb_test "print g_s" " = {a = 1, b = 2, c = 3}"
-
gdb_test "with language ada" \
" = \\(a => 1, b => 2, c => 3\\)" \
"reinvoke with language"