]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: ignore the error about our own libraries missing during image creation 21774/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 15 Dec 2021 08:14:44 +0000 (09:14 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Dec 2021 06:18:50 +0000 (15:18 +0900)
19:50:59 F: Missing a shared library required by /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so.
19:50:59 F: Run "ldd /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so" to find out what it is.
19:50:59 F: libsystemd-shared-250.so => not found
19:50:59 F: Cannot create a test image.

test/test-functions

index 218d0e6888c1e05102750c8f303ebfe8e604ae41..95d37d09d59979a9a6ad92106bbd3d5b07ca7ba6 100644 (file)
@@ -1932,11 +1932,9 @@ 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
+        # Ignore errors about our own stuff missing. This is most likely caused
+        # by ldd attempting to use the unprefixed RPATH.
+        [[ "$line" =~ libsystemd.*\ not\ found ]] && continue
 
         if [[ "$line" =~ $so_regex ]]; then
             file="${BASH_REMATCH[1]}"
@@ -2309,7 +2307,7 @@ inst_binary() {
     # In certain cases we might attempt to install a binary which is already
     # present in the test image, yet it's missing from the host system.
     # In such cases, let's check if the binary indeed exists in the image
-    # before doing any other chcecks. If it does, immediately return with
+    # before doing any other checks. If it does, immediately return with
     # success.
     if [[ $# -eq 1 ]]; then
         for path in "" bin sbin usr/bin usr/sbin; do
@@ -2328,6 +2326,10 @@ inst_binary() {
     while read -r line; do
         [[ "$line" = 'not a dynamic executable' ]] && break
 
+        # Ignore errors about our own stuff missing. This is most likely caused
+        # by ldd attempting to use the unprefixed RPATH.
+        [[ "$line" =~ libsystemd.*\ not\ found ]] && continue
+
         if [[ "$line" =~ $so_regex ]]; then
             file="${BASH_REMATCH[1]}"
             [[ -e "${initdir}/$file" ]] && continue