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: [PATCH 5/7] [gdb/testsuite] Fix gdbserver path in remote-stdio-gdbserver.exp
Date: Thu,  9 Mar 2023 10:45:43 +0100	[thread overview]
Message-ID: <20230309094545.4537-5-tdevries@suse.de> (raw)
In-Reply-To: <20230309094545.4537-1-tdevries@suse.de>

With test-case gdb.server/unittest.exp and target board remote-stdio-gdbserver
I run into:
...
(gdb) builtin_spawn /usr/bin/ssh -t -l vries localhost /usr/bin/gdbserver \
  --selftest^M
Selftests have been disabled for this build.^M
UNSUPPORTED: gdb.server/unittest.exp: unit tests
...
due to using the system gdbserver /usr/bin/gdbserver rather than the one from
the build.

Fix this by removing the hard-coding of /usr/bin/gdbserver in
remote-stdio-gdbserver, allowing find_gdbserver to do its work, such that we
have instead:
...
(gdb) builtin_spawn /usr/bin/ssh -t -l vries localhost \
  /data/vries/gdb/leap-15-4/build/gdbserver/gdbserver --selftest^M
Running selftest remote_memory_tagging.^M
Ran 1 unit tests, 0 failed^M
Connection to localhost closed.^M^M
PASS: gdb.server/unittest.exp: unit tests
...

Tested on x86_64-linux.
---
 gdb/testsuite/boards/remote-stdio-gdbserver.exp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gdb/testsuite/boards/remote-stdio-gdbserver.exp b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
index 47a0577733c..479dfb066a4 100644
--- a/gdb/testsuite/boards/remote-stdio-gdbserver.exp
+++ b/gdb/testsuite/boards/remote-stdio-gdbserver.exp
@@ -47,11 +47,9 @@ if [info exists REMOTE_TMPDIR] {
     set_board_info remotedir $REMOTE_TMPDIR
 }
 
-unset_board_info gdb_server_prog
 if [info exists GDBSERVER] {
+    unset_board_info gdb_server_prog
     set_board_info gdb_server_prog $GDBSERVER
-} else {
-    set_board_info gdb_server_prog /usr/bin/gdbserver
 }
 
 proc get_remote_login { } {
-- 
2.35.3


  parent reply	other threads:[~2023-03-09  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09  9:45 [PATCH 1/7] [gdb/testsuite] Fix gdb.server/connect-with-no-symbol-file.exp for remote target Tom de Vries
2023-03-09  9:45 ` [PATCH 2/7] [gdb/testsuite] Fix gdb.server/server-kill.exp " Tom de Vries
2023-03-09  9:45 ` [PATCH 3/7] [gdb/testsuite] Fix gdb.server/multi-ui-errors.exp " Tom de Vries
2023-03-09  9:45 ` [PATCH 4/7] [gdb/testsuite] Fix gdb.server/sysroot.exp " Tom de Vries
2023-03-09 13:42   ` Tom de Vries
2023-03-09  9:45 ` Tom de Vries [this message]
2023-03-09  9:45 ` [PATCH 6/7] [gdb/testsuite] Fix gdb.server/unittest.exp " Tom de Vries
2023-03-09  9:45 ` [PATCH 7/7] [gdb/testsuite] Fix gdb.server/*.exp " Tom de Vries
2023-03-09 11:30 ` [PATCH 1/7] [gdb/testsuite] Fix gdb.server/connect-with-no-symbol-file.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=20230309094545.4537-5-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).