From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH] [gdb/testsuite] Fix copy-to-remote in gdb.base/vfork-follow-parent.exp
Date: Thu, 17 Aug 2023 10:21:54 +0200 [thread overview]
Message-ID: <20230817082154.23729-1-tdevries@suse.de> (raw)
When running test-case gdb.base/vfork-follow-parent.exp, I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.base/vfork-follow-parent.exp.
ERROR: error copying "vforked-prog": no such file or directory
while executing
"file copy -force $fromfile $tofile"
(procedure "gdb_remote_download" line 29)
invoked from within
"gdb_remote_download target $binfile3"
...
Fix this by:
- making the copy-to-remote conditional on is_remote target, and
- allowing gdb_remote_download to find $binfile3 by using
standard_output_file.
Also remove unused variable remote_exec_prog.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.base/vfork-follow-parent.exp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/vfork-follow-parent.exp b/gdb/testsuite/gdb.base/vfork-follow-parent.exp
index 70b54e729a5..a29706f58c5 100644
--- a/gdb/testsuite/gdb.base/vfork-follow-parent.exp
+++ b/gdb/testsuite/gdb.base/vfork-follow-parent.exp
@@ -30,7 +30,9 @@ if { [build_executable "compile $binfile3" $binfile3 $srcfile2] } {
return -1
}
-set remote_exec_prog [gdb_remote_download target $binfile3]
+if { [is_remote target] } {
+ gdb_remote_download target [standard_output_file $binfile3]
+}
set opts [list debug additional_flags=-DTEST_EXIT]
if { [build_executable "compile ${binfile}" ${binfile} ${srcfile} ${opts}] } {
base-commit: 3afe50fe1974f9a13326a31696f5a93371ed00b7
--
2.35.3
next reply other threads:[~2023-08-17 8:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 8:21 Tom de Vries [this message]
2023-08-17 8:23 ` Tom de Vries
2023-08-17 13:47 ` Andrew Burgess
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=20230817082154.23729-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).