From: Enze Li <enze.li@hotmail.com>
To: gdb-patches@sourceware.org
Cc: enze.li@gmx.com
Subject: [PATCH] gdb/testsuite: add untested message to skip_debuginfod_tests
Date: Fri, 9 Dec 2022 19:56:24 +0800 [thread overview]
Message-ID: <OS3P286MB21524BD0F485B6991D4B87E4F01C9@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM> (raw)
When running the fetch_src_and_symbols.exp, I see the following output
which looks weird. I even don't know whether the execution was successful.
======
Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp ...
testcase /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
completed in 0 seconds
=== gdb Summary ===
======
It is the fact that there's not enough feedback provided during the
skip_debuginfod_tests procedure. Fix this by adding some untested
messages to the skip_debuginfod_tests procedure to clarify the output.
With this patch applied, I get:
======
Running /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp ...
UNTESTED: gdb.debuginfod/fetch_src_and_symbols.exp: cannot find debuginfo
testcase /home/lee/dev/binutils-gdb/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
completed in 0 seconds
=== gdb Summary ===
# of untested testcases 1
======
I also modernized the form of 'if' with 'if {} {}' in
skip_debuginfod_tests.
Tested on x86_64-linux.
---
gdb/testsuite/lib/debuginfod-support.exp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/debuginfod-support.exp b/gdb/testsuite/lib/debuginfod-support.exp
index ceecf9071110..c1a2bb900dce 100644
--- a/gdb/testsuite/lib/debuginfod-support.exp
+++ b/gdb/testsuite/lib/debuginfod-support.exp
@@ -18,11 +18,13 @@
# Return true if the debuginfod tests should be skipped, otherwise, return
# false.
proc skip_debuginfod_tests {} {
- if [is_remote host] {
+ if { [is_remote host] } {
+ untested "does not work on remote host"
return true
}
if { [which debuginfod] == 0 } {
+ untested "cannot find debuginfo"
return true
}
@@ -39,6 +41,7 @@ proc skip_debuginfod_tests {} {
if { [string first "with-debuginfod" \
[eval exec $::GDB --quiet $::INTERNAL_GDBFLAGS \
--configuration]] == -1 } {
+ untested "GDB was not configured with debuginfod"
return true
}
base-commit: cd3866b6d07b37258eb840443537baa163877e24
--
2.30.2
next reply other threads:[~2022-12-09 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 11:56 Enze Li [this message]
2022-12-12 12:44 ` Bruno Larsen
2022-12-13 16:14 ` Tom Tromey
2022-12-14 7:43 ` Enze Li
2022-12-14 17:19 ` Tom Tromey
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=OS3P286MB21524BD0F485B6991D4B87E4F01C9@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM \
--to=enze.li@hotmail.com \
--cc=enze.li@gmx.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).