From: Tom de Vries Date: Thu, 24 Jun 2021 10:55:08 +0000 (+0200) Subject: [gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=013270a16a84656d4014bcc5d546a766b581dd1a;p=binutils-gdb.git [gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp 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 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 -- PASS: gdb.base/info-macros.exp: info macro -- ... Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2021-06-24 Tom de Vries * gdb.base/info-macros.exp: Add after trailing whitespace in test names. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 73035a906da..d12aba9f8ac 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-06-24 Tom de Vries + + * gdb.base/info-macros.exp: Add after trailing whitespace in + test names. + 2021-06-24 Tom de Vries * gdb.base/argv0-symlink.exp: Use with_test_prefix. diff --git a/gdb/testsuite/gdb.base/info-macros.exp b/gdb/testsuite/gdb.base/info-macros.exp index 44b0b45988d..19f16814374 100644 --- a/gdb/testsuite/gdb.base/info-macros.exp +++ b/gdb/testsuite/gdb.base/info-macros.exp @@ -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 -- " 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 -- " gdb_test "info macro -invalid-option" \ "Unrecognized option.*Try \"help info macro\"\."