From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4F3FA386EC16 for ; Thu, 30 Jun 2022 12:15:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F3FA386EC16 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-400--RoWf8_yMZWhx2UI3abGYg-1; Thu, 30 Jun 2022 08:15:07 -0400 X-MC-Unique: -RoWf8_yMZWhx2UI3abGYg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD56685A581; Thu, 30 Jun 2022 12:15:06 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79B6F492C3B; Thu, 30 Jun 2022 12:15:06 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 25UCF32R4007132 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 Jun 2022 14:15:04 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 25UCF2UN4007131; Thu, 30 Jun 2022 14:15:02 +0200 Date: Thu, 30 Jun 2022 14:15:02 +0200 From: Jakub Jelinek To: Mark Wielaard Cc: dwz@sourceware.org, nickc@redhat.com Subject: Re: [PATCH] Workaround binutils readelf following and printing alt file. Message-ID: Reply-To: Jakub Jelinek References: <20220630120959.14957-1-mark@klomp.org> MIME-Version: 1.0 In-Reply-To: <20220630120959.14957-1-mark@klomp.org> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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: Thu, 30 Jun 2022 12:15:11 -0000 On Thu, Jun 30, 2022 at 02:09:59PM +0200, Mark Wielaard wrote: > Even with -wN readelf 2.38-15.fc37 follows and prints the > contents of the alt file. Workaround that by removing the > alt file in tests when we are done with it. This should be > fine even when binutils readelf gets fixed to not do that > with -wN (but maybe this is by design?) This fixes the > testsuite on Fedora rawhide. > > * testsuite/dwz.tests/cycle.sh: Remove 3 (alt) file > when done testing. > * testsuite/dwz.tests/odr-struct-multifile.sh: > Likewise. LGTM> > --- > > https://code.wildebeest.org/git/user/mjw/dwz/commit/?h=readelf-binutils-alt > > testsuite/dwz.tests/cycle.sh | 4 ++++ > testsuite/dwz.tests/odr-struct-multifile.sh | 3 +++ > 2 files changed, 7 insertions(+) > mode change 100644 => 100755 testsuite/dwz.tests/odr-struct-multifile.sh > > diff --git a/testsuite/dwz.tests/cycle.sh b/testsuite/dwz.tests/cycle.sh > index 17f8eb5..ce42521 100644 > --- a/testsuite/dwz.tests/cycle.sh > +++ b/testsuite/dwz.tests/cycle.sh > @@ -26,6 +26,10 @@ $execs/dwz-for-test -m 3 1 2 --devel-no-checksum-cycle-opt --devel-ignore-size > cnt=$(readelf -wi 3 | grep -c "DW_AT_name.*: s$") > [ $cnt -eq 1 ] > > +# Even with -wN readelf 2.38-15.fc37 follows and prints the contents > +# of the alt file. So make sure it cannot do that by removing it. > +rm 3 > + > cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*: s$" || true) > [ $cnt -eq 0 ] > > diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh > old mode 100644 > new mode 100755 > index 159cbc3..5961abf > --- a/testsuite/dwz.tests/odr-struct-multifile.sh > +++ b/testsuite/dwz.tests/odr-struct-multifile.sh > @@ -44,6 +44,9 @@ for name in member_one member_two member_three member_four; do > [ $cnt -eq 1 ] > done > > +# Even with -wN readelf 2.38-15.fc37 follows and prints the contents > +# of the alt file. So make sure it cannot do that by removing it. > +rm 3 > > for name in aaa bbb ccc; do > cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true) > -- > 2.18.4 Jakub