From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 71F1C3858D39 for ; Fri, 1 Jul 2022 07:43:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 71F1C3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x0e.wildebeest.org [172.31.17.144]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 8FC9330198EA; Fri, 1 Jul 2022 09:43:23 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id EF9832E8225F; Fri, 1 Jul 2022 09:43:22 +0200 (CEST) Date: Fri, 1 Jul 2022 09:43:22 +0200 From: Mark Wielaard To: Martin =?utf-8?B?TGnFoWth?= Cc: dwz@sourceware.org, Tom de Vries Subject: Re: =?utf-8?B?4pi6IEJ1aWxkYm8=?= =?utf-8?Q?t?= (GNU Toolchain): dwz - build successful (master) Message-ID: References: <20220625215613.349A43851AA8@sourceware.org> <8f2e7627-8084-1148-363f-6ac3b71b87f4@suse.cz> <9b8016f2-b9f4-b310-4a73-692f70e32799@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: 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: Fri, 01 Jul 2022 07:43:27 -0000 Hi Martin, On Fri, Jul 01, 2022 at 08:42:00AM +0200, Martin Liška wrote: > > So I think that should also be a passing condition (no decls left). > > It would be good to make sure they were there at the start though. > > Oh, I see, so please try the updated version of the patch? Looks good to me. And makes the test PASS locally. Thanks, Mark > From e08b4e361546d4db773b3948241b586fa5ea55d7 Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Thu, 30 Jun 2022 16:21:58 +0200 > Subject: [PATCH] testsuite: verify directly merged DW_AT_declarations > > Do not rely on number of DW_AT_declaration and check symbols > instead. > --- > testsuite/dwz.tests/odr-struct-ns.sh | 14 +++++++++----- > testsuite/dwz.tests/odr-struct.sh | 14 +++++++++----- > 2 files changed, 18 insertions(+), 10 deletions(-) > > diff --git a/testsuite/dwz.tests/odr-struct-ns.sh b/testsuite/dwz.tests/odr-struct-ns.sh > index 4fd00af..c6e0f1d 100644 > --- a/testsuite/dwz.tests/odr-struct-ns.sh > +++ b/testsuite/dwz.tests/odr-struct-ns.sh > @@ -21,7 +21,10 @@ for name in member_one member_two member_three member_four; do > esac > done > > -decl_cnt=$(readelf -wi 1 | grep -c "DW_AT_declaration" || true) > +# Check that bbb and ccc are present as DW_AT_declaration > +readelf -wi 1 | grep -3 DW_AT_declaration > decls > +grep bbb decls >/dev/null > +grep ccc decls >/dev/null > > $execs/dwz-for-test --odr 1 > > @@ -38,8 +41,9 @@ for name in member_one member_two member_three member_four; do > done > > # We expect two decls to be removed, for bbb and ccc. > -expected_decl_cnt=$(($decl_cnt - 2)) > -decl_cnt=$(readelf -wi 1 | grep -c "DW_AT_declaration" || true) > -[ $expected_decl_cnt -eq $decl_cnt ] > +readelf -wi 1 | grep -3 DW_AT_declaration > decls || true > > -rm -f 1 > +if grep bbb decls >/dev/null ; then exit 1; fi > +if grep ccc decls >/dev/null ; then exit 2; fi > + > +rm -f 1 decls > diff --git a/testsuite/dwz.tests/odr-struct.sh b/testsuite/dwz.tests/odr-struct.sh > index d0fddf9..c6793f9 100644 > --- a/testsuite/dwz.tests/odr-struct.sh > +++ b/testsuite/dwz.tests/odr-struct.sh > @@ -21,7 +21,10 @@ for name in member_one member_two member_three member_four; do > esac > done > > -decl_cnt=$(readelf -wi 1 | grep -c "DW_AT_declaration" || true) > +# Check that bbb and ccc are present as DW_AT_declaration > +readelf -wi 1 | grep -3 DW_AT_declaration > decls > +grep bbb decls >/dev/null > +grep ccc decls >/dev/null > > $execs/dwz-for-test --odr 1 > > @@ -38,8 +41,9 @@ for name in member_one member_two member_three member_four; do > done > > # We expect two decls to be removed, for bbb and ccc. > -expected_decl_cnt=$(($decl_cnt - 2)) > -decl_cnt=$(readelf -wi 1 | grep -c "DW_AT_declaration" || true) > -[ $expected_decl_cnt -eq $decl_cnt ] > +readelf -wi 1 | grep -3 DW_AT_declaration > decls || true > > -rm -f 1 > +if grep bbb decls >/dev/null ; then exit 1; fi > +if grep ccc decls >/dev/null ; then exit 2; fi > + > +rm -f 1 decls > -- > 2.36.1 >