[gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp
authorTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 10:55:08 +0000 (12:55 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 24 Jun 2021 10:55:08 +0000 (12:55 +0200)
When running test-case gdb.base/info-macros.exp, I run into:
...
PASS: gdb.base/info-macros.exp: info macro --
PASS: gdb.base/info-macros.exp: info macro --
DUPLICATE: gdb.base/info-macros.exp: info macro --
PASS: gdb.base/info-macros.exp: info macro  --
...

These messages come from gdb_test calls using the following commands:
- "info macro --"
- "info macro -- "
- "info macro  -- ".

Apparantly the test names get stripped of trailing whitespace, and the first
two end up identical.

Fix this by explicitly specifying an <EOL> after the trailing whitespace in
the test name, such that we have:
...
PASS: gdb.base/info-macros.exp: info macro --
PASS: gdb.base/info-macros.exp: info macro -- <EOL>
PASS: gdb.base/info-macros.exp: info macro  -- <EOL>
...

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-06-24  Tom de Vries  <tdevries@suse.de>

* gdb.base/info-macros.exp: Add <EOL> after trailing whitespace in
test names.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/info-macros.exp

index 73035a906dac650d20e235cd7824660330b7f890..d12aba9f8ac23f2cfeb73f57d68cf9981e42b0dd 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-24  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.base/info-macros.exp: Add <EOL> after trailing whitespace in
+       test names.
+
 2021-06-24  Tom de Vries  <tdevries@suse.de>
 
        * gdb.base/argv0-symlink.exp: Use with_test_prefix.
index 44b0b45988d06af876647c5e2cd261ddbad83310..19f168143742c11eaa1e51979763fc18cfed86dd 100644 (file)
@@ -61,9 +61,11 @@ gdb_test "info macro --" \
         "You must follow.*with the name.*you want to see.*\[^\r\n\]*\[\r\n\]"
 
 gdb_test "info macro -- " \
-        "You must follow.*with the name.*you want to see.*\[^\r\n\]*\[\r\n\]"
+        "You must follow.*with the name.*you want to see.*\[^\r\n\]*\[\r\n\]" \
+        "info macro -- <EOL>"
 gdb_test "info macro  -- " \
-        "You must follow.*with the name.*you want to see.*\[^\r\n\]*\[\r\n\]"
+        "You must follow.*with the name.*you want to see.*\[^\r\n\]*\[\r\n\]" \
+        "info macro  -- <EOL>"
 
 gdb_test "info macro -invalid-option" \
         "Unrecognized option.*Try \"help info macro\"\."
This page took 0.033511 seconds and 4 git commands to generate.