summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-15 09:14:44 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-12-25 15:18:50 +0900
commitff254eea8feb55bbea9ec5d731e3dc9299b80b9e (patch)
tree18ad9bd22035e5469fc44a75bceea1c9a01d765c
parenta2b0cd3f5ab3f450e74e2085ad20372a05451c74 (diff)
downloadsystemd-ff254eea8feb55bbea9ec5d731e3dc9299b80b9e.tar.gz
test: ignore the error about our own libraries missing during image creation
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.
-rw-r--r--test/test-functions14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test-functions b/test/test-functions
index 218d0e6888..95d37d09d5 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -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