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 27BD63848031 for ; Mon, 2 Aug 2021 13:33:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27BD63848031 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 5A2581FFA0 for ; Mon, 2 Aug 2021 13:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1627911188; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=Xv6mRgOcfGZPxogtjw/aex9pZTHI1B4XrHeB3yjo0HE=; b=e7pKbqNTkNIe7kkO3hwKWwuYEyYFUm7czHpB0XAZ7sUb0Xp2pfu1W7kYwywVNUhPUM1kp6 QRQ+6KUnjq3PgayKdvOh+ro+lUIEp/IdOw6yTC1ANylGnWY6Chw9AddRKvQgu3xlnRXdYr lM7eRyIanhhafonJJFi868E8w23bwVg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1627911188; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=Xv6mRgOcfGZPxogtjw/aex9pZTHI1B4XrHeB3yjo0HE=; b=MtcdBEHupiuqBHjzSmv7Smxc52oO0M1vHvc8TlX6Py+gb4FrJEmxWfReo0PQN8lBH8RTQk 8d55JPF6T/Zbd4AA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (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 imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 495C513983 for ; Mon, 2 Aug 2021 13:33:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id I733EBT0B2EwZwAAGKfGzw (envelope-from ) for ; Mon, 02 Aug 2021 13:33:08 +0000 Date: Mon, 2 Aug 2021 15:33:06 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.dwarf2/per-bfd-sharing.exp with cc-with-gdb-index Message-ID: <20210802133305.GA8609@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Mon, 02 Aug 2021 13:33:10 -0000 Hi, When running with target board cc-with-gdb-index, we run into: ... rm: cannot remove '/tmp/tmp.JmYTeiuFjj/*.gdb-index': \ No such file or directory^M FAIL: gdb.dwarf2/per-bfd-sharing.exp: \ couldn't remove files in temporary cache dir ... Fix this, as in gdb.base/index-cache.exp, by only FAILing when $expecting_index_cache_use. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.dwarf2/per-bfd-sharing.exp with cc-with-gdb-index gdb/testsuite/ChangeLog: 2021-08-02 Tom de Vries * gdb.dwarf2/per-bfd-sharing.exp: Only expect index-cache files when $expecting_index_cache_use. --- gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp index 48a30fa741c..6891cd77446 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -23,6 +23,10 @@ if { [build_executable "failed to prepare" $testfile $srcfile \ return } +set has_index_section [exec_has_index_section $binfile] +set uses_readnow [expr [string first "-readnow" $GDBFLAGS] != -1] +set expecting_index_cache_use [expr !$has_index_section && !$uses_readnow] + lassign [remote_exec host mktemp -d] ret cache_dir # The output of mktemp contains an end of line, remove it. @@ -93,7 +97,7 @@ foreach_with_prefix first $methods { } lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret -if { $ret != 0 } { +if { $ret != 0 && $expecting_index_cache_use } { fail "couldn't remove files in temporary cache dir" return }