public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.threads/pending-fork-event-detach.exp for remote target Date: Thu, 9 Mar 2023 14:49:08 +0000 (GMT) [thread overview] Message-ID: <20230309144908.D5F8B3858D33@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2562954ede66f32bff7d985e752b8052c2ae5775 commit 2562954ede66f32bff7d985e752b8052c2ae5775 Author: Tom de Vries <tdevries@suse.de> Date: Thu Mar 9 15:49:17 2023 +0100 [gdb/testsuite] Fix gdb.threads/pending-fork-event-detach.exp for remote target Fix test-case gdb.threads/pending-fork-event-detach.exp for target board remote-gdbserver-on-localhost using gdb_remote_download for $touch_file_bin. Then, fix the test-case for target board remote-stdio-gdbserver with REMOTE_TMPDIR=~/tmp.remote-stdio-gdbserver by creating $touch_file_path on target using remote_download, and using the resulting path. Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.threads/pending-fork-event-detach.exp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp index ff90ab87429..bde513f609d 100644 --- a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp +++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp @@ -42,6 +42,17 @@ if { [is_remote target] } { # If the target is remote, write the file in whatever the current working # directory is, with a somewhat unique name. set touch_file_path ${testfile}-flag + + # Now get the remote name, by creating the file on build and copying it to + # target. + remote_exec build touch $touch_file_path + set target_touch_file_path [remote_download target $touch_file_path] + + # Clean up. + remote_file build delete $touch_file_path + remote_file target delete $target_touch_file_path + + set touch_file_path $target_touch_file_path } else { set touch_file_path [standard_output_file flag] } @@ -51,11 +62,13 @@ if { [gdb_compile "$srcdir/$subdir/$srcfile2" $touch_file_bin executable $opts] return } +set target_touch_file_bin [gdb_remote_download target $touch_file_bin] + proc do_test { target-non-stop who_forks fork_function stop_mode } { set opts [list \ debug \ "additional_flags=-DFORK_FUNCTION=$fork_function" \ - "additional_flags=-DTOUCH_FILE_BIN=\"$::touch_file_bin\""] + "additional_flags=-DTOUCH_FILE_BIN=\"$::target_touch_file_bin\""] # WHO_FORKS says which of the main or other thread calls (v)fork. The # thread that does not call (v)fork is the one who tries to step.
reply other threads:[~2023-03-09 14:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230309144908.D5F8B3858D33@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@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).