From owner-svn-src-all@freebsd.org Sat Feb 4 17:06:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DEC1CD0D03; Sat, 4 Feb 2017 17:06:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D711E49; Sat, 4 Feb 2017 17:06:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v14H6qco083860; Sat, 4 Feb 2017 17:06:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v14H6peL083858; Sat, 4 Feb 2017 17:06:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201702041706.v14H6peL083858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 4 Feb 2017 17:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r313237 - stable/11/lib/msun/tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2017 17:06:53 -0000 Author: ngie Date: Sat Feb 4 17:06:51 2017 New Revision: 313237 URL: https://svnweb.freebsd.org/changeset/base/313237 Log: MFC r303841,r312012,r312213: r303841 (by bdrewery): Revert r298434 which should be fixed by r301287, r301394, and r301403. PR: 208703, 208963 r312012: fmaxmin_test still fails with clang 3.9.x.. bypass the test PR: 208703 r312213: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. PR: 208703 Modified: stable/11/lib/msun/tests/Makefile stable/11/lib/msun/tests/fmaxmin_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/msun/tests/Makefile ============================================================================== --- stable/11/lib/msun/tests/Makefile Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/Makefile Sat Feb 4 17:06:51 2017 (r313237) @@ -52,16 +52,7 @@ TAP_TESTS_C+= ctrig_test TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test -# clang 3.8.0 fails always fails this test. See: bug 208703 -# -# XXX: depending on this compiler version check doesn't work at -# buildworld/installworld time, which results in jenkins failures (bug 208963) -# because the build is run on a 10.x instance, which has an older clang -# compiler. -# -#.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800) -#TAP_TESTS_C+= fmaxmin_test -#.endif +TAP_TESTS_C+= fmaxmin_test TAP_TESTS_C+= ilogb_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test Modified: stable/11/lib/msun/tests/fmaxmin_test.c ============================================================================== --- stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:02:54 2017 (r313236) +++ stable/11/lib/msun/tests/fmaxmin_test.c Sat Feb 4 17:06:51 2017 (r313237) @@ -86,6 +86,8 @@ testall_r(long double big, long double s return (ok); } +const char *comment = NULL; + /* * Test all the functions: fmaxf, fmax, fmaxl, fminf, fmin, and fminl, * in all rounding modes and with the arguments in different orders. @@ -107,10 +109,17 @@ testall(int testnum, long double big, lo break; } } - printf("%sok %d - big = %.20Lg, small = %.20Lg\n", - (i == 4) ? "" : "not ", testnum, big, small); + printf("%sok %d - big = %.20Lg, small = %.20Lg%s\n", + (i == 4) ? "" : "not ", testnum, big, small, + comment == NULL ? "" : comment); } +/* Clang 3.8.0+ fails the invariants for testcase 6, 7, 10, and 11. */ +#if defined(__clang__) && \ + (__clang_major__ >= 3 && __clang_minor__ >= 8 && __clang_patchlevel__ >= 0) +#define affected_by_bug_208703 +#endif + int main(int argc, char *argv[]) { @@ -122,15 +131,23 @@ main(int argc, char *argv[]) testall(3, nextafterf(42.0, INFINITY), 42.0); testall(4, -5.0, -5.0); testall(5, -3.0, -4.0); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 6-7 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(6, 1.0, NAN); testall(7, INFINITY, NAN); + comment = NULL; testall(8, INFINITY, 1.0); testall(9, -3.0, -INFINITY); testall(10, 3.0, -INFINITY); +#ifdef affected_by_bug_208703 + comment = "# TODO: testcase 11-12 fails invariant with clang 3.8+ (bug 208703)"; +#endif testall(11, NAN, NAN); /* This test isn't strictly required to work by C99. */ testall(12, 0.0, -0.0); + comment = NULL; return (0); }