[libc-commits] [libc] [libc] Fix readlink tests on 32-bit systems (PR #97850)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Fri Jul 5 11:22:34 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/1494

Here is the relevant piece of the build log for the reference:
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[692/699] Building CXX object projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test.__build__.dir/readlinkat_test.cpp.o
[693/699] Building CXX object projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test.__build__.dir/readlink_test.cpp.o
[694/699] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (34 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[695/699] Linking CXX executable projects/libc/test/src/unistd/libc.test.src.unistd.readlinkat_test.__build__
[696/699] Linking CXX executable projects/libc/test/src/unistd/libc.test.src.unistd.readlink_test.__build__
[697/699] Running unit test libc.test.src.unistd.readlinkat_test
FAILED: projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/libc.test.src.unistd.readlinkat_test.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcReadlinkatTest.CreateAndUnlink
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/unistd/readlinkat_test.cpp:42: FAILURE
Failed to match LIBC_NAMESPACE::unlink(LINK) against Succeeds(0).
Expected return value to be equal to 0 but got -1.
Expected errno to be equal to "Success" but got "Bad address".
Segmentation fault
[698/699] Running unit test libc.test.src.unistd.readlink_test
FAILED: projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/libc.test.src.unistd.readlink_test.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcReadlinkTest.CreateAndUnlink
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/unistd/readlink_test.cpp:40: FAILURE
Failed to match LIBC_NAMESPACE::unlink(LINK) against Succeeds(0).
Expected return value to be equal to 0 but got -1.
Expected errno to be equal to "Success" but got "Bad address".
Segmentation fault
[699/699] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (9 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (4887 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (461 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (2 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[692/699] Building CXX object projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test.__build__.dir/readlinkat_test.cpp.o
[693/699] Building CXX object projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test.__build__.dir/readlink_test.cpp.o
[694/699] Running unit test libc.test.src.time.nanosleep_test.__unit__
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcNanosleep.SmokeTest
[       OK ] LlvmLibcNanosleep.SmokeTest (34 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[695/699] Linking CXX executable projects/libc/test/src/unistd/libc.test.src.unistd.readlinkat_test.__build__
[696/699] Linking CXX executable projects/libc/test/src/unistd/libc.test.src.unistd.readlink_test.__build__
[697/699] Running unit test libc.test.src.unistd.readlinkat_test
FAILED: projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlinkat_test 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/libc.test.src.unistd.readlinkat_test.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcReadlinkatTest.CreateAndUnlink
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/unistd/readlinkat_test.cpp:42: FAILURE
Failed to match LIBC_NAMESPACE::unlink(LINK) against Succeeds(0).
Expected return value to be equal to 0 but got -1.
Expected errno to be equal to "Success" but got "Bad address".
Segmentation fault
[698/699] Running unit test libc.test.src.unistd.readlink_test
FAILED: projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/CMakeFiles/libc.test.src.unistd.readlink_test 
cd /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd && /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/unistd/libc.test.src.unistd.readlink_test.__build__
[==========] Running 2 tests from 1 test suite.
[ RUN      ] LlvmLibcReadlinkTest.CreateAndUnlink
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/unistd/readlink_test.cpp:40: FAILURE
Failed to match LIBC_NAMESPACE::unlink(LINK) against Succeeds(0).
Expected return value to be equal to 0 but got -1.
Expected errno to be equal to "Success" but got "Bad address".
Segmentation fault
[699/699] Running unit test libc.test.src.__support.hash_test.__unit__
[==========] Running 4 tests from 1 test suite.
[ RUN      ] LlvmLibcHashTest.SanityCheck
[       OK ] LlvmLibcHashTest.SanityCheck (9 ms)
[ RUN      ] LlvmLibcHashTest.Avalanche
[       OK ] LlvmLibcHashTest.Avalanche (4887 ms)
[ RUN      ] LlvmLibcHashTest.UniformLSB
[       OK ] LlvmLibcHashTest.UniformLSB (461 ms)
[ RUN      ] LlvmLibcHashTest.UniformMSB
[       OK ] LlvmLibcHashTest.UniformMSB (2 ms)
Ran 4 tests.  PASS: 4  FAIL: 0
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
    yield
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 132, in main
    run_command(['ninja', 'libc-unit-tests'])
  File "/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 179, in run_command

```

https://github.com/llvm/llvm-project/pull/97850


More information about the libc-commits mailing list