Skip to content

Commit dfbf874

Browse files
committed
lib/msun/tests: xfail failing invtrig_test cases on non-x86
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid unexpected abort. PR: 290099 Signed-off-by: Siva Mahadevan <[email protected]> Sponsored by: The FreeBSD Foundation
1 parent ca72350 commit dfbf874

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

lib/msun/tests/invtrig_test.c

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
#define test_tol(func, x, result, tol, excepts) do { \
5353
volatile long double _in = (x), _out = (result); \
5454
ATF_REQUIRE_EQ(0, feclearexcept(FE_ALL_EXCEPT)); \
55-
CHECK_FPEQUAL_TOL(func(_in), _out, (tol), CS_BOTH); \
56-
CHECK_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \
55+
REQUIRE_FPEQUAL_TOL(func(_in), _out, (tol), CS_BOTH); \
56+
REQUIRE_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \
5757
#func, #x); \
5858
} while (0)
5959
#define test(func, x, result, excepts) \
@@ -82,8 +82,8 @@
8282
#define test2_tol(func, y, x, result, tol, excepts) do { \
8383
volatile long double _iny = (y), _inx = (x), _out = (result); \
8484
ATF_REQUIRE_EQ(0, feclearexcept(FE_ALL_EXCEPT)); \
85-
CHECK_FPEQUAL_TOL(func(_iny, _inx), _out, (tol), CS_BOTH); \
86-
CHECK_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \
85+
REQUIRE_FPEQUAL_TOL(func(_iny, _inx), _out, (tol), CS_BOTH); \
86+
REQUIRE_FP_EXCEPTIONS_MSG(excepts, ALL_STD_EXCEPT, "for %s(%s)", \
8787
#func, #x); \
8888
} while (0)
8989
#define test2(func, y, x, result, excepts) \
@@ -125,7 +125,9 @@ sqrt2m1 = 4.14213562373095048801688724209698081e-01L;
125125
ATF_TC_WITHOUT_HEAD(special);
126126
ATF_TC_BODY(special, tc)
127127
{
128-
128+
#if defined(__aarch64__) || defined(__riscv)
129+
atf_tc_expect_fail("https://bugs.freebsd.org/283017");
130+
#endif
129131
testall(asin, 0.0, 0.0, 0);
130132
testall(acos, 0.0, pi / 2, FE_INEXACT);
131133
testall(atan, 0.0, 0.0, 0);
@@ -238,7 +240,9 @@ ATF_TC_BODY(special_atan2, tc)
238240
ATF_TC_WITHOUT_HEAD(accuracy);
239241
ATF_TC_BODY(accuracy, tc)
240242
{
241-
243+
#if defined(__riscv)
244+
atf_tc_expect_fail("https://bugs.freebsd.org/290099");
245+
#endif
242246
/* We expect correctly rounded results for these basic cases. */
243247
testall(asin, 1.0, pi / 2, FE_INEXACT);
244248
testall(acos, 1.0, 0, 0);
@@ -276,7 +280,9 @@ ATF_TC_BODY(accuracy, tc)
276280
ATF_TC_WITHOUT_HEAD(p2x_atan2);
277281
ATF_TC_BODY(p2x_atan2, tc)
278282
{
279-
283+
#if defined(__riscv)
284+
atf_tc_expect_fail("https://bugs.freebsd.org/290099");
285+
#endif
280286
testall2(atan2, 1.0, 1.0, pi / 4, FE_INEXACT);
281287
testall2(atan2, 1.0, -1.0, c3pi / 4, FE_INEXACT);
282288
testall2(atan2, -1.0, 1.0, -pi / 4, FE_INEXACT);
@@ -299,6 +305,9 @@ ATF_TC_BODY(p2x_atan2, tc)
299305
ATF_TC_WITHOUT_HEAD(tiny);
300306
ATF_TC_BODY(tiny, tc)
301307
{
308+
#if defined(__aarch64__) || defined(__riscv)
309+
atf_tc_expect_fail("https://bugs.freebsd.org/283017");
310+
#endif
302311
float tiny = 0x1.23456p-120f;
303312

304313
testall(asin, tiny, tiny, FE_INEXACT);
@@ -436,6 +445,9 @@ tanatanl(long double x)
436445
ATF_TC_WITHOUT_HEAD(inverse);
437446
ATF_TC_BODY(inverse, tc)
438447
{
448+
#if defined(__riscv)
449+
atf_tc_expect_death("https://bugs.freebsd.org/290099");
450+
#endif
439451
float i;
440452

441453
for (i = -1; i <= 1; i += 0x1.0p-12f) {

0 commit comments

Comments
 (0)