From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 110973857C70 for ; Thu, 8 Oct 2020 12:17:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 110973857C70 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C72083000F11; Thu, 8 Oct 2020 14:17:20 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 5AF1540007BE; Thu, 8 Oct 2020 14:17:20 +0200 (CEST) From: Mark Wielaard To: dwz@sourceware.org Cc: Mark Wielaard Subject: [COMMITTED] Adjust pr24468.sh test-case for readelf with =follow-links. Date: Thu, 8 Oct 2020 14:17:17 +0200 Message-Id: <20201008121717.27534-1-mark@klomp.org> X-Mailer: git-send-email 2.18.4 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 12:17:23 -0000 Newer binutils readelf have =follow-links which is automatically enabled with -w. This shows not only the debuginfo of the main file but also that of the alt file referenced. This causes the pr24468.sh to see "too many" DW_TAG_partial_units (from both files) which then doesn't matches the number of DW_AT_imports. The fix is simply to use -wi instead of -w since we are only interested in the .debug_info DIEs anyway. * testsuite/dwz.tests/pr24468.sh: Use readelf -wi. --- testsuite/dwz.tests/pr24468.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/dwz.tests/pr24468.sh b/testsuite/dwz.tests/pr24468.sh index b03fdf9..4dac9a1 100644 --- a/testsuite/dwz.tests/pr24468.sh +++ b/testsuite/dwz.tests/pr24468.sh @@ -5,7 +5,7 @@ cp 1 2 dwz -m 3 1 2 -readelf -w 1 > READELF 2>/dev/null +readelf -wi 1 > READELF 2>/dev/null offsets=$(grep '(DW_TAG_partial_unit' READELF \ | awk '{print $1}' \ -- 2.18.4