Skip test 002-cgdelete-recursive_delete.py on legacy (cgroup v1),
containerized test runs. It occasionally fails in Github Actions, and
I think the failure is simply because the machine is underpowered. In
these cases, the failure is usually reported as:
002-cgdelete-recursive_delete.py - Failed to get the pid of the child process:
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
#
from cgroup import Cgroup, CgroupVersion
+from libcgroup import Mode
import consts
import ftests
import sys
def prereqs(config):
- # This test should run on both cgroup v1 and v2
- pass
+ result = consts.TEST_PASSED
+ cause = None
+
+ # This test has shown inconsistent failures on underpowered legacy
+ # machines when run within a container. Skip that configuration
+ if Cgroup.get_cgroup_mode(config) == Mode.CGROUP_MODE_LEGACY and \
+ config.args.container:
+ result = consts.TEST_SKIPPED
+ cause = 'Skip this test in containerized legacy hierarchies'
+
+ return result, cause
def setup(config):
def main(config):
- prereqs(config)
+ [result, cause] = prereqs(config)
+ if result != consts.TEST_PASSED:
+ return [result, cause]
+
setup(config)
[result, cause] = test(config)
teardown(config)