]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: issue "no repeat" command before "no previous command to relaunch... master
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 6 Nov 2025 21:04:29 +0000 (16:04 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 7 Nov 2025 16:13:02 +0000 (11:13 -0500)
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/testsuite/gdb.base/with.exp

index 23bbf1073647a030d717f8daaf64a5ce3f16a716..6bbec98316f227691134ed714b4fe89e1473c639 100644 (file)
@@ -183,12 +183,15 @@ with_test_prefix "repeat" {
     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"