From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/3] [gdb/testsuite] Handle non-existing testfile in find_core_file
Date: Fri, 16 Oct 2026 17:28:47 +0200 [thread overview]
Message-ID: <20261016152849.87694-2-tdevries@suse.de> (raw)
In-Reply-To: <20261016152849.87694-1-tdevries@suse.de>
Proc find_core_file assumes that variable testfile exists.
The variable doesn't exist when not using standard_testfile.
Fix this by checking if it exists in find_core_file.
---
gdb/testsuite/lib/gdb.exp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index a77063b0bf0..dca32750fbf 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -10303,7 +10303,9 @@ proc find_core_file {pid} {
} elseif {$pid != -1} {
lappend files core.$pid
}
- lappend files ${::testfile}.core
+ if {[info exists ::testfile]} {
+ lappend files ${::testfile}.core
+ }
lappend files core
foreach file $files {
--
2.51.0
next prev parent reply other threads:[~2026-10-16 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 15:28 [pushed 0/3] [gdb/testsuite] Add some tui test-cases Tom de Vries
2026-10-16 15:28 ` Tom de Vries [this message]
2026-10-16 15:28 ` [pushed 2/3] [gdb/testsuite] Add gdb.tui/fatal.exp Tom de Vries
2026-10-16 15:28 ` [pushed 3/3] [gdb/testsuite] Add gdb.tui/internal-error.exp Tom de Vries
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=20261016152849.87694-2-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