public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug testsuite/30250] New: [gdb/testsuite] remotedir review Date: Mon, 20 Mar 2023 12:21:34 +0000 [thread overview] Message-ID: <bug-30250-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=30250 Bug ID: 30250 Summary: [gdb/testsuite] remotedir review Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- Board variable remotedir is documented as intended for remote target: ... name example description remotedir /tmp/runtest.[pid] Directory on the remote target in which executables are downloaded and executed ... I didn't spot anything target-specific though in the implementation, so I wonder if it can also be used for remote host. Anyway, first looking at the implementation: .... if { [board_info $dest exists remotedir] } { set remotedir [board_info $dest remotedir] set status [remote_exec $dest mkdir "-p $remotedir"] if { [lindex $status 0] != 0 } { perror "Couldn't create remote directory $remotedir on $dest" return "" } set destfile $remotedir/$destfile } ... it looks odd to me to hardcode "/" as path separator, but perhaps that's considered ok because it's not enabled by default. I see something similar for nfsdir. Then, the implementation doesn't look complete. That is, remote_exec and remote_download both take remotedir into account, but not remote_upload. So, say we have remotedir=/tmp, and we have an exec ./a.out on build/host, and the exec generates ./bla.txt. A remote_download of a.out to target gives us /tmp/a.out. Doing a remote_exec of /tmp/a.out gives us /tmp/bla.txt. Then doing a remote_upload from host of ./bla.txt doesn't work, we need to use ./tmp/bla.txt. I don't see any reason why remote_upload cannot do the same as remote_download. Finally, target_compile uses this style remote_upload for host, so if we want remote host to work with remotedir, we need to fix this. I'd start out with a local override of remote_upload, then try to upstream the change. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-03-20 12:21 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-20 12:21 vries at gcc dot gnu.org [this message] 2023-03-20 16:06 ` [Bug testsuite/30250] " cvs-commit at gcc dot gnu.org
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=bug-30250-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).