cf-natali opened a new pull request #384:
URL: https://github.com/apache/mesos/pull/384
Since glibc 2.32, `ld.so.cache` now defaults to the "new" format, instead
of the "compat" format which was in use since glibc 2.2 (around 20 years
ago).
The code now supports both the "compat" and "new" formats:
Before:
```
root@thinkpad:/home/cf/src/mesos/build# ldconfig -c new
root@thinkpad:/home/cf/src/mesos/build# ./bin/mesos-tests.sh
--gtest_filter=*Ld*
[...]
[==========] Running 4 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from LdcacheTest
[ RUN ] LdcacheTest.Parse
../../src/tests/ldcache_tests.cpp:43: Failure
cache: Invalid format
[ FAILED ] LdcacheTest.Parse (0 ms)
[----------] 1 test from LdcacheTest (0 ms total)
[----------] 3 tests from Ldd
[ RUN ] Ldd.BinSh
../../src/tests/ldd_tests.cpp:43: Failure
cache: Invalid format
[ FAILED ] Ldd.BinSh (0 ms)
[ RUN ] Ldd.EmptyCache
[ OK ] Ldd.EmptyCache (1 ms)
[ RUN ] Ldd.MissingFile
../../src/tests/ldd_tests.cpp:77: Failure
cache: Invalid format
[ FAILED ] Ldd.MissingFile (0 ms)
[----------] 3 tests from Ldd (1 ms total)
[----------] Global test environment tear-down
[==========] 4 tests from 2 test cases ran. (8 ms total)
[ PASSED ] 1 test.
[ FAILED ] 3 tests, listed below:
[ FAILED ] LdcacheTest.Parse
[ FAILED ] Ldd.BinSh
[ FAILED ] Ldd.MissingFile
3 FAILED TESTS
```
After:
```
root@thinkpad:/home/cf/src/mesos/build# ldconfig -c new
root@thinkpad:/home/cf/src/mesos/build# ./bin/mesos-tests.sh
--gtest_filter=*Ld*
[...]
[==========] Running 4 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from LdcacheTest
[ RUN ] LdcacheTest.Parse
[ OK ] LdcacheTest.Parse (529 ms)
[----------] 1 test from LdcacheTest (529 ms total)
[----------] 3 tests from Ldd
[ RUN ] Ldd.BinSh
[ OK ] Ldd.BinSh (3 ms)
[ RUN ] Ldd.EmptyCache
[ OK ] Ldd.EmptyCache (0 ms)
[ RUN ] Ldd.MissingFile
[ OK ] Ldd.MissingFile (0 ms)
[----------] 3 tests from Ldd (3 ms total)
[----------] Global test environment tear-down
[==========] 4 tests from 2 test cases ran. (541 ms total)
[ PASSED ] 4 tests.
```
Closes #10220.
@asekretenko @andreaspeters
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]