From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 2879D3858013 for ; Tue, 8 Nov 2022 15:30:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2879D3858013 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-out2.suse.de (Postfix) with ESMTPS id 679C81F8AA for ; Tue, 8 Nov 2022 15:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1667921409; 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=QVVPG+g/l3rbPOVts+x8nfWA+rr3hz2M8vXUDq/yhcY=; b=ecLkyB6dF+C4OS9VQZ+Pb741op1ImsXlp9JCboIa5wnoUQknB09qBG8243Cn7uaq+uENS9 adfANjOIjp3ib/A0RnkQbxK7IfJ8+C+nsGN1xZWl4T/BbY4D12Cx1wparfZGrAMHWk7iVV RVt255PwRUtL5HJeJf2mfCdQ9BvN+4Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1667921409; 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=QVVPG+g/l3rbPOVts+x8nfWA+rr3hz2M8vXUDq/yhcY=; b=Y5ZERVyp3xgRYXD+ND9z/qhn/4jedDdvIL+9lcN6O+VVRuud0qUBNsTloBzmf4eTiLTNpH uhPR4ogGI1IrYCDw== 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 52FEC139F1 for ; Tue, 8 Nov 2022 15:30:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id d6slEwF2amMuWQAAMHmgww (envelope-from ) for ; Tue, 08 Nov 2022 15:30:09 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix find_core_file for core named core Date: Tue, 8 Nov 2022 16:30:08 +0100 Message-Id: <20221108153008.4952-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=-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 List-Id: With test-case gdb.base/bigcore.exp I run into: ... (gdb) PASS: gdb.base/bigcore.exp: get inferior pid signal SIGABRT^M Continuing with signal SIGABRT.^M ^M Program terminated with signal SIGABRT, Aborted.^M The program no longer exists.^M (gdb) PASS: gdb.base/bigcore.exp: signal SIGABRT UNTESTED: gdb.base/bigcore.exp: can't generate a core file ... due to find_core_file returning "". There is a core file name core: ... $ ls ./outputs/gdb.base/bigcore bigcore bigcore.corefile core gdb.cmd.1 gdb.in.1 gdbserver.cmd.1 ... but it's not found. The problem is this statement: ... lappend files [list ${::testfile}.core core] ... which adds a single list item "${::testfile}.core core". Fix this in the most readable way: ... lappend files ${::testfile}.core lappend files core ... Tested on x86_64-linux. --- gdb/testsuite/lib/gdb.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e2cda30b95a..3e0a46445ca 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -7736,7 +7736,8 @@ proc find_core_file {pid} { } elseif {$pid != -1} { lappend files core.$pid } - lappend files [list ${::testfile}.core core] + lappend files ${::testfile}.core + lappend files core foreach file $files { if {![is_remote host]} { base-commit: 2756004fe78954754946b61d3f6338d8b72b8332 -- 2.35.3