From: Tom Hromatka Date: Mon, 3 Jul 2023 15:58:13 +0000 (-0600) Subject: ftests: skip test 002 on legacy, containerized test runs X-Git-Tag: v3.1.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d6639387dd7834f6ca1f1f36f2d3301e588cd59;p=thirdparty%2Flibcgroup.git ftests: skip test 002 on legacy, containerized test runs 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 Reviewed-by: Kamalesh Babulal --- diff --git a/tests/ftests/002-cgdelete-recursive_delete.py b/tests/ftests/002-cgdelete-recursive_delete.py index b51abcdc..d999ca6b 100755 --- a/tests/ftests/002-cgdelete-recursive_delete.py +++ b/tests/ftests/002-cgdelete-recursive_delete.py @@ -8,6 +8,7 @@ # from cgroup import Cgroup, CgroupVersion +from libcgroup import Mode import consts import ftests import sys @@ -20,8 +21,17 @@ GRANDCHILD = 'grandchildcg' 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): @@ -53,7 +63,10 @@ def teardown(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)