[LTP] [PATCH] controllers/cgroup: Skip regression test on cgroup v2 systems
Samir M
samir@linux.ibm.com
Tue Mar 17 08:09:41 CET 2026
On 16/03/26 5:28 pm, Petr Vorel wrote:
> 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
>
Hi Li, Petr,
I agree with the suggested changes. Thank you for review comments will
sent a new patch version with the suggested changes.
Regards,
Samir
More information about the ltp
mailing list