From b4dcfa7ed4672d556e189e800f966d6c34033de2 Mon Sep 17 00:00:00 2001 From: Bui Quang Minh Date: Fri, 12 Jul 2024 23:30:35 +0700 Subject: [PATCH] zdtm: make cgroup testcases run non-parallel cgroup testcases live in the same cgroup root zdtmtst and zdtmtst.defaultroot controller then create child subgroup for testing. This can cause problems when cgroup testcases are run in parallel. For example, testcase A dumps the child subgroup of testcase B since it's in the cgroup root but in the middle of restoring of testcase A, testcase B completes and cleans up the subgroup directory. This causes error in testcase A restore. This commit adds excl flag to all cgroup testcases description so that these don't run parallel. Signed-off-by: Bui Quang Minh --- test/zdtm/static/cgroup00.desc | 2 +- test/zdtm/static/cgroup01.desc | 2 +- test/zdtm/static/cgroup02.desc | 2 +- test/zdtm/static/cgroup_threads.desc | 2 +- test/zdtm/static/cgroup_yard.desc | 2 +- test/zdtm/static/cgroupns.desc | 2 +- test/zdtm/static/cgroupv2_00.desc | 2 +- test/zdtm/static/cgroupv2_01.desc | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/zdtm/static/cgroup00.desc b/test/zdtm/static/cgroup00.desc index 3c6c4a7e22..42a3f2b73a 100644 --- a/test/zdtm/static/cgroup00.desc +++ b/test/zdtm/static/cgroup00.desc @@ -1 +1 @@ -{'flavor': 'h', 'flags': 'suid', 'opts': '--manage-cgroups'} +{'flavor': 'h', 'flags': 'suid excl', 'opts': '--manage-cgroups'} diff --git a/test/zdtm/static/cgroup01.desc b/test/zdtm/static/cgroup01.desc index 3c6c4a7e22..42a3f2b73a 100644 --- a/test/zdtm/static/cgroup01.desc +++ b/test/zdtm/static/cgroup01.desc @@ -1 +1 @@ -{'flavor': 'h', 'flags': 'suid', 'opts': '--manage-cgroups'} +{'flavor': 'h', 'flags': 'suid excl', 'opts': '--manage-cgroups'} diff --git a/test/zdtm/static/cgroup02.desc b/test/zdtm/static/cgroup02.desc index df17a57891..eb5a9dd372 100644 --- a/test/zdtm/static/cgroup02.desc +++ b/test/zdtm/static/cgroup02.desc @@ -1,4 +1,4 @@ { 'dopts': '--manage-cgroups --cgroup-root name=zdtmtst:/prefix', - 'flags': 'suid', + 'flags': 'suid excl', 'flavor': 'h', 'ropts': '--manage-cgroups --cgroup-root /newroot --cgroup-root name=zdtmtst:/prefix'} diff --git a/test/zdtm/static/cgroup_threads.desc b/test/zdtm/static/cgroup_threads.desc index 3c6c4a7e22..42a3f2b73a 100644 --- a/test/zdtm/static/cgroup_threads.desc +++ b/test/zdtm/static/cgroup_threads.desc @@ -1 +1 @@ -{'flavor': 'h', 'flags': 'suid', 'opts': '--manage-cgroups'} +{'flavor': 'h', 'flags': 'suid excl', 'opts': '--manage-cgroups'} diff --git a/test/zdtm/static/cgroup_yard.desc b/test/zdtm/static/cgroup_yard.desc index 8736d6780d..9ad4a9b578 100644 --- a/test/zdtm/static/cgroup_yard.desc +++ b/test/zdtm/static/cgroup_yard.desc @@ -1,6 +1,6 @@ { 'flavor': 'h', -'flags': 'suid', +'flags': 'suid excl', # We create the external cgroup yard in working directory during --pre-dump # hook. We have to go up a few directories to find the yard. 'opts': '--manage-cgroups --cgroup-yard ../../../../../../external_yard' diff --git a/test/zdtm/static/cgroupns.desc b/test/zdtm/static/cgroupns.desc index 80dd710e17..dc61e36cff 100644 --- a/test/zdtm/static/cgroupns.desc +++ b/test/zdtm/static/cgroupns.desc @@ -1,4 +1,4 @@ { 'feature': 'cgroupns', - 'flags': 'suid', + 'flags': 'suid excl', 'flavor': 'h', 'opts': '--manage-cgroups'} diff --git a/test/zdtm/static/cgroupv2_00.desc b/test/zdtm/static/cgroupv2_00.desc index 4bfd4b2656..e70c84df81 100644 --- a/test/zdtm/static/cgroupv2_00.desc +++ b/test/zdtm/static/cgroupv2_00.desc @@ -1 +1 @@ -{'flavor': 'h ns', 'flags': 'suid', 'opts': '--manage-cgroups=full'} +{'flavor': 'h ns', 'flags': 'suid excl', 'opts': '--manage-cgroups=full'} diff --git a/test/zdtm/static/cgroupv2_01.desc b/test/zdtm/static/cgroupv2_01.desc index 4bfd4b2656..e70c84df81 100644 --- a/test/zdtm/static/cgroupv2_01.desc +++ b/test/zdtm/static/cgroupv2_01.desc @@ -1 +1 @@ -{'flavor': 'h ns', 'flags': 'suid', 'opts': '--manage-cgroups=full'} +{'flavor': 'h ns', 'flags': 'suid excl', 'opts': '--manage-cgroups=full'}