From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 228593858D33 for ; Thu, 9 Mar 2023 14:49:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 228593858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 555C020123 for ; Thu, 9 Mar 2023 14:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1678373365; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zXkQGvFOMCjm4BQmPzQCkjvZEOfrhfPLGldQqvFP6Kc=; b=RmjW4K9f6EWOv9wYTTr2o6SsTtHQPr/8Ia1D4CrQCTjmC+azTNU+dLPpk0QYskH4aHiuSm dPv/T6+/d6HFl/Du1QoDTTN5JLphysus86dA81MgDctf18gbZ0mu+hQ/ovZQ9sLZ6Kn9p9 te+vfLz7txD/xHfkhm5/fEzN47i4C/Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1678373365; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zXkQGvFOMCjm4BQmPzQCkjvZEOfrhfPLGldQqvFP6Kc=; b=svJbxiskqMG9Hmjni2Rjt8qV2fOuNOicguN8vXzNus5+teni07JK/YoT12c6+GrGjDwba3 BSJC+aoz8hqfw2Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 40F4D13A10 for ; Thu, 9 Mar 2023 14:49:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sbyPDvXxCWS/RAAAMHmgww (envelope-from ) for ; Thu, 09 Mar 2023 14:49:25 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.threads/pending-fork-event-detach.exp for remote target Date: Thu, 9 Mar 2023 15:49:37 +0100 Message-Id: <20230309144937.4876-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- .../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. base-commit: f2be4eeb6ce93e4dfab259587bcaf5cb861fc25b -- 2.35.3