From: Simon Marchi Date: Thu, 6 Nov 2025 21:04:29 +0000 (-0500) Subject: gdb/testsuite: issue "no repeat" command before "no previous command to relaunch... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b94d8189ae75d81e8bcff74e71d76d354de8882c;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite: issue "no repeat" command before "no previous command to relaunch" test 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 --- diff --git a/gdb/testsuite/gdb.base/with.exp b/gdb/testsuite/gdb.base/with.exp index 23bbf107364..6bbec98316f 100644 --- a/gdb/testsuite/gdb.base/with.exp +++ b/gdb/testsuite/gdb.base/with.exp @@ -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"