From patchwork Tue Nov 8 15:30:08 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: 60211 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 E81363858015 for ; Tue, 8 Nov 2022 15:31:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E81363858015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667921469; bh=QVVPG+g/l3rbPOVts+x8nfWA+rr3hz2M8vXUDq/yhcY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=t/repczH3ZTLemQgXSPCyavDU/Nl+M+OZaaPeoT8jgOuXeQGdxtKaycI65hD7jvyv svlaJaj56vbuQsw/VYXz/MLVIOIaLSHTlyf1mhTRwK5J5kDtjuiy31xy/VfGokYZI4 M3aowPzAqxaT9txWnv5lBDBIBD2C34dMwWg3kApM= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org 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 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) 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 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 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/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(-) base-commit: 2756004fe78954754946b61d3f6338d8b72b8332 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]} {