]> Gentwo Git Trees - linux/.git/commit
selftests: cgroup: Make test_pids backwards compatible
authorMichal Koutný <mkoutny@suse.com>
Wed, 27 Aug 2025 15:53:00 +0000 (17:53 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 27 Aug 2025 15:59:52 +0000 (05:59 -1000)
commit3b0dec689a6301845761681b852f9538cb75a1d2
tree5060226d866ed80599011d0c7ba411c6aa267d6d
parent2c98144fc832b35c4e9293a3bfc518608d6f5145
selftests: cgroup: Make test_pids backwards compatible

The predicates in test expect event counting from 73e75e6fc352b
("cgroup/pids: Separate semantics of pids.events related to pids.max")
and the test would fail on older kernels. We want to have one version of
tests for all, so detect the feature and skip the test on old kernels.
(The test could even switch to check v1 semantics based on the flag but
keep it simple for now.)

Fixes: 9f34c566027b6 ("selftests: cgroup: Add basic tests for pids controller")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Tested-by: Sebastian Chlad <sebastian.chlad@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/lib/cgroup_util.c
tools/testing/selftests/cgroup/lib/include/cgroup_util.h
tools/testing/selftests/cgroup/test_pids.c