Skip to content

Commit

Permalink
zdtm: cgroup04: Improve skip check's robustness.
Browse files Browse the repository at this point in the history
cgroup04 test needs full control over mem and devices cgroup hierarchies.
Make the test's .checkskip script better at detecting if the cgroups are
available for use.

Signed-off-by: Michał Mirosław <[email protected]>
  • Loading branch information
osctobe committed Jun 16, 2023
1 parent 81a7418 commit 7b42582
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/zdtm/static/cgroup04.checkskip
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash

! test -f /sys/fs/cgroup/cgroup.controllers
test -f /sys/fs/cgroup/cgroup.controllers && exit 1

grep -q 'cgroup rw,' /proc/mounts && exit 1

if [[ -r /proc/config.gz ]]; then
zcat /proc/config.gz | grep -q ^CONFIG_MEMCG= || exit 1
zcat /proc/config.gz | grep -q ^CONFIG_CGROUP_DEVICE= || exit 1
fi

0 comments on commit 7b42582

Please sign in to comment.