From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp
Date: Thu, 30 Sep 2021 19:11:04 +0200 [thread overview]
Message-ID: <20210930171102.GA25195@delia> (raw)
Hi,
When running test-case gdb.base/info-os.exp, I run into:
...
PASS: gdb.base/info-os.exp: get threads
PASS: gdb.base/info-os.exp: get threads
DUPLICATE: gdb.base/info-os.exp: get threads
...
Fix this not doing pass followed by exp_continue in gdb_test_multiple.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp
---
gdb/testsuite/gdb.base/info-os.exp | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index b17a7842d5f..14bbbd95a07 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -125,17 +125,16 @@ proc expect_multiline { command expect test } {
global gdb_prompt
# Do not duplicate FAILs from gdb_test_multiple.
- set pass 0
- set fail 0
+ set found 0
+ set ok 0
gdb_test_multiple $command $test {
-re "^$expect *\r\n" {
- pass $test
- set pass 1
+ set found 1
exp_continue
}
-re "^$gdb_prompt $" {
- if !$pass {
- set fail 1
+ if $found {
+ set ok 1
}
# Exit the loop.
}
@@ -144,9 +143,7 @@ proc expect_multiline { command expect test } {
exp_continue
}
}
- if $fail {
- fail $test
- }
+ gdb_assert { $ok } $test
}
# Test output of the 'info os' commands against the expected results.
reply other threads:[~2021-09-30 17:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210930171102.GA25195@delia \
--to=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox