rteval/rteval-cyclictest-Reset-cpu...

42 lines
1.6 KiB
Diff

From 7399c8f9fdf8e1c152dde1ca86a757559dfc72ab Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 26 Jul 2022 20:58:46 -0400
Subject: [PATCH 09/19] rteval: cyclictest: Reset cpulist from newly calculated
cpus
After we recalculate self.__cpus to only include online cpus, we also
need to reset the self.__cpulist which is the collapsed form of the list
that we pass as parameters to cyclictest, otherwise we can potentially
pass an offline cpu as a parameter to cyclictest which will then fail
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/measurement/cyclictest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
index 9e7f4ba25eab..e235b83b49f7 100644
--- a/rteval/modules/measurement/cyclictest.py
+++ b/rteval/modules/measurement/cyclictest.py
@@ -36,7 +36,7 @@ import libxml2
from rteval.Log import Log
from rteval.modules import rtevalModulePrototype
from rteval.misc import cpuinfo
-from rteval.systopology import CpuList, SysTopology
+from rteval.systopology import CpuList, SysTopology, collapse_cpulist
expand_cpulist = CpuList.expand_cpulist
@@ -220,6 +220,8 @@ class Cyclictest(rtevalModulePrototype):
self.__cpus = expand_cpulist(self.__cpulist)
# Only include online cpus
self.__cpus = CpuList(self.__cpus).cpulist
+ # Reset cpulist from the newly calculated self.__cpus
+ self.__cpulist = collapse_cpulist(self.__cpus)
self.__cpus = [str(c) for c in self.__cpus]
self.__sparse = True
else:
--
2.37.3