From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 3/3] [gdb/testsuite] Skip debuginfod tests with cc-with-gnu-debuglink board
Date: Tue, 20 Oct 2026 09:01:57 +0200 [thread overview]
Message-ID: <20261020070157.2414518-4-tdevries@suse.de> (raw)
In-Reply-To: <20261020070157.2414518-1-tdevries@suse.de>
With test-case gdb.debuginfod/fetch_src_and_symbols.exp and target board
cc-with-gnu-debuglink, we run into:
...
output is objcopy: fetch_src_and_symbols.stripped: \
debuglink section already exists
FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: no_url: strip debuginfo
ERROR: tcl error sourcing gdb.debuginfod/fetch_src_and_symbols.exp.
ERROR: tcl error code TCL READ VARNAME
ERROR: can't read "debugdir": no such variable
...
In the test-case, the plan is to use gdb_gnu_strip_debug to move the debuginfo
from $binfile to a .debug file, and move it into $debugdir, where debuginfod
will find it.
If we run with target board cc-with-gnu-debuglink, $binfile already doesn't
have any debuginfo anymore, but a .gnu_debuglink pointing to a .debug file in
a .debug dir. Consequently, gdb_gnu_strip_debug will fail.
We could try to detect this situation and somehow make it work, but it
doesn't seem to be worth the trouble. The .gnu_debuglink case is tested by
default by this test-case, so there's no need to test it when using the
board.
Fix this by requiring !have_gnu_debuglink.
Likewise in gdb.debuginfod/build-id-no-debug-warning.exp.
---
gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp | 2 ++
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 2 ++
2 files changed, 4 insertions(+)
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 eae60901329..362686c87a4 100644
--- a/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
+++ b/gdb/testsuite/gdb.debuginfod/build-id-no-debug-warning.exp
@@ -30,6 +30,8 @@ if {[build_executable "build executable" ${testfile} ${srcfile} \
return
}
+require {!have_gnu_debuglink $binfile}
+
# Split debug information from BINFILE into BINFILE.debug.
#
# By passing the "no-debuglink" flag we prevent this proc from adding
diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index e7c2f524abe..518f9d32a94 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -37,6 +37,8 @@ if { [gdb_compile "$sourcetmp" "$binfile" executable {debug build-id}] != "" } {
return
}
+require {!have_gnu_debuglink $binfile}
+
if { [gdb_compile "$sourcetmp" "${binfile}2" executable {debug build-id}] != "" } {
fail "compile"
return
--
2.51.0
prev parent reply other threads:[~2026-10-20 7:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 7:01 [pushed 0/3] [gdb/testsuite] cc-with-gnu-debuglink fixes Tom de Vries
2026-10-20 7:01 ` [pushed 1/3] [gdb/testsuite] Factor out have_gnu_debuglink Tom de Vries
2026-10-20 7:01 ` [pushed 2/3] [gdb/testsuite] Use have_gnu_debuglink in two more test-cases Tom de Vries
2026-10-20 7:01 ` Tom de Vries [this message]
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=20261020070157.2414518-4-tdevries@suse.de \
--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