From patchwork Thu Mar 4 16:04:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 42241 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A52E839C5017; Thu, 4 Mar 2021 16:04:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A52E839C5017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614873871; bh=GgCFPwAQGHvgqKgSlkTbdG1somNxZH7BUz4vryndLsg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=vurI5Y6SuUMzeIbIjfCUlN9JIB0LxxRfwSxSdTOewEOUifnWWxzIxR04X2eKKl/DO xiVOlVWywvKndoogTzFDS6Q7ixEG8VmZ6p5JrtMfQpD3zQ6/U5tWmf0utZnptWtHrt kRSuYPT0UwfYcTFTZd+QfMiizwPIa7XrUsbxuSIE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 58D05384BC30 for ; Thu, 4 Mar 2021 16:04:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 58D05384BC30 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-489-qKTnX6EzN0WbVBOEOvpfNw-1; Thu, 04 Mar 2021 11:04:26 -0500 X-MC-Unique: qKTnX6EzN0WbVBOEOvpfNw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 413E91409 for ; Thu, 4 Mar 2021 16:04:25 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A9912B9FA for ; Thu, 4 Mar 2021 16:04:24 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] math: test-matherr and test-matherr-2 can be regular tests Date: Thu, 04 Mar 2021 17:04:32 +0100 Message-ID: <87czwekir3.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 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_LOW, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" compat_symbol_reference is now available without tests-internal. Do not build the test at all on glibc versions that lack the symbols, to avoid spurious UNSUPPORTED results. Reviewed-by: Adhemerval Zanella --- math/Makefile | 6 +++++- math/test-matherr.c | 13 ++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/math/Makefile b/math/Makefile index 2978abf526..98b26e4f71 100644 --- a/math/Makefile +++ b/math/Makefile @@ -249,7 +249,11 @@ tests-static = test-fpucw-static test-fpucw-ieee-static \ test-signgam-uchar-static test-signgam-uchar-init-static \ test-signgam-uint-static test-signgam-uint-init-static \ test-signgam-ullong-static test-signgam-ullong-init-static -tests-internal = test-matherr test-matherr-2 + +# The tested symbols matherr, _LIB_VERSION have been removed in glibc 2.27. +ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) +tests += test-matherr test-matherr-2 +endif # These tests use internal (unexported) GMP functions and are linked # statically to obtain access to these functions. diff --git a/math/test-matherr.c b/math/test-matherr.c index e68a4a3af1..aed396e420 100644 --- a/math/test-matherr.c +++ b/math/test-matherr.c @@ -23,10 +23,8 @@ #include #include -#if TEST_COMPAT (libm, GLIBC_2_0, GLIBC_2_27) - -# undef matherr -# undef _LIB_VERSION +#undef matherr +#undef _LIB_VERSION compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0); compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0); @@ -47,12 +45,5 @@ do_test (void) acos (2.0); return fail; } -#else -static int -do_test (void) -{ - return 77; -} -#endif #include