From 0fcad191be4d7c61125d697fe51b0fe8a9c6fbcb Mon Sep 17 00:00:00 2001 From: Sai Ramesh Vanka Date: Tue, 11 Nov 2025 07:17:05 +0530 Subject: [PATCH] Remove CgroupModeV1 reference from the code - cgroupv1 has been removed from ocp > 4.19 - Hence, the CgroupModeV1 constant can be safely removed from the api code Signed-off-by: Sai Ramesh Vanka --- .../performanceprofile/functests/utils/cgroup/cgroup.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/performanceprofile/functests/utils/cgroup/cgroup.go b/test/e2e/performanceprofile/functests/utils/cgroup/cgroup.go index 01bf416ae2..2775d9d65b 100644 --- a/test/e2e/performanceprofile/functests/utils/cgroup/cgroup.go +++ b/test/e2e/performanceprofile/functests/utils/cgroup/cgroup.go @@ -33,12 +33,12 @@ func IsVersion2(ctx context.Context, c client.Client) (bool, error) { if err != nil { return false, fmt.Errorf("failed to get configs.node object. name=%q; %w", key.Name, err) } - if nodecfg.Spec.CgroupMode == apiconfigv1.CgroupModeV1 { - return false, nil - } // in case `apiconfigv1.CgroupMode` not set, it's returned true since // the platform's default is cgroupV2 - return true, nil + if nodecfg.Spec.CgroupMode == apiconfigv1.CgroupModeV2 || nodecfg.Spec.CgroupMode == apiconfigv1.CgroupModeEmpty { + return true, nil + } + return false, nil } // BuildGetter return a cgroup information getter that complies with