From: Zbigniew Jędrzejewski-Szmek Date: Mon, 5 Dec 2022 12:52:28 +0000 (+0100) Subject: TEST-65: check cat-config operation in chroot X-Git-Tag: v253-rc1~343^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a7eed3eca3d7bc022d870258deb2f738b9527c6d;p=thirdparty%2Fsystemd.git TEST-65: check cat-config operation in chroot This verifies the fix in 2075b6dd394e09a0f203b9cc7e3253908397f933. --- diff --git a/test/test-functions b/test/test-functions index a87b7b966d1..9aa9c37a9e5 100644 --- a/test/test-functions +++ b/test/test-functions @@ -158,6 +158,7 @@ BASICTOOLS=( cat chmod chown + chroot cmp cryptsetup cut diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh index 1f34308b44c..ebe1f57b52f 100755 --- a/test/units/testsuite-65.sh +++ b/test/units/testsuite-65.sh @@ -139,6 +139,16 @@ systemd-analyze cat-config systemd/system.conf systemd/journald.conf >/dev/null systemd-analyze cat-config systemd/system.conf foo/bar systemd/journald.conf >/dev/null systemd-analyze cat-config foo/bar +if [[ ! -v ASAN_OPTIONS ]]; then + # check that systemd-analyze cat-config paths work in a chroot + mkdir -p /tmp/root + mount --bind / /tmp/root + systemd-analyze cat-config systemd/system-preset >/tmp/out1 + chroot /tmp/root systemd-analyze cat-config systemd/system-preset >/tmp/out2 + diff /tmp/out{1,2} +fi + +# verify mkdir -p /tmp/img/usr/lib/systemd/system/ mkdir -p /tmp/img/opt/