From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 10682385840A for ; Mon, 27 Mar 2023 11:59:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10682385840A 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 3AB3721E88 for ; Mon, 27 Mar 2023 11:59:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679918340; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qrf4VdpWGAQjm4B5cs9IYjBu8Z5xG8kT49TLRDSsOCQ=; b=RDm5nlisjZ0mMitFsOCDrJd0aBln/yg9CllcHSOj5zIJM36LjOrLCaljrbwxGyPg90myeE QY1iQUxGIXeu/tylSyEvSzwSrii8Cs7dFx5TUz8wFl6VXN5+2TW7Qe6c9bTMOzFfbIYn80 YEnUV+hb6KY0Xjt2m1YsGIltWlDv+S0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679918340; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qrf4VdpWGAQjm4B5cs9IYjBu8Z5xG8kT49TLRDSsOCQ=; b=BL7q4cL9jDPrXGguwRKdeT2qai2BeW9ZvQOkrhOOFykjL430fbzeYimnFcnXYqz7UCwtPB FEQ2XoGA+RMEcNCg== 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 27F5E13482 for ; Mon, 27 Mar 2023 11:59:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MNeQCASFIWTCOgAAMHmgww (envelope-from ) for ; Mon, 27 Mar 2023 11:59:00 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed 08/10] [gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host Date: Mon, 27 Mar 2023 13:58:56 +0200 Message-Id: <20230327115858.5950-9-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230327115858.5950-1-tdevries@suse.de> References: <20230327115858.5950-1-tdevries@suse.de> 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.dwarf2/gdb-index-cxx.exp for remote host using host_standard_output_file. Tested on x86_64-linux. --- gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp | 2 +- gdb/testsuite/lib/gdb.exp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp index 3c3d6cc463d..6fffc982722 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp @@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" "${testfile}" \ } # The bug was that gdb would crash when saving. -set output_dir [standard_output_file ""] +set output_dir [host_standard_output_file ""] set cmd "save gdb-index" gdb_test_multiple "$cmd $output_dir" $cmd { -re -wrap "Cannot use an index to create the index.*" { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 39ed5ad761b..14ce39e8ed7 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6414,6 +6414,9 @@ proc host_standard_output_file { basename } { if { [is_remote host] } { set remotedir [board_info host remotedir] if { $remotedir == "" } { + if { $basename == "" } { + return "." + } return $basename } else { return [join [list $remotedir $basename] "/"] -- 2.35.3