From patchwork Tue Mar 21 10:25:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66672 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 9D0E738582AC for ; Tue, 21 Mar 2023 10:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D0E738582AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679394380; bh=jCZbaUC3jzZee3Jv7LsVEhwmvdH1aKPJY2Xa6qW37jw=; 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=BCRq95+S/briSbyJzoFSkkg+VViT2DKFvO8VbZ4Y+XNJokmuES4Zy7sIEvOScgTzZ CDzATJ8yUlufpOss9CaDjSogDWXN+GRkw/b2ZQ/6EdJILC8g3U2LmG0HzwqHcfAgMi hbnD2IPlIBQpnzrSoeZ0SKqvqLeLvmRSxcYctqPo= 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 26FD93858D38 for ; Tue, 21 Mar 2023 10:25:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26FD93858D38 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 B18881FE9E for ; Tue, 21 Mar 2023 10:25:52 +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 839DD13440 for ; Tue, 21 Mar 2023 10:25:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id eIk1GTCGGWQALQAAMHmgww (envelope-from ) for ; Tue, 21 Mar 2023 10:25:52 +0000 To: gdb-patches@sourceware.org Subject: [pushed 1/2] [gdb/testsuite] Fix gdb.xml/tdesc-reload.exp for remote host Date: Tue, 21 Mar 2023 11:25:52 +0100 Message-Id: <20230321102553.14895-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230321102553.14895-1-tdevries@suse.de> References: <20230321102553.14895-1-tdevries@suse.de> MIME-Version: 1.0 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 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" Fix test-case gdb.xml/tdesc-reload.exp for remote host by using appropriate filenames. Tested on x86_64-linux. --- gdb/testsuite/gdb.xml/tdesc-reload.exp | 6 +++--- gdb/testsuite/lib/gdb.exp | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp index 21dede88faa..b8ece6fc19c 100644 --- a/gdb/testsuite/gdb.xml/tdesc-reload.exp +++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp @@ -29,9 +29,9 @@ if {![runto_main]} { } # Three files we're going to write out to. -set xml_file_1 [standard_output_file outfile1.xml] -set xml_file_2 [standard_output_file outfile2.xml] -set xml_file_3 [standard_output_file outfile3.xml] +set xml_file_1 [host_standard_output_file outfile1.xml] +set xml_file_2 [host_standard_output_file outfile2.xml] +set xml_file_3 [host_standard_output_file outfile3.xml] # Write the current target description to a file. gdb_test_no_output "pipe maint print xml-tdesc | cat > $xml_file_1" \ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 111a158e7ce..0a0ae697d1e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6364,6 +6364,16 @@ proc standard_output_file {basename} { return [file join $dir $basename] } +# Turn BASENAME into a file name on host. + +proc host_standard_output_file { basename } { + if { [is_remote host] } { + return $basename + } else { + return [standard_output_file $basename] + } +} + # Turn BASENAME into a full file name in the standard output directory. If # GDB has been launched more than once then append the count, starting with # a ".1" postfix.