From: Kamalesh Babulal Date: Sun, 9 Jun 2024 11:33:57 +0000 (+0530) Subject: ftests/cgroup: Add support for favordynmods X-Git-Tag: v3.2.0~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52b196c2f4f3c7217b4ccee5a9097cc19192d980;p=thirdparty%2Flibcgroup.git ftests/cgroup: Add support for favordynmods Upstream Linux Kernel commit 81d3a5be05d3 ("cgroup: add cgroup_favordynmods= command-line option") introduced CONFIG_CGROUP_FAVOR_DYNMODS, that would append favordynmods to the mount options on cgroup v1. This patch strips that option. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/cgroup.py b/tests/ftests/cgroup.py index 7a73fa6e..09b426f1 100644 --- a/tests/ftests/cgroup.py +++ b/tests/ftests/cgroup.py @@ -39,6 +39,12 @@ class CgroupMount(object): if self.version == CgroupVersion.CGROUP_V1: self.controller = entries[3].split(',')[-1] + # kernel's compiled with CONFIG_CGROUP_FAVOR_DYNMODS on + # cgroup v1 will append mount points with favordynmods, + # remove it. + if self.controller == 'favordynmods': + self.controller == entries[3].split(',')[-2] + if self.controller == 'clone_children': # the cpuset controller may append this option to the end # rather than the controller name like all other controllers