public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: add untested message to skip_debuginfod_tests
@ 2022-12-09 11:56 Enze Li
  2022-12-12 12:44 ` Bruno Larsen
  2022-12-13 16:14 ` Tom Tromey
  0 siblings, 2 replies; 5+ messages in thread
From: Enze Li @ 2022-12-09 11:56 UTC (permalink / raw)
  To: gdb-patches; +Cc: enze.li

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-14 17:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 11:56 [PATCH] gdb/testsuite: add untested message to skip_debuginfod_tests Enze Li
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

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).