From patchwork Wed Aug 19 12:53:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 8297 Received: (qmail 55377 invoked by alias); 19 Aug 2015 12:54:01 -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 55361 invoked by uid 89); 19 Aug 2015 12:54:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 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, 19 Aug 2015 12:53:59 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1ZS314-0000o4-QX from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Wed, 19 Aug 2015 06:02:54 -0700 Received: from opsys.world.mentorg.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Wed, 19 Aug 2015 05:53:55 -0700 From: Luis Machado To: Subject: [PATCH] Guard compile tests from running when unsupported + harden feature support check Date: Wed, 19 Aug 2015 09:53:45 -0300 Message-ID: <1439988825-19754-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes In our test environment i noticed a few compile tests, though unsupported, were still being executed and causing spurious FAIL's. The following change adds a missing feature support check to compile-ifunc.exp and also adds one more pattern to the feature support check function. With this change, none of the compile tests run when they're not supposed to. OK? gdb/testsuite/ChangeLog: 2015-08-19 Luis Machado * lib/gdb.exp (skip_compile_feature_tests): Check for unsupported compiler language. * gdb.compile/compile-ifunc.exp (with_test_prefix): Check feature support before running tests. --- gdb/testsuite/gdb.compile/compile-ifunc.exp | 5 +++++ gdb/testsuite/lib/gdb.exp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp index 026c62f..80d7bb4 100644 --- a/gdb/testsuite/gdb.compile/compile-ifunc.exp +++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp @@ -46,6 +46,11 @@ with_test_prefix "debug" { return -1 } + if {[skip_compile_feature_tests]} { + untested "compile command not supported (could not find libcc1 shared library?)" + return -1 + } + # gnu_ifunc (10): error: too many arguments to function 'gnu_ifunc' gdb_test_no_output "compile code resultvar = gnu_ifunc_alias (10);" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 56cde7a..fcf9cac 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3005,6 +3005,9 @@ proc skip_compile_feature_tests {} { -re "Command not supported on this host\\..*\r\n$gdb_prompt $" { set result 1 } + -re "No compiler support for this language\\.\r\n$gdb_prompt $" { + set result 1 + } -re "\r\n$gdb_prompt $" { } }