From 9f6dcca673b1fec067edebe8559a039210dc9d03 Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Wed, 3 Feb 2021 09:54:55 -0700 Subject: [PATCH] ftests: Test 004 must be run within a container Test 004-cgsnapshot-basic_snapshot_v1.py must be run within a container because the cgsnapshot data will vary slightly when inside/outside of a container. Add a check to its prereqs function to enforce this. Signed-off-by: Tom Hromatka --- ftests/004-cgsnapshot-basic_snapshot_v1.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ftests/004-cgsnapshot-basic_snapshot_v1.py b/ftests/004-cgsnapshot-basic_snapshot_v1.py index 70750312..5e5e38bd 100755 --- a/ftests/004-cgsnapshot-basic_snapshot_v1.py +++ b/ftests/004-cgsnapshot-basic_snapshot_v1.py @@ -2,7 +2,7 @@ # # Basic cgsnapshot functionality test # -# Copyright (c) 2020 Oracle and/or its affiliates. +# Copyright (c) 2020-2021 Oracle and/or its affiliates. # Author: Tom Hromatka # @@ -61,6 +61,12 @@ def prereqs(config): if CgroupVersion.get_version('memory') != CgroupVersion.CGROUP_V1: result = consts.TEST_SKIPPED cause = "This test requires the cgroup v1 memory controller" + return result, cause + + if not config.args.container: + result = consts.TEST_SKIPPED + cause = "This test must be run within a container" + return result, cause return result, cause -- 2.47.2