From: Frantisek Sumsal Date: Sun, 8 Aug 2021 21:47:31 +0000 (+0200) Subject: test: skip a harmless ldd error when installing test libs X-Git-Tag: v250-rc1~869 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6476676b848bca11c5213c412737cb2a6f3ba105;p=thirdparty%2Fsystemd.git test: skip a harmless ldd error when installing test libs Skip a harmless error when running the tests on a system with a significantly older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0, which is in this case older than the already installed libsystemd.so.0 in $initdir). The issue is triggered by installing test dependencies in install_missing_libraries(). Spotted on CentOS 8. ``` $ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread: /lib64/libsystemd.so.0: version `LIBSYSTEMD_240' not found (required by /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread) linux-vdso64.so.1 (0x00007fffb79d0000) libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffb6ef0000) libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fffb6d20000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fffb6cd0000) libc.so.6 => /lib64/libc.so.6 (0x00007fffb6ab0000) $ LD_LIBRARY_PATH=/var/tmp/systemd-test.nZO11F/root/lib64/ ldd /var/tmp/systemd-test.nZO11F/root/lib/systemd/tests/test-sd-device-thread linux-vdso64.so.1 (0x00007fffaba80000) libclang_rt.asan-powerpc64le.so => /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.asan-powerpc64le.so (0x00007fffaafa0000) libsystemd.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libsystemd.so.0 (0x00007fffaa5f0000) libpthread.so.0 => /var/tmp/systemd-test.nZO11F/root/lib64/libpthread.so.0 (0x00007fffaa5a0000) libc.so.6 => /var/tmp/systemd-test.nZO11F/root/lib64/libc.so.6 (0x00007fffaa380000) ``` --- diff --git a/test/test-functions b/test/test-functions index c049d4b64a5..2fea6043dd1 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1681,6 +1681,11 @@ inst_libs() { while read -r line; do [[ "$line" = 'not a dynamic executable' ]] && break + # Skip a harmless error when running the tests on a system with a significantly + # older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0, + # which is in this case older than the already installed libsystemd.so.0 in $initdir). + # The issue is triggered by installing test dependencies in install_missing_libraries(). + [[ "$line" =~ libsystemd.so.*:\ version\ .*\ not\ found ]] && continue if [[ "$line" =~ $so_regex ]]; then file="${BASH_REMATCH[1]}"