From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 0943D3858D38 for ; Thu, 17 Aug 2023 08:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0943D3858D38 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-out1.suse.de (Postfix) with ESMTPS id 9AC54212AE for ; Thu, 17 Aug 2023 08:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692260538; 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=gdwHUx6zXVxo/VAKrzZMBQIsr3CaRCOhzMFlsfuvo6Y=; b=lxx/LwTNYJtDycnWdmZGs7cjANvAgwpR/piO1FxZTGy66onmzoq9gWFSckBwuiCfXwDeFA KuuXIdT7cImFUS8AQ8KRhQMnpsLjKPv/xG+FQ/Lv9qwtIRmWX6XtnoQa0J5iJyWe62um7a Df6dao2uM6PfaEdYKzlgCLsUGnA45WA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692260538; 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=gdwHUx6zXVxo/VAKrzZMBQIsr3CaRCOhzMFlsfuvo6Y=; b=v/joI7KpqHneUsHsmWtHezgqUjFHKQZp7lTu+ENKuHZV1dtYiC7kgLTSNpkVOEqhsbTSy4 QWrsXSDQJYNgbhDQ== 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 89B8D1392B for ; Thu, 17 Aug 2023 08:22:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 88N+ILrY3WTpUgAAMHmgww (envelope-from ) for ; Thu, 17 Aug 2023 08:22:18 +0000 From: Tom de Vries 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 Message-Id: <20230817082154.23729-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=-11.9 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: 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