[PATCH 03/29] gdb/testsuite: Remove duplicates from gdb.base/interp.exp

Lancelot SIX lsix@lancelotsix.com
Sun Nov 21 17:56:10 GMT 2021


When running the testsuite I have:

    Running .../gdb/testsuite/gdb.base/interp.exp ...
    DUPLICATE: gdb.base/interp.exp: interpreter-exec mi "-var-update *"

This is due to the fact that two successive instances of
gdb_test_multiple use 'pass $cmd', but the second test forgets to reset
$cmd.

Fix by updating the value of cmd where appropriate.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.base/interp.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp
index fc95ee113c2..3d28232c522 100644
--- a/gdb/testsuite/gdb.base/interp.exp
+++ b/gdb/testsuite/gdb.base/interp.exp
@@ -34,8 +34,8 @@ gdb_test_multiple $cmd $cmd {
 gdb_test "interpreter-exec console \"show version\"" "GNU gdb .*"
 
 # Regression test for crash when an exception occurs in mi_parse.
-gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \
-    "regression test for mi_parse crash" {
+set cmd "interpreter-exec mi \"-break-insert --thread a\""
+gdb_test_multiple $cmd "regression test for mi_parse crash" {
 	-re ".error,msg=.Invalid value for the '--thread' option.\r\n$gdb_prompt " {
 	    pass "$cmd"
 	    gdb_expect 1 {
-- 
2.33.1



More information about the Gdb-patches mailing list