From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.base/sect-cmd.exp
Date: Tue, 8 Jun 2021 10:05:35 +0200 [thread overview]
Message-ID: <20210608080534.GA14596@delia> (raw)
Hi,
With a testsuite setup modified to make expect wait a little bit longer for
gdb output (see PR27957), I reliably run into:
...
(gdb) FAIL: gdb.base/sect-cmd.exp: set section .text to original \
address (timeout)
...
The problem is a too greedy regexp:
...
-re ".*$address1 \- $address2 is $section_name.*" {
...
which ends up consuming the gdb prompt with the terminating ".*".
Fix this by limiting the regexp to a single line.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix gdb.base/sect-cmd.exp
gdb/testsuite/ChangeLog:
2021-06-08 Tom de Vries <tdevries@suse.de>
* gdb.base/sect-cmd.exp: Fix saw_section_address_line regexp.
---
gdb/testsuite/gdb.base/sect-cmd.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/sect-cmd.exp b/gdb/testsuite/gdb.base/sect-cmd.exp
index 7aa24ca615f..cb1e4464a69 100644
--- a/gdb/testsuite/gdb.base/sect-cmd.exp
+++ b/gdb/testsuite/gdb.base/sect-cmd.exp
@@ -58,7 +58,7 @@ if { $address1 == "" || $address2 == "" || $section_name == "" } {
set saw_section_address_line false
gdb_test_multiple "section $section_name $address1" \
"set section $section_name to original address" {
- -re ".*$address1 \- $address2 is $section_name.*" {
+ -re ".*$address1 \- $address2 is $section_name in \[^\r\n\]*" {
set saw_section_address_line true
exp_continue
}
reply other threads:[~2021-06-08 8:05 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=20210608080534.GA14596@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).