Skip to contentSkip to conversation

rteval: Change constant name to uppercase

PATCH New John Kacur 1 participant 2 messages Oct 24, 2024 Kbuild

lore
Share & tools
lore

John Kacur

author
#0 lore raw

PATCH 1/2 rteval: Change constant name to uppercase

Change constant name earlystop to EARLYSTOP
add "from err" when re-raising RuntimeError

---
 rteval/__init__.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
rteval/__init__.py +7 -7
index 8ded374d287e..7c13e84e03bf 100644
@@ -28,7 +28,7 @@ from rteval import version
 
 RTEVAL_VERSION = version.RTEVAL_VERSION
 
-earlystop = False
+EARLYSTOP = False
 
 stopsig = threading.Event()
 def sig_handler(signum, frame):
@@ -106,7 +106,7 @@ class RtEval(rtevalReport):
             if not onlyload or self.__rtevcfg.logging:
                 self.__reportdir = self._make_report_dir(self.__rtevcfg.workdir, "summary.xml")
         except Exception as err:
-            raise RuntimeError(f"Cannot create report directory (NFS with rootsquash on?) [{err}]]")
+            raise RuntimeError(f"Cannot create report directory (NFS with rootsquash on?) [{err}]]") from err
 
         params = {'workdir':self.__rtevcfg.workdir,
                   'reportdir':self.__reportdir and self.__reportdir or "",
@@ -131,7 +131,7 @@ class RtEval(rtevalReport):
 
 
     def __RunMeasurement(self):
-        global earlystop
+        global EARLYSTOP
 
         measure_start = None
         try:
@@ -186,7 +186,7 @@ class RtEval(rtevalReport):
                 stopsig.wait(min(stoptime - currtime, 60.0))
                 if not self._measuremods.isAlive():
                     stoptime = currtime
-                    earlystop = True
+                    EARLYSTOP = True
                     self.__logger.log(Log.WARN,
                                       "Measurement threads did not use the full time slot. Doing a controlled stop.")
 
@@ -214,7 +214,7 @@ class RtEval(rtevalReport):
 
         except RuntimeError as err:
             if not stopsig.is_set():
-                raise RuntimeError(f"appeared during measurement: {err}")
+                raise RuntimeError(f"appeared during measurement: {err}") from err
 
         finally:
             # stop measurement threads
@@ -234,7 +234,7 @@ class RtEval(rtevalReport):
 
     def Measure(self):
         """ Run the full measurement suite with reports """
-        global earlystop
+        global EARLYSTOP
         rtevalres = 0
         measure_start = self.__RunMeasurement()
 
@@ -242,7 +242,7 @@ class RtEval(rtevalReport):
         if self.__rtevcfg.sysreport:
             self._sysinfo.run_sysreport(self.__reportdir)
 
-        if earlystop:
+        if EARLYSTOP:
             rtevalres = 1
         self._sysinfo.copy_dmesg(self.__reportdir)
         self._tar_results()
Signature · 1 line
2.46.2
author
#1 lore raw

PATCH 2/2 rteval: Update the kcompile kernel to linux-6.12-rc4

Update the kernel that rteval compiles as a load in the load module kcompile

This kernel contains patches to address the fact that ENGINE API has been deprecated since OpenSSL version 3.0. This is important because some distros have been dropping the headers for the deprecated api and this has been causing kcompile to fail, unless you supply a special kernel with the patches to address this.

With this change the upstream kernel as is will work again.

---
 Dockerfile                       | 2 +-
 Makefile                         | 2 +-
 rteval/modules/loads/kcompile.py | 4 ++--
 rteval/rteval.conf               | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
Dockerfile +1 -1
index f3ee516b57d5..b8f602b11703 100644
@@ -1,7 +1,7 @@
 # Use CentOS Stream 9 as base image
 FROM centos:stream9
 
-ARG KERNEL_VERSION=linux-6.10.5.tar.xz
+ARG KERNEL_VERSION=linux-6.12-rc4.tar.gz
 
 
 # Copy current directory to /opt/rteval/
Makefile +1 -1
index e1a2bbba0373..a250b18611b4 100644
@@ -14,7 +14,7 @@ PREFIX  :=      /usr
 DATADIR	:=	$(DESTDIR)/$(PREFIX)/share
 LOADDIR	:=	loadsource
 
-KLOAD	:=	$(LOADDIR)/linux-6.10.5.tar.xz
+KLOAD	:=	$(LOADDIR)/linux-6.12-rc4.tar.gz
 BLOAD	:=	$(LOADDIR)/dbench-4.0.tar.gz
 LOADS	:=	$(KLOAD) $(BLOAD)
 
rteval/modules/loads/kcompile.py +2 -2
index 58c542201a1b..8a3a0e93fa14 100644
@@ -21,7 +21,7 @@ expand_cpulist = cpulist_utils.expand_cpulist
 compress_cpulist = cpulist_utils.compress_cpulist
 nonisolated_cpulist = cpulist_utils.nonisolated_cpulist
 
-DEFAULT_KERNEL_PREFIX = "linux-6.10.5"
+DEFAULT_KERNEL_PREFIX = "linux-6.12-rc4"
 
 class KBuildJob:
     '''Class to manage a build job bound to a particular node'''
@@ -342,7 +342,7 @@ class Kcompile(CommandLineLoad):
 
 def ModuleParameters():
     return {"source":   {"descr": "Source tar ball",
-                         "default": "linux-6.10.5.tar.xz",
+                         "default": "linux-6.12-rc4.tar.gz",
                          "metavar": "TARBALL"},
             "jobspercore": {"descr": "Number of working threads per core",
                             "default": 2,
rteval/rteval.conf +1 -1
index 0611c031c2a0..5a49040d980f 100644
@@ -18,7 +18,7 @@ dbench:    external
 stressng: module
 
 [kcompile]
-source: linux-6.10.5.xz
+source: linux-6.12-rc4.tar.gz
 jobspercore: 2
 
 [hackbench]
Signature · 1 line
2.46.2