llvm / llvm/llvm-project

[libc][math] NextAfter and NextToward tests are a bit flaky on Windows clang-cl.

Open
#199,738 1 comment 0 reactions 0 assignees View on GitHub
libc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

When switching libc's overlay precommit CIs to use docker image for linux with https://github.com/llvm/llvm-project/pull/199294, NextAfter and NextToward smoke tests mysteriously start to fail,
even though they have been passing before, and the changes suppose to be no-op on Windows CIs.

It was built with clang-cl 20.1.8, and I was not able to reproduce it locally. Those tests will be disabled for clang-cl temporarily to unblock https://github.com/llvm/llvm-project/pull/199294. Further investigation will be needed to re-enable the tests for clang-cl.

Error logs:
```
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nextafter_test.__unit__.__build__.exe (335 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nextafter_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextAfterTest.TestNaN

[ OK ] LlvmLibcNextAfterTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextAfterTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextAfterTest.h:158: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextAfterTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nextafterbf16_test.__unit__.__build__.exe (336 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nextafterbf16_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextAfterTest.TestNaN

[ OK ] LlvmLibcNextAfterTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextAfterTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextAfterTest.h:158: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextAfterTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nextafterf_test.__unit__.__build__.exe (337 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nextafterf_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextAfterTest.TestNaN

[ OK ] LlvmLibcNextAfterTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextAfterTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextAfterTest.h:158: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextAfterTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nextafterl_test.__unit__.__build__.exe (338 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nextafterl_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextAfterTest.TestNaN

[ OK ] LlvmLibcNextAfterTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextAfterTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextAfterTest.h:158: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextAfterTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nexttoward_test.__unit__.__build__.exe (340 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nexttoward_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextTowardTest.TestNaN

[ OK ] LlvmLibcNextTowardTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextTowardTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextTowardTest.h:165: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextTowardTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardbf16_test.__unit__.__build__.exe (341 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardbf16_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextTowardTest.TestNaN

[ OK ] LlvmLibcNextTowardTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextTowardTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextTowardTest.h:165: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextTowardTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardf_test.__unit__.__build__.exe (342 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardf_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextTowardTest.TestNaN

[ OK ] LlvmLibcNextTowardTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextTowardTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextTowardTest.h:165: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextTowardTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
FAIL: libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardl_test.__unit__.__build__.exe (343 of 483)
******************** TEST 'libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardl_test.__unit__.__build__.exe' FAILED ********************
[==========] Running 2 tests from 1 test suite.

[ RUN ] LlvmLibcNextTowardTest.TestNaN

[ OK ] LlvmLibcNextTowardTest.TestNaN (0 ns)

[ RUN ] LlvmLibcNextTowardTest.TestBoundaries

D:\a\llvm-project\llvm-project\libc\test\src\math\smoke\NextTowardTest.h:165: FAILURE

Expected: __llvm_libc_23_0_0_git::fputil::test_except( static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002))) & ((0x00000004) ? (0x00000004) : static_cast((0x00000008 | 0x00000001 | 0x00000010 | 0x00000004 | 0x00000002)))

Which is: 0

To be equal to: (0x00000004)

Which is: 4

[ FAILED ] LlvmLibcNextTowardTest.TestBoundaries

Ran 2 tests. PASS: 1 FAIL: 1

********************
********************
Failed Tests (8):
libc :: src/math/smoke/libc.test.src.math.smoke.nextafter_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nextafterbf16_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nextafterf_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nextafterl_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nexttoward_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardbf16_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardf_test.__unit__.__build__.exe
libc :: src/math/smoke/libc.test.src.math.smoke.nexttowardl_test.__unit__.__build__.exe

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.