From patchwork Mon Nov 7 16:13:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 60120 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 55ED23857BA7 for ; Mon, 7 Nov 2022 16:14:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 55ED23857BA7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667837664; bh=xn9FpqAFfhkbjx+2jYr8Ts00zsB2vPenriXXZN6fHt4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Wtxhs5M9MQAxaAmD1XJdZki7o9UoG2vmFZ+unk4AlQB6RiEiyLv8kCiuJLktMQpQc novyRxs+DFcb5+dho2gQfhwgqkFChISjQU0/PsrXJ5j2MnspIV9rpBp6xDEn1/6y5Z gNFrlcARYrPzR+z1HKJxsKK95vyC42GLAQ8cBkb0= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7D6A83858C56 for ; Mon, 7 Nov 2022 16:13:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D6A83858C56 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 A9E1B1F88B for ; Mon, 7 Nov 2022 16:13:34 +0000 (UTC) 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 95DE413494 for ; Mon, 7 Nov 2022 16:13:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id AANmI64uaWPsTwAAMHmgww (envelope-from ) for ; Mon, 07 Nov 2022 16:13:34 +0000 To: gdb-patches@sourceware.org Subject: [PATCH 8/9] [gdb/testsuite] Fix gdb.base/jit-reader-exec.exp for remote target Date: Mon, 7 Nov 2022 17:13:32 +0100 Message-Id: <20221107161333.16999-9-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221107161333.16999-1-tdevries@suse.de> References: <20221107161333.16999-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" With test-case gdb.base/jit-reader-exec.exp and target board remote-gdbserver-on-localhost (using REMOTE_TARGET_USERNAME) we run into some failures. Fix this by adding the missing gdb_remote_download. Tested on x86_64-linux. Co-Authored-by: Ivan Tetyushkin --- gdb/testsuite/gdb.base/jit-reader-exec.exp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp index c5ee8ef89a3..ad47c5a9610 100644 --- a/gdb/testsuite/gdb.base/jit-reader-exec.exp +++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp @@ -27,15 +27,19 @@ set testfile2 "jit-reader-execd" set srcfile2 ${testfile2}.c set binfile2 [standard_output_file ${testfile2}] -set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"] - -if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ - executable $compile_options] != ""} { +if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \ + executable {debug}] != ""} { untested "failed to compile" return -1 } -if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \ +if { [is_remote target] } { + set binfile2 [gdb_remote_download target $binfile2] +} + +set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"] + +if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable $compile_options] != ""} { untested "failed to compile" return -1