Skip to content

Commit e8f4a39

Browse files
mrniranjanopenshift-cherrypick-robot
authored andcommitted
E2E: llc: make sure to remove any trailing newspaces or newline characters
when using cpuset.Parse the logs from pods.GetLogs which returns new line characters. This PR trims to remove any new line characters Signed-off-by: Niranjan M.R <mniranja@redhat.com>
1 parent b593115 commit e8f4a39

File tree

1 file changed

+2
-2
lines changed
  • test/e2e/performanceprofile/functests/13_llc

1 file changed

+2
-2
lines changed

test/e2e/performanceprofile/functests/13_llc/llc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ var _ = Describe("[rfe_id:77446] LLC-aware cpu pinning", Label(string(label.Open
972972
logs, err := pods.GetLogs(testclient.K8sClient, testPod)
973973
Expect(err).ToNot(HaveOccurred(), "Cannot get logs from test pod")
974974

975-
allocatedCPUs, err := cpuset.Parse(logs)
975+
allocatedCPUs, err := cpuset.Parse(strings.TrimSpace(logs))
976976
Expect(err).ToNot(HaveOccurred(), "Cannot get cpuset for pod %s/%s from logs %q", testPod.Namespace, testPod.Name, logs)
977977
Expect(allocatedCPUs.Size()).To(Equal(askingCPUs), "asked %d exclusive CPUs got %v", askingCPUs, allocatedCPUs)
978978

@@ -994,7 +994,7 @@ var _ = Describe("[rfe_id:77446] LLC-aware cpu pinning", Label(string(label.Open
994994
logs, err := pods.GetLogs(testclient.K8sClient, testPod)
995995
Expect(err).ToNot(HaveOccurred(), "Cannot get logs from test pod")
996996

997-
allocatedCPUs, err := cpuset.Parse(logs)
997+
allocatedCPUs, err := cpuset.Parse(strings.TrimSpace(logs))
998998
Expect(err).ToNot(HaveOccurred(), "Cannot get cpuset for pod %s/%s from logs %q", testPod.Namespace, testPod.Name, logs)
999999
Expect(allocatedCPUs.Size()).To(Equal(askingCPUs), "asked %d exclusive CPUs got %v", askingCPUs, allocatedCPUs)
10001000

0 commit comments

Comments
 (0)