[llvm] [CI] Enable -Werror in pre-merge CI (PR #155627)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 27 09:05:19 PDT 2025
nikic wrote:
Looks like something is broken with the reporting:
```
+ python /home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_github.py 1 /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.1be8yclz.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.2jdf3sl_.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.4zoyp903.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.5p2q3afh.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.6y4bhp5d.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.amum_kz4.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.djvnl8ff.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.ifs3d8z0.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.m2dq2xvd.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.qmfa_pzv.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test-results.s04souk7.xml /home/gha/actions-runner/_work/llvm-project/llvm-project/ninja.log /home/gha/actions-runner/_work/llvm-project/llvm-project/ninja_runtimes.log
Traceback (most recent call last):
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_github.py", line 24, in <module>
report = generate_test_report_lib.generate_report_from_files(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_lib.py", line 267, in generate_report_from_files
return generate_report(
^^^^^^^^^^^^^^^^
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_lib.py", line 215, in generate_report
ninja_failures = find_failure_in_ninja_logs(ninja_logs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_lib.py", line 71, in find_failure_in_ninja_logs
log_failures = _parse_ninja_log(ninja_log)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/.ci/generate_test_report_lib.py", line 40, in _parse_ninja_log
failing_action = ninja_log[index - 1].split("] ")[1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
```
But the original error is this:
```
FAILED: libc/test/src/sys/random/linux/CMakeFiles/libc.test.src.sys.random.linux.getrandom_test.__build__.dir/getrandom_test.cpp.o
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DLIBC_NAMESPACE=__llvm_libc_22_0_0_git -I/home/gha/actions-runner/_work/llvm-project/llvm-project/libc -isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -mavx2 -mfma -D__LIBC_MISC_MATH_BASIC_OPS_OPT -D__LIBC_USE_BUILTIN_FMAX_FMIN -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -fpie -ffixed-point -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_TEST=UNIT -MD -MT libc/test/src/sys/random/linux/CMakeFiles/libc.test.src.sys.random.linux.getrandom_test.__build__.dir/getrandom_test.cpp.o -MF libc/test/src/sys/random/linux/CMakeFiles/libc.test.src.sys.random.linux.getrandom_test.__build__.dir/getrandom_test.cpp.o.d -o libc/test/src/sys/random/linux/CMakeFiles/libc.test.src.sys.random.linux.getrandom_test.__build__.dir/getrandom_test.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/sys/random/linux/getrandom_test.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/sys/random/linux/getrandom_test.cpp:12:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/ErrnoCheckingTest.h:14:
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/Test.h:37:
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:203:36: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
203 | return testMatch(Matcher.match(Value), Matcher, ValueStr, MatcherStr, Loc);
| ~~~~~ ^~~~~
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/src/sys/random/linux/getrandom_test.cpp:21:3: note: in instantiation of function template specialization '__llvm_libc_22_0_0_git::testing::Test::matchAndExplain<__llvm_libc_22_0_0_git::testing::internal::ErrnoSetterMatcher<int>, long>' requested here
21 | ASSERT_THAT(LIBC_NAMESPACE::getrandom(buffer.data(), buffer.size(), -1),
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:511:3: note: expanded from macro 'ASSERT_THAT'
511 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, return)
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:504:26: note: expanded from macro 'LIBC_TEST_MATCH_'
504 | LIBC_TEST_SCAFFOLDING_(matchAndExplain(MATCHER, MATCH, MATCHER_STR, \
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/test/UnitTest/LibcTest.h:423:7: note: expanded from macro 'LIBC_TEST_SCAFFOLDING_'
423 | if (TEST) \
| ^
1 error generated.
```
Possibly libc doesn't have Werror buildbots.
https://github.com/llvm/llvm-project/pull/155627
More information about the llvm-commits
mailing list