Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 2/3] [gdb/testsuite] Fix remote host confusion in gdb.python/python.exp
Date: Sun,  1 Nov 2026 15:07:48 +0100	[thread overview]
Message-ID: <20261101140752.548879-3-tdevries@suse.de> (raw)
In-Reply-To: <20261101140752.548879-1-tdevries@suse.de>

With host board local-remote-host, target board remote-gdbserver-on-localhost
and test-case gdb.python/python.exp I run into:
...
(gdb) Executing on local-remote-host: \
  rm -f  $outputs/gdb.python/python/source2-symlink.py    (timeout = 300)
builtin_spawn [open ...]
rm: cannot remove '$outputs/gdb.python/python/source2-symlink.py': \
  Permission denied
XYZ1ZYX
Executing on host: \
  ln -sf  $outputs/gdb.python/python/source2-symlink.py    (timeout = 300)
builtin_spawn [open ...]
XYZ0ZYX
source -s $outputs/gdb.python/python/source2-symlink.py \
  $outputs/gdb.python/python/source2-symlink.py: No such file or directory.
(gdb) FAIL: $exp: source -s source2-symlink.py
...

There are two problems:
- the remote download specifies a 'tofile' on build
- the ln specifies a link name on build

Fix these by:
- using simply source2-symlink.notpy as 'tofile'
- using host_standard_output_file to specify the link name on host
---
 gdb/testsuite/gdb.python/python.exp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp
index 3adbef72001..f8a2e35c961 100644
--- a/gdb/testsuite/gdb.python/python.exp
+++ b/gdb/testsuite/gdb.python/python.exp
@@ -98,11 +98,12 @@ gdb_test "source $remote_source2_py" "yes" "source source2.py"
 gdb_test "source -s source2.py" "yes"
 
 set remote_source2_symlink_notpy \
-    [gdb_remote_download host ${srcdir}/${subdir}/source2.py \
-	 [standard_output_file "source2-symlink.notpy"]]
-set remote_source2_symlink_py [standard_output_file "source2-symlink.py"]
+    [gdb_remote_download host $srcdir/$subdir/source2.py source2-symlink.notpy]
+set remote_source2_symlink_py [host_standard_output_file source2-symlink.py]
 remote_file host delete $remote_source2_symlink_py
-set status [remote_exec host "ln -sf $remote_source2_symlink_notpy $remote_source2_symlink_py"]
+set status \
+    [remote_exec host \
+	 "ln -sf $remote_source2_symlink_notpy $remote_source2_symlink_py"]
 set test "source -s source2-symlink.py"
 if {[lindex $status 0] == 0} {
     gdb_test "source -s $remote_source2_symlink_py" "yes" $test
-- 
2.51.0


  parent reply	other threads:[~2026-11-01 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 14:07 [pushed 0/3] [gdb/testsuite] A few fixes " Tom de Vries
2026-11-01 14:07 ` [pushed 1/3] [gdb/testsuite] Handle help() timeout " Tom de Vries
2026-11-01 14:07 ` Tom de Vries [this message]
2026-11-01 14:07 ` [pushed 3/3] [gdb/testsuite] Disable part of gdb.python/python.exp for !readline_is_used 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=20261101140752.548879-3-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