From 7e7aa6d810d6ffb555328ec14dfa5b6311213ee0 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Tue, 3 Jun 2025 18:17:49 +0200 Subject: [PATCH] e2e: node: cpumanager: require cgroup v2 in general, the rewritten e2e cpumanager test assume cgroup v2. A limited set of these may be updated to work also with the obsolete and declining cgroup v1, but these need to be reviewed on test-by-test matter. To fix test failures, we add a top level require for cgroup v2, skipping otherwise. This will fix the red lanes while we review the testcases and the deprecation plan of the other tests. Signed-off-by: Francesco Romani --- test/e2e_node/cpumanager_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e_node/cpumanager_test.go b/test/e2e_node/cpumanager_test.go index 23def4ac1cc..cec52b76e93 100644 --- a/test/e2e_node/cpumanager_test.go +++ b/test/e2e_node/cpumanager_test.go @@ -171,6 +171,10 @@ var _ = SIGDescribe("CPU Manager", ginkgo.Ordered, framework.WithSerial(), featu }) ginkgo.JustBeforeEach(func(ctx context.Context) { + if !e2enodeCgroupV2Enabled { + e2eskipper.Skipf("Skipping since CgroupV2 not used") + } + // note intentionally NOT set reservedCPUs - this must be initialized on a test-by-test basis // use a closure to minimize the arguments, to make the usage more straightforward @@ -966,10 +970,6 @@ var _ = SIGDescribe("CPU Manager", ginkgo.Ordered, framework.WithSerial(), featu ginkgo.When("checking the CFS quota management", ginkgo.Label("cfs-quota"), func() { ginkgo.BeforeEach(func(ctx context.Context) { - if !e2enodeCgroupV2Enabled { - e2eskipper.Skipf("Skipping since CgroupV2 not used") - } - // WARNING: this assumes 2-way SMT systems - we don't know how to access other SMT levels. // this means on more-than-2-way SMT systems this test will prove nothing reservedCPUs = cpuset.New(0)