[libc-commits] [libc] [libc] Enable UNIT_TEST_ONLY tests in hermetic mode (PR #213860)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Thu Aug 6 00:06:21 PDT 2026
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `libc` at step 3 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/33373
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 3 (annotate) failure: 'python ../llvm.src/offload/ci/openmp-offload-amdgpu-libc-runtime.py ...' (failure)
...
[ 67%/5.697s :: 853->130->2064 (of 3046)] Building CXX object libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.qsort_r_test.__hermetic__.__build__.dir/qsort_r_test.cpp.o
[ 67%/5.697s :: 852->130->2065 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.fpclassifyf_test.__hermetic__.libc.a
[ 67%/5.699s :: 851->130->2066 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.fpclassifyl_test.__hermetic__.libc.a
[ 67%/5.699s :: 850->130->2067 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.fsub_test.__hermetic__.__build__.dir/fsub_test.cpp.o
[ 67%/5.701s :: 849->130->2068 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strlcat_test.__hermetic__.__build__.dir/strlcat_test.cpp.o
[ 67%/5.703s :: 848->130->2069 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strnlen_test.__hermetic__.__build__.dir/strnlen_test.cpp.o
[ 67%/5.703s :: 847->130->2070 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.scalbnbf16_test.__hermetic__.__build__.dir/scalbnbf16_test.cpp.o
[ 67%/5.705s :: 846->130->2071 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszero_test.__hermetic__.libc.a
[ 68%/5.706s :: 845->130->2072 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszerol_test.__hermetic__.libc.a
[ 68%/5.707s :: 844->130->2073 (of 3046)] Building CXX object libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/build/llvm.build/./bin/clang++ --target=amdgpu-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_24_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc -isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/build/llvm.build/include/amdgpu-amd-amdhsa -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -UNDEBUG --target=amdgpu-amd-amdhsa -D__LIBC_USE_BUILTIN_ISNAN -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=element -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=element "-DLIBC_MATH=((LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT))" -fno-math-errno -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SHARED -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -DLIBC_TARGET_OS_IS_GPU -DLIBC_TEST_FLOAT_RANGE_COUNT=1231 -DLIBC_TEST_SUBPROCESS_TESTS=0 -DLIBC_TEST_UNDER_EMULATOR -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ffixed-point -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_COMPILER_HAS_STDC_FENV_ACCESS -DLIBC_TEST=HERMETIC -Wno-multi-gpu -nogpulib -mcpu=native -flto -mcode-object-version=6 -MD -MT libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o -MF libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o.d -o libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o -c /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:21:33: error: use of undeclared identifier 'CPU_ZERO'
21 | static_assert(SameType<decltype(CPU_ZERO((cpu_set_t *)0)), void>::value, "");
| ^~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:22:33: error: use of undeclared identifier 'CPU_COUNT'
22 | static_assert(SameType<decltype(CPU_COUNT((cpu_set_t *)0)), int>::value, "");
| ^~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:23:33: error: use of undeclared identifier 'CPU_SET'
23 | static_assert(SameType<decltype(CPU_SET(0, (cpu_set_t *)0)), void>::value, "");
| ^~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:24:33: error: use of undeclared identifier 'CPU_ISSET'
24 | static_assert(SameType<decltype(CPU_ISSET(0, (cpu_set_t *)0)), int>::value, "");
| ^~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:29:33: error: use of undeclared identifier 'sched_getscheduler'
29 | static_assert(SameType<decltype(sched_getscheduler), SchedGetSchedulerT>::value,
| ^~~~~~~~~~~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:31:33: error: use of undeclared identifier 'sched_setscheduler'
31 | static_assert(SameType<decltype(sched_setscheduler), SchedSetSchedulerT>::value,
| ^~~~~~~~~~~~~~~~~~
6 errors generated.
[ 68%/5.707s :: 844->129->2074 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszerof_test.__hermetic__.libc.a
[ 68%/5.710s :: 844->128->2075 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.netinet_in_test.__hermetic__.libc.a
[ 68%/5.710s :: 844->127->2076 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbit_test.__hermetic__.libc.a
[ 68%/5.713s :: 844->126->2077 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strnlen_s_test.__hermetic__.__build__.dir/strnlen_s_test.cpp.o
[ 68%/5.713s :: 844->125->2078 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strlen_test.__hermetic__.__build__.dir/strlen_test.cpp.o
[ 68%/5.716s :: 844->124->2079 (of 3046)] Building CXX object libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strtold_test.__hermetic__.__build__.dir/strtold_test.cpp.o
[ 68%/5.716s :: 844->123->2080 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbitf_test.__hermetic__.libc.a
[ 68%/5.718s :: 844->122->2081 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memccpy_test.__hermetic__.__build__.dir/memccpy_test.cpp.o
[ 68%/5.720s :: 844->121->2082 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncmp_test.__hermetic__.__build__.dir/strncmp_test.cpp.o
[ 68%/5.722s :: 844->120->2083 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memchr_test.__hermetic__.__build__.dir/memchr_test.cpp.o
[ 68%/5.724s :: 844->119->2084 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncat_test.__hermetic__.__build__.dir/strncat_test.cpp.o
[ 68%/5.725s :: 844->118->2085 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.cbrtbf16_test.__hermetic__.__build__.dir/cbrtbf16_test.cpp.o
[ 68%/5.726s :: 844->117->2086 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memmem_test.__hermetic__.__build__.dir/memmem_test.cpp.o
[ 68%/5.726s :: 844->116->2087 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbitl_test.__hermetic__.libc.a
[ 68%/5.726s :: 844->115->2088 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.isnan_test.__hermetic__.libc.a
[ 68%/5.729s :: 844->114->2089 (of 3046)] Building CXX object libc/test/src/wchar/CMakeFiles/libc.test.src.wchar.wctob_test.__hermetic__.__build__.dir/wctob_test.cpp.o
[ 68%/5.731s :: 844->113->2090 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.isnanf_test.__hermetic__.libc.a
[ 68%/5.733s :: 844->112->2091 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncpy_test.__hermetic__.__build__.dir/strncpy_test.cpp.o
Step 12 (run check-libc-amdgpu-amd-amdhsa) failure: run check-libc-amdgpu-amd-amdhsa (failure)
...
[ 67%/5.697s :: 853->130->2064 (of 3046)] Building CXX object libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.qsort_r_test.__hermetic__.__build__.dir/qsort_r_test.cpp.o
[ 67%/5.697s :: 852->130->2065 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.fpclassifyf_test.__hermetic__.libc.a
[ 67%/5.699s :: 851->130->2066 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.fpclassifyl_test.__hermetic__.libc.a
[ 67%/5.699s :: 850->130->2067 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.fsub_test.__hermetic__.__build__.dir/fsub_test.cpp.o
[ 67%/5.701s :: 849->130->2068 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strlcat_test.__hermetic__.__build__.dir/strlcat_test.cpp.o
[ 67%/5.703s :: 848->130->2069 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strnlen_test.__hermetic__.__build__.dir/strnlen_test.cpp.o
[ 67%/5.703s :: 847->130->2070 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.scalbnbf16_test.__hermetic__.__build__.dir/scalbnbf16_test.cpp.o
[ 67%/5.705s :: 846->130->2071 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszero_test.__hermetic__.libc.a
[ 68%/5.706s :: 845->130->2072 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszerol_test.__hermetic__.libc.a
[ 68%/5.707s :: 844->130->2073 (of 3046)] Building CXX object libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/build/llvm.build/./bin/clang++ --target=amdgpu-amd-amdhsa -DLIBC_NAMESPACE=__llvm_libc_24_0_0_git -D__LIBC_USE_FLOAT16_CONVERSION -I/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc -isystem /home/botworker/builds/openmp-offload-amdgpu-runtime-2/build/llvm.build/include/amdgpu-amd-amdhsa -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -UNDEBUG --target=amdgpu-amd-amdhsa -D__LIBC_USE_BUILTIN_ISNAN -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=element -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=element "-DLIBC_MATH=((LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_INTERMEDIATE_COMP_IN_FLOAT | LIBC_MATH_SMALL_TABLES | LIBC_MATH_NO_ERRNO | LIBC_MATH_NO_EXCEPT))" -fno-math-errno -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_SHARED -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -DLIBC_TARGET_OS_IS_GPU -DLIBC_TEST_FLOAT_RANGE_COUNT=1231 -DLIBC_TEST_SUBPROCESS_TESTS=0 -DLIBC_TEST_UNDER_EMULATOR -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ffixed-point -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -DLIBC_COMPILER_HAS_STDC_FENV_ACCESS -DLIBC_TEST=HERMETIC -Wno-multi-gpu -nogpulib -mcpu=native -flto -mcode-object-version=6 -MD -MT libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o -MF libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o.d -o libc/test/include/CMakeFiles/libc.test.include.sched_test.__hermetic__.__build__.dir/sched_test.cpp.o -c /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:21:33: error: use of undeclared identifier 'CPU_ZERO'
21 | static_assert(SameType<decltype(CPU_ZERO((cpu_set_t *)0)), void>::value, "");
| ^~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:22:33: error: use of undeclared identifier 'CPU_COUNT'
22 | static_assert(SameType<decltype(CPU_COUNT((cpu_set_t *)0)), int>::value, "");
| ^~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:23:33: error: use of undeclared identifier 'CPU_SET'
23 | static_assert(SameType<decltype(CPU_SET(0, (cpu_set_t *)0)), void>::value, "");
| ^~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:24:33: error: use of undeclared identifier 'CPU_ISSET'
24 | static_assert(SameType<decltype(CPU_ISSET(0, (cpu_set_t *)0)), int>::value, "");
| ^~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:29:33: error: use of undeclared identifier 'sched_getscheduler'
29 | static_assert(SameType<decltype(sched_getscheduler), SchedGetSchedulerT>::value,
| ^~~~~~~~~~~~~~~~~~
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/include/sched_test.cpp:31:33: error: use of undeclared identifier 'sched_setscheduler'
31 | static_assert(SameType<decltype(sched_setscheduler), SchedSetSchedulerT>::value,
| ^~~~~~~~~~~~~~~~~~
6 errors generated.
[ 68%/5.707s :: 844->129->2074 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.iszerof_test.__hermetic__.libc.a
[ 68%/5.710s :: 844->128->2075 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.netinet_in_test.__hermetic__.libc.a
[ 68%/5.710s :: 844->127->2076 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbit_test.__hermetic__.libc.a
[ 68%/5.713s :: 844->126->2077 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strnlen_s_test.__hermetic__.__build__.dir/strnlen_s_test.cpp.o
[ 68%/5.713s :: 844->125->2078 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strlen_test.__hermetic__.__build__.dir/strlen_test.cpp.o
[ 68%/5.716s :: 844->124->2079 (of 3046)] Building CXX object libc/test/src/stdlib/CMakeFiles/libc.test.src.stdlib.strtold_test.__hermetic__.__build__.dir/strtold_test.cpp.o
[ 68%/5.716s :: 844->123->2080 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbitf_test.__hermetic__.libc.a
[ 68%/5.718s :: 844->122->2081 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memccpy_test.__hermetic__.__build__.dir/memccpy_test.cpp.o
[ 68%/5.720s :: 844->121->2082 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncmp_test.__hermetic__.__build__.dir/strncmp_test.cpp.o
[ 68%/5.722s :: 844->120->2083 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memchr_test.__hermetic__.__build__.dir/memchr_test.cpp.o
[ 68%/5.724s :: 844->119->2084 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncat_test.__hermetic__.__build__.dir/strncat_test.cpp.o
[ 68%/5.725s :: 844->118->2085 (of 3046)] Building CXX object libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.cbrtbf16_test.__hermetic__.__build__.dir/cbrtbf16_test.cpp.o
[ 68%/5.726s :: 844->117->2086 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.memmem_test.__hermetic__.__build__.dir/memmem_test.cpp.o
[ 68%/5.726s :: 844->116->2087 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.signbitl_test.__hermetic__.libc.a
[ 68%/5.726s :: 844->115->2088 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.isnan_test.__hermetic__.libc.a
[ 68%/5.729s :: 844->114->2089 (of 3046)] Building CXX object libc/test/src/wchar/CMakeFiles/libc.test.src.wchar.wctob_test.__hermetic__.__build__.dir/wctob_test.cpp.o
[ 68%/5.731s :: 844->113->2090 (of 3046)] Linking CXX static library libc/test/include/liblibc.test.include.isnanf_test.__hermetic__.libc.a
[ 68%/5.733s :: 844->112->2091 (of 3046)] Building CXX object libc/test/src/string/CMakeFiles/libc.test.src.string.strncpy_test.__hermetic__.__build__.dir/strncpy_test.cpp.o
```
</details>
https://github.com/llvm/llvm-project/pull/213860
More information about the libc-commits
mailing list