From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 936933858018 for ; Sun, 20 Dec 2020 07:51:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 936933858018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BA222AC7F; Sun, 20 Dec 2020 07:51:26 +0000 (UTC) Date: Sun, 20 Dec 2020 08:51:25 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed][testsuite] Fix partial unit grepping in pr24468.sh Message-ID: <20201220075123.GA12783@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=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Sun, 20 Dec 2020 07:51:31 -0000 Hi, I'm running into: ... FAIL: src/testsuite/dwz.tests/pr24468.sh ... In more detail, we find the following offsets for partial units: ... + offsets='b 6b da' ... and then fail to find an import for the one at 6b: ... ++ grep -c 'DW_AT_import.*0x6b' READELF ++ true + imports=0 + '[' 0 -gt 0 ']' ... But there's actually no partial unit at 6b, the grep matches on a DW_AT_import: ... <6b> DW_AT_import : <0xb> [Abbrev Number: 17 (DW_TAG_partial_unit)] ... Fix this by filtering out the DW_AT_import lines when grepping for partial units. Committed to trunk. Thanks, - Tom [testsuite] Fix partial unit grepping in pr24468.sh 2020-12-20 Tom de Vries * testsuite/dwz.tests/pr24468.sh: Fix partial unit grepping. --- testsuite/dwz.tests/pr24468.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/dwz.tests/pr24468.sh b/testsuite/dwz.tests/pr24468.sh index 4dac9a1..7990e83 100644 --- a/testsuite/dwz.tests/pr24468.sh +++ b/testsuite/dwz.tests/pr24468.sh @@ -8,6 +8,7 @@ dwz -m 3 1 2 readelf -wi 1 > READELF 2>/dev/null offsets=$(grep '(DW_TAG_partial_unit' READELF \ + | grep -v "DW_AT_import" \ | awk '{print $1}' \ | sed 's/.*.*//') for off in $offsets; do