public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/2] [gdb/testsuite] Skip do_self_tests on remote host
Date: Mon, 27 Mar 2023 17:40:19 +0200	[thread overview]
Message-ID: <20230327154020.26151-1-tdevries@suse.de> (raw)

In do_self_tests we try to find out the location of the gdb to debug, which
will then be copied and renamed to xgdb.

In principle, the host board specifies the location of GDB, on host.

With remote host, we could upload that gdb from host to build/target, but we
would miss the data directory (which is listed as the reason to skip
do_self_tests for remote target).

We could fix that by instead taking the gdb from build instead, but that
wouldn't work with installed testing.

It seems easier to just skip this on remote host.

It could be made to work for the "[is_remote host] && [is_remote target]
&& host == target" scenario (see board local-remote-host-native.exp), but
that doesn't seem worth the effort.

Tested on x86_64-linux.
---
 gdb/testsuite/lib/selftest-support.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp
index 61379f59bb4..1e7a2cea8b7 100644
--- a/gdb/testsuite/lib/selftest-support.exp
+++ b/gdb/testsuite/lib/selftest-support.exp
@@ -100,7 +100,7 @@ proc do_self_tests {function body} {
     # Are we testing with a remote board?  In that case, the target
     # won't have access to the GDB's auxilliary data files
     # (data-directory, etc.).  It's simpler to just skip.
-    if [is_remote target] {
+    if { [is_remote target]  || [is_remote host] } {
 	return
     }
 

base-commit: 2215170485845673379b59d3e4e5e1a9ac01ba41
-- 
2.35.3


             reply	other threads:[~2023-03-27 15:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 15:40 Tom de Vries [this message]
2023-03-27 15:40 ` [pushed 2/2] [gdb/testsuite] Fix gdb.gdb/unittest.exp for " 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=20230327154020.26151-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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).