From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59510 invoked by alias); 26 Sep 2018 11:50:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 59493 invoked by uid 89); 26 Sep 2018 11:50:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=pay X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Sep 2018 11:50:47 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 06BC720B; Wed, 26 Sep 2018 13:50:45 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id hAyqg-IBWdRl; Wed, 26 Sep 2018 13:50:40 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 8D9FA20A; Wed, 26 Sep 2018 13:50:40 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id w8QBocO3008723; Wed, 26 Sep 2018 13:50:38 +0200 (MEST) From: Rainer Orth To: Sandra Loosemore Cc: "gdb-patches\@sourceware.org" Subject: Re: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails References: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> Date: Wed, 26 Sep 2018 11:50:00 -0000 In-Reply-To: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> (Sandra Loosemore's message of "Tue, 25 Sep 2018 23:08:45 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00843.txt.bz2 Hi Sandra, > gdb.base/gnu-ifunc.exp doesn't fail gracefully on targets that don't > support this feature -- on nios2-linux-gnu I've seen TCL errors from trying > to copy the nonexistent shared library that fails to build to the target. I just tried the patch on Solaris which also doesn't have (and never will have) ifunc support: unfortunately, there's still lots of noise in gdb.sum: Running /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc.exp ... gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccyG.via.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-0.so ld: warning: relocation error: 0xa: file /var/tmp//ccyG.via.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-0.so warning: Text relocation remains referenced against symbol offset in file gnu_ifunc 0x55 /var/tmp//ccyG.via.o gnu_ifunc 0x81 /var/tmp//ccyG.via.o UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=0: final_debug=0: failed to compile testcase gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccD64Npa.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-1.so ld: warning: relocation error: 0xa: file /var/tmp//ccD64Npa.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-0-1.so warning: Text relocation remains referenced against symbol offset in file gnu_ifunc 0x55 /var/tmp//ccD64Npa.o gnu_ifunc 0x81 /var/tmp//ccD64Npa.o UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=0: final_debug=1: failed to compile testcase gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccLB0Wba.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-0.so ld: warning: relocation error: 0xa: file /var/tmp//ccLB0Wba.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-0.so warning: Text relocation remains referenced against symbol offset in file gnu_ifunc 0x55 /var/tmp//ccLB0Wba.o gnu_ifunc 0x81 /var/tmp//ccLB0Wba.o UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=1: final_debug=0: failed to compile testcase gdb compile failed, ld: warning: relocation error: 0xa: file /var/tmp//ccxKrUka.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-1.so ld: warning: relocation error: 0xa: file /var/tmp//ccxKrUka.o: symbol gnu_ifunc: unexpected symbol referenced from file /vol/obj/gnu/gdb/gdb/11.5-amd64-local/gdb/testsuite/outputs/gdb.base/gnu-ifunc/gnu-ifunc-lib-0-1-1.so warning: Text relocation remains referenced against symbol offset in file gnu_ifunc 0x55 /var/tmp//ccxKrUka.o gnu_ifunc 0x81 /var/tmp//ccxKrUka.o UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=0: resolver_debug=1: final_debug=1: failed to compile testcase gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target __typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver"))); ^~~~~~~~~ UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=0: final_debug=0: failed to compile testcase gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target __typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver"))); ^~~~~~~~~ UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=0: final_debug=1: failed to compile testcase gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target __typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver"))); ^~~~~~~~~ UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=1: final_debug=0: failed to compile testcase gdb compile failed, /vol/src/gnu/gdb/hg/master/local/gdb/testsuite/gdb.base/gnu-ifunc-lib.c:44:22: error: ifunc is not supported on this target __typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver"))); ^~~~~~~~~ UNTESTED: gdb.base/gnu-ifunc.exp: resolver_attr=1: resolver_debug=1: final_debug=1: failed to compile testcase PASS: gdb.base/gnu-ifunc.exp: static: static gnu_ifunc === gdb Summary === # of expected passes 1 # of untested testcases 8 It would be good to further reduce this. Btw., shouldn't gdb.compile/compile-ifunc.exp get similar treatment? > I see that ld/testsuite/ld-ifunc/ifunc.exp explicitly lists all the targets > where IFUNC is expected to work, but it seemed more maintainable to me to > tweak these gdb tests to pay attention to the return status from trying to > build the test cases. Is this OK to commit? gcc has gcc/testsuite/lib/target-supports.exp (check_ifunc_available) instead, again a compile test instead of a hardcoded list. I wonder, though, if it wouldn't be better to run such a check early in the two gdb ifunc tests and skip them if that fails, rather than producing lots of noise and UNSUPPORTED tests? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University