From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PUSHED] gdb/testsuite: tighten patterns in build-id-no-debug-warning.exp
Date: Fri, 5 May 2023 16:58:33 +0100 [thread overview]
Message-ID: <58d047ac2597d7b9e89e1723aaf67dfe51f8117b.1683302295.git.aburgess@redhat.com> (raw)
Tighten the expected output pattern in the test script:
gdb.debuginfod/build-id-no-debug-warning.exp
While working on some other patch I broke GDB such that this warning:
warning: "FILENAME": separate debug info file has no debug info
(which is generated in build-id.c) didn't actually include the
FILENAME any more -- yet this test script continued to pass. It turns
out that this script doesn't actually check for FILENAME.
This commit extends the test pattern to check for the full warning
string, including FILENAME, and also removes some uses of '.*' to make
the test stricter.
---
gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
index 1102d9bf254..b49770f4a5e 100644
--- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
+++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
@@ -87,10 +87,12 @@ gdb_test_no_output "set debug-file-directory ${debug_file_directory}" \
"set debug-file-directory"
# Now load the file into GDB, and look for the warning.
+set debug_file_re [string_to_regexp $build_id_debug_file]
gdb_test "file ${build_id_debug_file}" \
[multi_line \
- ".*Reading symbols from.*debuginfo.*" \
- ".*separate debug info file has no debug info.*"] \
+ "Reading symbols from $debug_file_re\\.\\.\\." \
+ "warning: \"$debug_file_re\": separate debug info file has no debug info" \
+ "\\(No debugging symbols found in \[^\r\n\]+\\)"] \
"load test file, expect a warning"
# Now we should close GDB.
base-commit: 233239384c7a050dd590971d75233c49b12f8d85
--
2.25.4
reply other threads:[~2023-05-05 15:58 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=58d047ac2597d7b9e89e1723aaf67dfe51f8117b.1683302295.git.aburgess@redhat.com \
--to=aburgess@redhat.com \
--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).