test: skip TEST-56-OOMD if systemd-oomd is not installed

Fixes #18775
This commit is contained in:
Luca Boccassi
2021-02-24 13:29:57 +00:00
committed by Lennart Poettering
parent 6cde5b4b1c
commit 04153c4509

View File

@@ -11,6 +11,9 @@ cgroup_type=$(stat -fc %T /sys/fs/cgroup/)
if [[ "$cgroup_type" != *"cgroup2"* ]] && [[ "$cgroup_type" != *"0x63677270"* ]]; then
echo "no cgroup2" >> /skipped
fi
if [ ! -f /usr/lib/systemd/systemd-oomd ] && [ ! -f /lib/systemd/systemd-oomd ]; then
echo "no oomd" >> /skipped
fi
[[ -e /skipped ]] && exit 0 || true
rm -rf /etc/systemd/system/testsuite-56-testbloat.service.d