From 3ad5aedadcfeebd2df65faf25a08149c93d20461 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sat, 28 Oct 2023 00:46:40 +0100 Subject: [PATCH] test: io.latency cgroup support might not be available, skip test It doesn't seem to be enabled on Debian stable, and the test fails. Follow-up for 5efc8183c9cf9b --- test/units/testsuite-07.exec-context.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/units/testsuite-07.exec-context.sh b/test/units/testsuite-07.exec-context.sh index d6a55cafe41..477b9e84dac 100755 --- a/test/units/testsuite-07.exec-context.sh +++ b/test/units/testsuite-07.exec-context.sh @@ -109,8 +109,11 @@ if ! systemd-detect-virt -cq; then -p IODeviceWeight="/foo/bar 999" ) - systemd-run --wait --pipe --unit "$SERVICE_NAME" "${ARGUMENTS[@]}" \ - bash -xec "diff <(echo $EXPECTED_IO_MAX) $CGROUP_PATH/io.max; diff <(echo $EXPECTED_IO_LATENCY) $CGROUP_PATH/io.latency" + # io.latency not available by default on Debian stable + if [ -e /sys/fs/cgroup/system.slice/io.latency ]; then + systemd-run --wait --pipe --unit "$SERVICE_NAME" "${ARGUMENTS[@]}" \ + bash -xec "diff <(echo $EXPECTED_IO_MAX) $CGROUP_PATH/io.max; diff <(echo $EXPECTED_IO_LATENCY) $CGROUP_PATH/io.latency" + fi # CPUScheduling= ARGUMENTS=( -- 2.47.3