From: Frantisek Sumsal Date: Tue, 5 Dec 2023 11:22:20 +0000 (+0100) Subject: test: load the io controller before checking if io.latency exists X-Git-Tag: v255~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ea27bd79ee86492f7ab9bff9dd4f537c3cb7e41;p=thirdparty%2Fsystemd.git test: load the io controller before checking if io.latency exists Otherwise the following test gets always skipped. --- diff --git a/test/units/testsuite-07.exec-context.sh b/test/units/testsuite-07.exec-context.sh index 348c164b86f..5fb7dddf891 100755 --- a/test/units/testsuite-07.exec-context.sh +++ b/test/units/testsuite-07.exec-context.sh @@ -119,8 +119,9 @@ if ! systemd-detect-virt -cq; then -p IODeviceWeight="/foo/bar 999" ) + systemctl set-property system.slice IOAccounting=yes # io.latency not available by default on Debian stable - if [ -e /sys/fs/cgroup/system.slice/io.latency ]; then + 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