public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp
@ 2021-06-24 11:03 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-06-24 11:03 UTC (permalink / raw)
  To: gdb-patches

Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp

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                | 5 +++++
 gdb/testsuite/gdb.base/info-macros.exp | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

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  <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.
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 -- <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\"\."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-24 11:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 11:03 [committed][gdb/testsuite] Fix duplicate in gdb.base/info-macros.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).