From patchwork Wed Sep 26 05:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 29536 Received: (qmail 100863 invoked by alias); 26 Sep 2018 05:08:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 100854 invoked by uid 89); 26 Sep 2018 05:08:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=sandra@codesourcery.com, sk:sandra@, sandracodesourcerycom, U*sandra X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Sep 2018 05:08:52 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g524A-0002vj-QG from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Tue, 25 Sep 2018 22:08:50 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 25 Sep 2018 22:08:48 -0700 To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails Message-ID: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> Date: Tue, 25 Sep 2018 23:08:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 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 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? -Sandra commit 1e4269b8d83d6c8cdb5351efa2b346a714a250aa Author: Sandra Loosemore Date: Tue Sep 25 21:54:52 2018 -0700 Skip gnu-ifunc tests if building the testcase fails. 2018-09-25 Sandra Loosemore * gdb.base/gnu-ifunc.exp: Skip tests if building testcase fails. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d15fcff..72bf6bd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-09-25 Sandra Loosemore + + * gdb.base/gnu-ifunc.exp: Skip tests if building testcase fails. + 2018-09-24 Jozef Lawrynowicz PR gdb/20948 diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp index d6ec698..ffaf254 100644 --- a/gdb/testsuite/gdb.base/gnu-ifunc.exp +++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp @@ -365,9 +365,10 @@ proc misc_tests {resolver_attr resolver_debug final_debug} { foreach_with_prefix resolver_attr {0 1} { foreach_with_prefix resolver_debug {0 1} { foreach_with_prefix final_debug {0 1} { - build $resolver_attr $resolver_debug $final_debug - misc_tests $resolver_attr $resolver_debug $final_debug - set-break $resolver_attr $resolver_debug $final_debug + if { [build $resolver_attr $resolver_debug $final_debug] != 0 } { + misc_tests $resolver_attr $resolver_debug $final_debug + set-break $resolver_attr $resolver_debug $final_debug + } } } }