From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Add isremote fallback
Date: Tue, 13 Oct 2026 17:12:30 +0200 [thread overview]
Message-ID: <20261013151230.1252959-1-tdevries@suse.de> (raw)
On openSUSE Leap 16.0 with dejagnu 1.6.3 both is_remote and isremote are
supported.
On openSUSE Leap 15.6 with dejagnu 1.6.1 only is_remote is supported.
In a recent commit I added:
...
proc remote_kill_spawn_id_p { board sig } {
...
if {[isremote $board]} {
...
which works fine with dejagnu 1.6.3 but with 1.6.1 I run into:
...
UNRESOLVED: gdb.base/quit-live.exp: appear_how=run: extra_inferior=0: \
testcase aborted due to invalid command name: isremote
ERROR: tcl error sourcing gdb.base/quit-live.exp.
ERROR: invalid command name "isremote"
...
The dejagnu sources 1.6.3 call is_remote "legacy", and dejagnu NEWS calls it
deprecated, so I suppose it'll eventually disappear.
Fix this by making sure that proc isremote is available.
Instead, we could just replace isremote with is_remote in
remote_kill_spawn_id_p, but that does nothing to prevent re-introduction of
the same problem elsewhere. We could undefine proc isremote, but we'd just be
forcing the user to use a deprecated function on newer platforms.
Tested test-case gdb.base/quit-live.exp on both aforementioned configurations
(x86_64-linux).
---
gdb/testsuite/lib/future.exp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 44fc17b3f00..1bf4b35c1fe 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -759,6 +759,13 @@ if { [array size use_gdb_compile] != 0 } {
unproc gdb_default_target_compile
}
+# Dejagnu versions before 1.6.3 don't define isremote.
+if {[info procs isremote] == ""} {
+ proc isremote {board} {
+ return [is_remote $board]
+ }
+}
+
# Various ccache versions provide incorrect debug info such as ignoring
# different current directory, breaking GDB testsuite.
set env(CCACHE_DISABLE) 1
base-commit: bad8b979b27e050b2b4db16a261f8a78e24b8aa2
--
2.51.0
reply other threads:[~2026-10-13 15:13 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=20261013151230.1252959-1-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