Skip to content

Commit 0eaabf7

Browse files
committed
e2e: adjust tests to look for the new var
Signed-off-by: Talor Itzhak <[email protected]>
1 parent 5ac11c0 commit 0eaabf7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

test/e2e/performanceprofile/functests/1_performance/irqbalance.go

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,15 @@ func getIrqBalanceBannedCPUs(ctx context.Context, node *corev1.Node) (cpuset.CPU
334334
bannedCPUs := unquote(strings.TrimSpace(items[1]))
335335
testlog.Infof("banned CPUs: %q", bannedCPUs)
336336

337-
banned, err := components.CPUMaskToCPUSet(bannedCPUs)
337+
var banned cpuset.CPUSet
338+
if items[0] == "IRQBALANCE_BANNED_CPULIST" {
339+
banned, err = cpuset.Parse(bannedCPUs)
340+
} else {
341+
banned, err = components.CPUMaskToCPUSet(bannedCPUs)
342+
}
343+
338344
if err != nil {
339-
return cpuset.New(), fmt.Errorf("failed to parse the banned CPUs: %v", err)
345+
return cpuset.New(), fmt.Errorf("failed to parse banned CPUs from %s: %v", items[0], err)
340346
}
341347

342348
return banned, nil
@@ -359,10 +365,12 @@ func findIrqBalanceBannedCPUsVarFromConf(conf string) string {
359365
if strings.HasPrefix(line, "#") {
360366
continue
361367
}
362-
if !strings.HasPrefix(line, "IRQBALANCE_BANNED_CPUS") {
363-
continue
368+
if strings.HasPrefix(line, "IRQBALANCE_BANNED_CPULIST") {
369+
return line
370+
}
371+
if strings.HasPrefix(line, "IRQBALANCE_BANNED_CPUS") {
372+
return line
364373
}
365-
return line
366374
}
367375
return ""
368376
}

0 commit comments

Comments
 (0)