gdb/testsuite: Remove duplicates from gdb.base/exprs.exp
authorLancelot SIX <lsix@lancelotsix.com>
Sun, 21 Nov 2021 00:44:36 +0000 (00:44 +0000)
committerLancelot SIX <lsix@lancelotsix.com>
Fri, 7 Jan 2022 22:43:33 +0000 (22:43 +0000)
When running the testsuite, I have:

    Running .../gdb/testsuite/gdb.base/exprs.exp ...
    DUPLICATE: gdb.base/exprs.exp: \$[0-9]* = red (setup)

Fix by using with_test_prefix where appropriate.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/exprs.exp

index 0d080e31c76a9c12be4bd642db7fac796bc7af5d..c67647a67db431ebd64b2ee351a5f3638cfab24e 100644 (file)
@@ -237,10 +237,12 @@ test_expr "print \"x\" \"y\" \"z\"" "\\$\[0-9\]* = \"xyz\""
 
 # Enum formatting tests.
 test_expr "print red" "\\$\[0-9\]* = red"
-gdb_test "set output-radix 8" ".*"
-test_expr "print red" "\\$\[0-9\]* = red"
-test_expr "print/d red" "\\$\[0-9\]* = 0"
-gdb_test "set output-radix 10" ".*"
+with_test_prefix "output-radix 8" {
+    gdb_test "set output-radix 8" ".*"
+    test_expr "print red" "\\$\[0-9\]* = red"
+    test_expr "print/d red" "\\$\[0-9\]* = 0"
+    gdb_test "set output-radix 10" ".*"
+}
 
 # Pre-/post in-/decrement tests.
 gdb_test "set variable v_int = 1" ""