[LTP] [PATCH] controllers/cgroup: Skip regression test on cgroup v2 systems
Petr Vorel
pvorel@suse.cz
Mon Mar 16 12:58:00 CET 2026
Hi Li, Samir,
...
> > + # This test is specific to cgroup v1
> > + # Check if system is using cgroup v2
> > + if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
> This is typically right as the '/sys/fs/cgroup' is Cgroup default mount path,
> but if a tested system does not mount there, this won't work.
> Maybe we can go with the cgroup_lib.sh standard way for version check?
> cgroup_require "memory"
> cgroup_version=$(cgroup_get_version "memory")
> if [ "$cgroup_version" = "2" ]; then
> tst_res TCONF "memory controller mounted on cgroup v2 hierarchy, skipping test."
> return
> fi
+1
Kind regards,
Petr
More information about the ltp
mailing list