Skip to content

Commit 1ea27bd

Browse files
mrc0mmandbluca
authored andcommitted
test: load the io controller before checking if io.latency exists
Otherwise the following test gets always skipped.
1 parent 0689d46 commit 1ea27bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/units/testsuite-07.exec-context.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ if ! systemd-detect-virt -cq; then
119119
-p IODeviceWeight="/foo/bar 999"
120120
)
121121

122+
systemctl set-property system.slice IOAccounting=yes
122123
# io.latency not available by default on Debian stable
123-
if [ -e /sys/fs/cgroup/system.slice/io.latency ]; then
124+
if [[ -e /sys/fs/cgroup/system.slice/io.latency ]]; then
124125
systemd-run --wait --pipe --unit "$SERVICE_NAME" "${ARGUMENTS[@]}" \
125126
bash -xec "diff <(echo $EXPECTED_IO_MAX) $CGROUP_PATH/io.max; diff <(echo $EXPECTED_IO_LATENCY) $CGROUP_PATH/io.latency"
126127
fi

0 commit comments

Comments
 (0)