From 8612c57d2162cf8760f5c93009afc4f19cd7d424 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Mon, 11 Aug 2025 15:14:46 +0200 Subject: [PATCH] e2e: node: linter fix fix linter suggestions. Signed-off-by: Francesco Romani --- test/e2e_node/cpumanager_test.go | 2 +- test/e2e_node/topology_manager_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e_node/cpumanager_test.go b/test/e2e_node/cpumanager_test.go index 03c4fbe22cc..cb15e59fa88 100644 --- a/test/e2e_node/cpumanager_test.go +++ b/test/e2e_node/cpumanager_test.go @@ -2681,7 +2681,7 @@ type ctnAttribute struct { func makeCPUManagerPod(podName string, ctnAttributes []ctnAttribute) *v1.Pod { var containers []v1.Container for _, ctnAttr := range ctnAttributes { - cpusetCmd := fmt.Sprintf("grep Cpus_allowed_list /proc/self/status | cut -f2 && sleep 1d") + cpusetCmd := "grep Cpus_allowed_list /proc/self/status | cut -f2 && sleep 1d" ctn := v1.Container{ Name: ctnAttr.ctnName, Image: busyboxImage, diff --git a/test/e2e_node/topology_manager_test.go b/test/e2e_node/topology_manager_test.go index f0feb4a8681..ac020e7a4f5 100644 --- a/test/e2e_node/topology_manager_test.go +++ b/test/e2e_node/topology_manager_test.go @@ -1564,7 +1564,7 @@ func runMultipleGuNonGuPods(ctx context.Context, f *framework.Framework, cpuCap cpuListString = "0" if cpuAlloc > 2 { cset = mustParseCPUSet(fmt.Sprintf("0-%d", cpuCap-1)) - cpuListString = fmt.Sprintf("%s", cset.Difference(cpuset.New(cpu1))) + cpuListString = cset.Difference(cpuset.New(cpu1)).String() } expAllowedCPUsListRegex = fmt.Sprintf("^%s\n$", cpuListString) err = e2epod.NewPodClient(f).MatchContainerOutput(ctx, pod2.Name, pod2.Spec.Containers[0].Name, expAllowedCPUsListRegex) @@ -1603,14 +1603,14 @@ func runMultipleCPUGuPod(ctx context.Context, f *framework.Framework) { if !isHTEnabled() && len(cpuList) > 2 { cset = mustParseCPUSet(fmt.Sprintf("%d-%d", cpuList[1], cpuList[2])) } - cpuListString = fmt.Sprintf("%s", cset) + cpuListString = cset.String() } } else if isHTEnabled() { cpuListString = "2-3" cpuList = mustParseCPUSet(getCPUSiblingList(0)).List() if cpuList[1] != 1 { cset = mustParseCPUSet(getCPUSiblingList(1)) - cpuListString = fmt.Sprintf("%s", cset) + cpuListString = cset.String() } } expAllowedCPUsListRegex = fmt.Sprintf("^%s\n$", cpuListString)