From: Luca Boccassi Date: Wed, 28 Aug 2024 21:08:33 +0000 (+0100) Subject: test: mount ld.so.cache in minimal nspawn container if present X-Git-Tag: v257-rc1~602 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e17e48b96bb509754a0a11ea8bd0394965564c6;p=thirdparty%2Fsystemd.git test: mount ld.so.cache in minimal nspawn container if present In some cases (SUSE Tumbleweed) this is needed as a library (libz) is not in the default path, so it fails to run. --- diff --git a/test/units/TEST-13-NSPAWN.nspawn.sh b/test/units/TEST-13-NSPAWN.nspawn.sh index ad11468886f..7c21825d63c 100755 --- a/test/units/TEST-13-NSPAWN.nspawn.sh +++ b/test/units/TEST-13-NSPAWN.nspawn.sh @@ -969,6 +969,11 @@ testcase_check_os_release() { --bind-ro="$base/usr:/usr" ) + # Might be needed to find libraries + if [ -f "$base/etc/ld.so.cache" ]; then + common_opts+=("--bind-ro=$base/etc/ld.so.cache:/etc/ld.so.cache") + fi + # Empty /etc/ & /usr/ (! systemd-nspawn "${common_opts[@]}") (! SYSTEMD_NSPAWN_CHECK_OS_RELEASE=1 systemd-nspawn "${common_opts[@]}")