diff mbox series

rteval: cyclictest: Reset cpulist from newly calculated cpus

Message ID 20220727011202.158917-2-jkacur@redhat.com
State New
Headers show
Series rteval: cyclictest: Reset cpulist from newly calculated cpus | expand

Commit Message

John Kacur July 27, 2022, 1:12 a.m. UTC
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 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 mbox series

Patch

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: