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 743273857039 for ; Tue, 9 Feb 2021 22:41:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 743273857039 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 99141AD62; Tue, 9 Feb 2021 22:41:33 +0000 (UTC) Date: Tue, 9 Feb 2021 23:41:31 +0100 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed][testsuite] Fix tcl error in dwz-tests.exp Message-ID: <20210209224130.GA4827@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.3 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: Tue, 09 Feb 2021 22:41:35 -0000 Hi, When running: ... $ make check CC="clang -gdwarf-5" ... I run into: ... ERROR: tcl error sourcing testsuite/dwz.tests/dwz-tests.exp. ERROR: 2 readelf: Warning: DIE at offset 0xe6 refers to abbreviation number 8 \ which does not exist while executing "exec readelf -wi min | grep DW_AT_name | grep -c / " ... Fix this by wrapping the exec in a catch. Committed to trunk. Thanks, - Tom [testsuite] Fix tcl error in dwz-tests.exp 2021-02-09 Tom de Vries * testsuite/dwz.tests/dwz-tests.exp: Wrap "exec readelf" in catch. --- testsuite/dwz.tests/dwz-tests.exp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp index 2e5d19a..48c0015 100644 --- a/testsuite/dwz.tests/dwz-tests.exp +++ b/testsuite/dwz.tests/dwz-tests.exp @@ -24,11 +24,16 @@ foreach test $tests { lappend required_execs "py-section-script" } if { $basename == "pr24341.sh" } { - # The exec min is used for the regression test for pr24341, but it only - # functions as such if the DWARF only contains the CUs of the test-case - # itself. - set matches [exec readelf -wi min | grep DW_AT_name | grep -c / ] + if { [catch {exec readelf -wi min | grep DW_AT_name | grep -c / } matches] } { + # Some error occurred in the supported test, f.i. DWARF in min + # unsupported by readelf. + unsupported "$test" + continue + } if { $matches != 2 } { + # The exec min is used for the regression test for pr24341, but it + # only functions as such if the DWARF only contains the CUs of the + # test-case itself. unsupported "$test" continue }