From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +HSZHKLiOWFSAwAAWB0awg (envelope-from ) for ; Thu, 09 Sep 2021 06:32:02 -0400 Received: by simark.ca (Postfix, from userid 112) id 7222A1EE23; Thu, 9 Sep 2021 06:32:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id CD8181EDDB for ; Thu, 9 Sep 2021 06:32:01 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B24A384B0F4 for ; Thu, 9 Sep 2021 10:32:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B24A384B0F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631183521; bh=UZ8ZlqA+u3C3wFXOQylHuiimC+VRYowYAAxZk6FhcTU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=iw4XcEPBhGw17jhuTr0M1zUhenS0ooLSXI5ijXUSp546NDlrTJNCubnK81C2rcmW4 zmkbyrK8+1Iv16fYXyBBa1E+xGzwqDnr9ewkA4uBE8gmXNAGV5qiRMEhb2vKzSEV09 xANZGUUFLho0qwwxxTe4MjdaVMkdOWmGNyRDXvfU= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id A74433858C2C for ; Thu, 9 Sep 2021 10:31:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A74433858C2C 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 E4B5B21D04 for ; Thu, 9 Sep 2021 10:31:41 +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 CF7F213BF2 for ; Thu, 9 Sep 2021 10:31:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oLqRMY3iOWE4NgAAMHmgww (envelope-from ) for ; Thu, 09 Sep 2021 10:31:41 +0000 Date: Thu, 9 Sep 2021 12:31:40 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.base/coredump-filter-build-id.exp with older eu-unstrip Message-ID: <20210909103125.GA18675@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-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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, On openSUSE Leap 42.3 with eu-unstrip 0.158, we run into: ... (gdb) PASS: gdb.base/coredump-filter-build-id.exp: save corefile First line of eu-unstrip: \ 0x400000+0x202000 f4ae8502bd6a14770182382316bc595e9dc6f08b@0x400284 - - [exe] FAIL: gdb.base/coredump-filter-build-id.exp: gcore dumped mapping with build-id ... The test expects an actual file name instead of '[exe]', but that only got introduced with eu-unstrip 0.161. Before it printed '[exe]' or '[pie]'. Fix this by updating the regexp. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.base/coredump-filter-build-id.exp with older eu-unstrip --- gdb/testsuite/gdb.base/coredump-filter-build-id.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp index 41f8b0564ae..a9012b898f3 100644 --- a/gdb/testsuite/gdb.base/coredump-filter-build-id.exp +++ b/gdb/testsuite/gdb.base/coredump-filter-build-id.exp @@ -58,7 +58,8 @@ if { [catch "exec [gdb_find_eu-unstrip] -n --core $corefilename" output] == 0 } verbose -log "First line of eu-unstrip: $line" - if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*[string_to_regexp $binfile]$" $line] } { + set binfile_re (?:[string_to_regexp $binfile]|\\\[(?:exe|pie)\\\]) + if { [regexp "^${hex}\\+${hex} \[a-f0-9\]+@${hex}.*$binfile_re$" $line] } { pass "$test" } else { fail "$test"