1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

TEST-65: check cat-config operation in chroot

This verifies the fix in 2075b6dd39.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-12-05 13:52:28 +01:00
parent cc420ae52a
commit a7eed3eca3
2 changed files with 11 additions and 0 deletions

View File

@ -158,6 +158,7 @@ BASICTOOLS=(
cat
chmod
chown
chroot
cmp
cryptsetup
cut

View File

@ -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/