* [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings
@ 2023-02-03 21:15 John Kacur
2023-02-03 21:15 ` [PATCH 2/8] rteval: rtevalReport.py: " John Kacur
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert regular strings to f-strings in __init__.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/__init__.py | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/rteval/__init__.py b/rteval/__init__.py
index 22af8e85d5aa..d8127425febe 100644
--- a/rteval/__init__.py
+++ b/rteval/__init__.py
@@ -59,7 +59,7 @@ def sig_handler(signum, frame):
stopsig_received = True
print("*** stop signal received - stopping rteval run ***")
else:
- raise RuntimeError("SIGNAL received! (%d)" % signum)
+ raise RuntimeError(f"SIGNAL received! ({signum})")
class RtEval(rtevalReport):
def __init__(self, config, loadmods, measuremods, logger):
@@ -96,10 +96,10 @@ class RtEval(rtevalReport):
self.__mailer = None
if not os.path.exists(self.__rtevcfg.xslt_report):
- raise RuntimeError("can't find XSL template (%s)!" % self.__rtevcfg.xslt_report)
+ raise RuntimeError(f"can't find XSL template ({self.__rtevcfg.xslt_report})!")
# Add rteval directory into module search path
- sys.path.insert(0, '%s/rteval' % sysconfig.get_python_lib())
+ sys.path.insert(0, f'{sysconfig.get_python_lib()}/rteval')
# Initialise the report module
rtevalReport.__init__(self, self.__version,
@@ -110,8 +110,7 @@ class RtEval(rtevalReport):
self.__xmlrpc = rtevalXMLRPC(self.__rtevcfg.xmlrpc, self.__logger, self.__mailer)
if not self.__xmlrpc.Ping():
if not self.__rtevcfg.xmlrpc_noabort:
- print("ERROR: Could not reach XML-RPC server '%s'. Aborting." % \
- self.__rtevcfg.xmlrpc)
+ print(f"ERROR: Could not reach XML-RPC server '{self.__rtevcfg.xmlrpc}'. Aborting.")
sys.exit(2)
else:
print("WARNING: Could not ping the XML-RPC server. Will continue anyway.")
@@ -174,8 +173,7 @@ class RtEval(rtevalReport):
measure_start = None
(with_loads, run_parallel) = measure_profile.GetProfile()
- self.__logger.log(Log.INFO, "Using measurement profile [loads: %s parallel: %s]" % (
- with_loads, run_parallel))
+ self.__logger.log(Log.INFO, f"Using measurement profile [loads: {with_loads} parallel: {run_parallel}]")
try:
nthreads = 0
@@ -183,23 +181,23 @@ class RtEval(rtevalReport):
if with_loads:
self._loadmods.Start()
- print("rteval run on %s started at %s" % (os.uname()[2], time.asctime()))
+ print(f"rteval run on {os.uname()[2]} started at {time.asctime()}")
onlinecpus = self._sysinfo.cpu_getCores(True)
cpulist = self._loadmods._cfg.GetSection("loads").cpulist
if cpulist:
- print("started %d loads on cores %s" % (self._loadmods.ModulesLoaded(), cpulist), end=' ')
+ print(f"started {self._loadmods.ModulesLoaded()} loads on cores {cpulist}", end=' ')
else:
- print("started %d loads on %d cores" % (self._loadmods.ModulesLoaded(), onlinecpus), end=' ')
+ print(f"started {self._loadmods.ModulesLoaded()} loads on {onlinecpus} cores", end=' ')
if self._sysinfo.mem_get_numa_nodes() > 1:
- print(" with %d numa nodes" % self._sysinfo.mem_get_numa_nodes())
+ print(f" with {self._sysinfo.mem_get_numa_nodes()} numa nodes")
else:
print("")
cpulist = self._measuremods._MeasurementModules__cfg.GetSection("measurement").cpulist
if cpulist:
- print("started measurement threads on cores %s" % cpulist)
+ print(f"started measurement threads on cores {cpulist}")
else:
- print("started measurement threads on %d cores" % onlinecpus)
- print("Run duration: %s seconds" % str(self.__rtevcfg.duration))
+ print(f"started measurement threads on {onlinecpus} cores")
+ print(f"Run duration: {str(self.__rtevcfg.duration)} seconds")
# start the cyclictest thread
measure_profile.Start()
@@ -219,7 +217,7 @@ class RtEval(rtevalReport):
# wait for time to expire or thread to die
signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)
- self.__logger.log(Log.INFO, "waiting for duration (%s)" % str(self.__rtevcfg.duration))
+ self.__logger.log(Log.INFO, f"waiting for duration ({str(self.__rtevcfg.duration)})")
stoptime = (time.time() + float(self.__rtevcfg.duration))
currtime = time.time()
rpttime = currtime + report_interval
@@ -246,7 +244,7 @@ class RtEval(rtevalReport):
left_to_run = stoptime - currtime
self.__show_remaining_time(left_to_run)
rpttime = currtime + report_interval
- print("load average: %.2f" % self._loadmods.GetLoadAvg())
+ print(f"load average: {self._loadmods.GetLoadAvg():.2f}")
currtime = time.time()
self.__logger.log(Log.DEBUG, "out of measurement loop")
@@ -265,7 +263,7 @@ class RtEval(rtevalReport):
if with_loads:
self._loadmods.Stop()
- print("stopping run at %s" % time.asctime())
+ print(f"stopping run at {time.asctime()}")
# wait for measurement modules to finish calculating stats
measure_profile.WaitForCompletion()
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/8] rteval: rtevalReport.py: Convert regular strings to f-strings
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 3/8] rteval: rtevalXMLRPC.py: " John Kacur
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert regular strings to f-strings in rtevalReport.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/rtevalReport.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rteval/rtevalReport.py b/rteval/rtevalReport.py
index fdfaed560cfa..af3e6c9a703b 100644
--- a/rteval/rtevalReport.py
+++ b/rteval/rtevalReport.py
@@ -100,11 +100,11 @@ class rtevalReport:
def _show_report(self, xmlfile, xsltfile):
'''summarize a previously generated xml file'''
- print("Loading %s for summarizing" % xmlfile)
+ print(f"Loading {xmlfile} for summarizing")
xsltfullpath = os.path.join(self.__installdir, xsltfile)
if not os.path.exists(xsltfullpath):
- raise RuntimeError("can't find XSL template (%s)!" % xsltfullpath)
+ raise RuntimeError(f"can't find XSL template ({xsltfullpath})!")
xmlreport = xmlout.XMLOut('rteval', self.__version)
xmlreport.LoadReport(xmlfile)
@@ -131,7 +131,7 @@ class rtevalReport:
def _tar_results(self):
if not os.path.isdir(self.__reportdir):
- raise RuntimeError("no such directory: %s" % self.__reportdir)
+ raise RuntimeError(f"no such directory: {self.__reportdir}")
dirname = os.path.dirname(self.__reportdir)
rptdir = os.path.basename(self.__reportdir)
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/8] rteval: rtevalXMLRPC.py: Convert regular strings to f-strings
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
2023-02-03 21:15 ` [PATCH 2/8] rteval: rtevalReport.py: " John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 4/8] rteval: rtevalConfig.py: " John Kacur
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert regular strings to f-strings in rtevalXMLRPC.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/rtevalXMLRPC.py | 34 ++++++++++++++--------------------
1 file changed, 14 insertions(+), 20 deletions(-)
diff --git a/rteval/rtevalXMLRPC.py b/rteval/rtevalXMLRPC.py
index f24e21a8ed2f..6dce12ad78bb 100644
--- a/rteval/rtevalXMLRPC.py
+++ b/rteval/rtevalXMLRPC.py
@@ -33,7 +33,7 @@ from .Log import Log
class rtevalXMLRPC:
def __init__(self, host, logger, mailer=None):
self.__host = host
- self.__url = "http://%s/rteval/API1/" % self.__host
+ self.__url = f"http://{self.__host}/rteval/API1/"
self.__logger = logger
self.__mailer = mailer
self.__client = rtevalclient.rtevalclient(self.__url)
@@ -41,7 +41,7 @@ class rtevalXMLRPC:
def Ping(self):
res = None
- self.__logger.log(Log.DEBUG, "Checking if XML-RPC server '%s' is reachable" % self.__host)
+ self.__logger.log(Log.DEBUG, f"Checking if XML-RPC server '{self.__host}' is reachable")
attempt = 0
ping_success = False
warning_sent = False
@@ -52,10 +52,10 @@ class rtevalXMLRPC:
ping_success = True
except xmlrpc.client.ProtocolError:
# Server do not support Hello(), but is reachable
- self.__logger.log(Log.INFO, "Got XML-RPC connection with %s but it did not support Hello()" % self.__host)
+ self.__logger.log(Log.INFO, f"Got XML-RPC connection with {self.__host} but it did not support Hello()")
res = None
except socket.error as err:
- self.__logger.log(Log.INFO, "Could not establish XML-RPC contact with %s\n%s" % (self.__host, str(err)))
+ self.__logger.log(Log.INFO, f"Could not establish XML-RPC contact with {self.__host}\n{str(err)}")
# Do attempts handling
attempt += 1
@@ -63,17 +63,16 @@ class rtevalXMLRPC:
break # To avoid sleeping before we abort
if (self.__mailer is not None) and (not warning_sent):
- self.__mailer.SendMessage("[RTEVAL:WARNING] Failed to ping XML-RPC server", "Server %s did not respond." % self.__host)
+ self.__mailer.SendMessage("[RTEVAL:WARNING] Failed to ping XML-RPC server", f"Server {self.__host} did not respond.")
warning_sent = True
- print("Failed pinging XML-RPC server. Doing another attempt(%i) " % attempt)
+ print(f"Failed pinging XML-RPC server. Doing another attempt({attempt}) ")
time.sleep(attempt) #*15) # Incremental sleep - sleep attempts*15 seconds
ping_success = False
if res:
- self.__logger.log(Log.INFO, "Verified XML-RPC connection with %s (XML-RPC API version: %i)" % (res["server"], res["APIversion"]))
- self.__logger.log(Log.DEBUG, "Recieved greeting: %s" % res["greeting"])
-
+ self.__logger.log(Log.INFO, f'Verified XML-RPC connection with {res["server"]} (XML-RPC API version: {res["APIversion"]})')
+ self.__logger.log(Log.DEBUG, f"Recieved greeting: {res['greeting']}")
return ping_success
@@ -85,9 +84,9 @@ class rtevalXMLRPC:
warning_sent = False
while attempt < 6:
try:
- print("Submitting report to %s" % self.__url)
+ print(f"Submitting report to {self.__url}")
rterid = self.__client.SendReport(xmlreport)
- print("Report registered with submission id %i" % rterid)
+ print(f"Report registered with submission id {rterid}")
attempt = 10
exitcode = 0 # Success
except socket.error:
@@ -96,12 +95,10 @@ class rtevalXMLRPC:
break # To avoid sleeping before we abort
if (self.__mailer is not None) and (not warning_sent):
- self.__mailer.SendMessage("[RTEVAL:WARNING] Failed to submit report to XML-RPC server",
- "Server %s did not respond. Not giving up yet."
- % self.__host)
+ self.__mailer.SendMessage("[RTEVAL:WARNING] Failed to submit report to XML-RPC server", f"Server {self.__host} did not respond. Not giving up yet.")
warning_sent = True
- print("Failed sending report. Doing another attempt(%i) " % attempt)
+ print(f"Failed sending report. Making another attempt({attempt}) ")
time.sleep(attempt) #*5*60) # Incremental sleep - sleep attempts*5 minutes
except Exception as err:
@@ -111,12 +108,9 @@ class rtevalXMLRPC:
if self.__mailer is not None:
# Send final result messages
if exitcode == 2:
- self.__mailer.SendMessage("[RTEVAL:FAILURE] Failed to submit report to XML-RPC server",
- "Server %s did not respond at all after %i attempts."
- % (self.__host, attempt - 1))
+ self.__mailer.SendMessage("[RTEVAL:FAILURE] Failed to submit report to XML-RPC server", f"Server {self.__host} did not respond at all after {attempt - 1} attempts.")
elif (exitcode == 0) and warning_sent:
self.__mailer.SendMessage("[RTEVAL:SUCCESS] XML-RPC server available again",
- "Succeeded to submit the report to %s"
- % self.__host)
+ f"Succeeded to submit the report to {self.__host}")
return exitcode
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/8] rteval: rtevalConfig.py: Convert regular strings to f-strings
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
2023-02-03 21:15 ` [PATCH 2/8] rteval: rtevalReport.py: " John Kacur
2023-02-03 21:15 ` [PATCH 3/8] rteval: rtevalXMLRPC.py: " John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 5/8] rteval: xmlout.py: Convert to f-strings where possible John Kacur
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert regular strings to f-strings in rtevalConfig.py
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/rtevalConfig.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py
index decd36ed18ab..de88924642ca 100644
--- a/rteval/rtevalConfig.py
+++ b/rteval/rtevalConfig.py
@@ -196,7 +196,7 @@ class rtevalConfig:
# get our system topology info
self.__systopology = SysTopology()
- print(("got system topology: %s" % self.__systopology))
+ print(f"got system topology: {self.__systopology}")
# Import the default config first
for sect, vals in list(default_config.items()):
@@ -225,7 +225,7 @@ class rtevalConfig:
"Simple method for dumping config when object is used as a string"
ret = ""
for sect in list(self.__config_data.keys()):
- ret += "[%s]\n%s\n" % (sect, str(self.__config_data[sect]))
+ ret += f"[{sect}]\n{str(self.__config_data[sect])}\n"
return ret
@@ -240,7 +240,7 @@ class rtevalConfig:
for f in ('rteval.conf', '/etc/rteval.conf'):
p = os.path.abspath(f)
if os.path.exists(p):
- self.__info("found config file %s" % p)
+ self.__info(f"found config file {p}")
return p
raise RuntimeError("Unable to find configfile")
@@ -258,7 +258,7 @@ class rtevalConfig:
# Don't try to reread this file if it's already been parsed
return
- self.__info("reading config file %s" % cfgfile)
+ self.__info(f"reading config file {cfgfile}")
ini = configparser.ConfigParser()
ini.optionxform = str
ini.read(cfgfile)
@@ -321,7 +321,7 @@ class rtevalConfig:
# Return a new object with config settings of a given section
return self.__config_data[section]
except KeyError:
- raise KeyError("The section '%s' does not exist in the config file" % section)
+ raise KeyError(f"The section '{section}' does not exist in the config file")
def unit_test(rootdir):
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/8] rteval: xmlout.py: Convert to f-strings where possible
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
` (2 preceding siblings ...)
2023-02-03 21:15 ` [PATCH 4/8] rteval: rtevalConfig.py: " John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 6/8] rteval: Log.py: Convert to f-strings John Kacur
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert xmlout.py to f-strings where possible
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/xmlout.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/rteval/xmlout.py b/rteval/xmlout.py
index a955fb11c77a..b549cc87a2cc 100644
--- a/rteval/xmlout.py
+++ b/rteval/xmlout.py
@@ -67,7 +67,7 @@ class XMLOut:
def __del__(self):
if self.level > 0:
- raise RuntimeError("XMLOut: open blocks at __del__ (last opened '%s')" % self.currtag.name)
+ raise RuntimeError(f"XMLOut: open blocks at __del__ (last opened '{self.currtag.name}')")
if self.xmldoc is not None:
self.xmldoc.freeDoc()
@@ -131,7 +131,7 @@ class XMLOut:
self.__parseToXML(n, v)
node.addChild(n)
else:
- raise TypeError("unhandled type (%s) for value '%s'" % (type(data), str(data)))
+ raise TypeError(f"unhandled type ({str(type(data))}) for value '{str(data)}'")
def close(self):
if self.status == 0:
@@ -139,7 +139,7 @@ class XMLOut:
if self.status == 3:
raise RuntimeError("XMLOut: XML document already closed")
if self.level > 0:
- raise RuntimeError("XMLOut: open blocks at close() (last opened '%s')" % self.currtag.name)
+ raise RuntimeError(f"XMLOut: open blocks at close() (last opened '{self.currtag.name}')")
if self.status == 1: # Only set the root node in the doc on created reports (NewReport called)
self.xmldoc.setRootElement(self.xmlroot)
@@ -172,7 +172,7 @@ class XMLOut:
root = self.xmldoc.children
if root.name != self.roottag:
self.status = 3
- raise RuntimeError("XMLOut: Loaded report is not a valid %s XML file" % self.roottag)
+ raise RuntimeError(f"XMLOut: Loaded report is not a valid {self.roottag} XML file")
if validate_version is True:
ver = root.hasProp('version')
@@ -183,7 +183,7 @@ class XMLOut:
if ver.getContent() != self.version:
self.status = 3
- raise RuntimeError("XMLOut: Loaded report is not of version %s" % self.version)
+ raise RuntimeError(f"XMLOut: Loaded report is not of version {self.version}")
self.status = 2 # Confirm that we have loaded a report from file
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/8] rteval: Log.py: Convert to f-strings
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
` (3 preceding siblings ...)
2023-02-03 21:15 ` [PATCH 5/8] rteval: xmlout.py: Convert to f-strings where possible John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 7/8] rteval: Catch failures in python-dmidecode John Kacur
2023-02-03 21:15 ` [PATCH 8/8] rteval: Change the default kernel to compile to linux-6.1.8 John Kacur
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
Convert Log.py to f-strings
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/Log.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/rteval/Log.py b/rteval/Log.py
index 63ca3b8681f8..8d08ab3e210a 100644
--- a/rteval/Log.py
+++ b/rteval/Log.py
@@ -60,10 +60,7 @@ class Log:
def log(self, logtype, msg):
if (logtype & self.__logverb) or logtype == self.ALWAYS:
- self.__logfile.write("%s%s\n" %
- (self.__logtype_str(logtype),
- msg)
- )
+ self.__logfile.write(f"{self.__logtype_str(logtype)}{msg}\n")
@@ -80,8 +77,8 @@ def unit_test(rootdir):
def run_log_test(l):
for lt in range(min(logtypes), max(logtypes)*2):
test = ", ".join([logtypes_s[logtypes.index(i)] for i in [p for p in takewhile(lambda x: x <= lt, (2**i for i in count())) if p & lt]])
- print("Testing verbosity flags set to: (%i) %s" % (lt, test))
- msg = "Log entry when verbosity is set to %i [%s]" % (lt, test)
+ print(f"Testing verbosity flags set to: ({lt}) {test}")
+ msg = f"Log entry when verbosity is set to {lt} [{test}]"
l.SetLogVerbosity(lt)
test_log(l, msg)
print("-"*20)
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/8] rteval: Catch failures in python-dmidecode
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
` (4 preceding siblings ...)
2023-02-03 21:15 ` [PATCH 6/8] rteval: Log.py: Convert to f-strings John Kacur
@ 2023-02-03 21:15 ` John Kacur
2023-02-03 21:15 ` [PATCH 8/8] rteval: Change the default kernel to compile to linux-6.1.8 John Kacur
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
python-dmidecode can generate incorrect xml,
namely Attribute unit redefined
Although useful, the dmidecode is not critical to rteval reporting.
Therefore catch this, and first see if we can at least query the bios.
If that works report the bios instead of all, and if that
doesn't work, just continue without the dmidecode report.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/sysinfo/dmi.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/rteval/sysinfo/dmi.py b/rteval/sysinfo/dmi.py
index 83f347623b58..89a7faae06b1 100644
--- a/rteval/sysinfo/dmi.py
+++ b/rteval/sysinfo/dmi.py
@@ -79,6 +79,7 @@ class DMIinfo:
def __init__(self, logger=None):
self.__version = '0.6'
+ self._log = logger
if not dmidecode_avail:
logger.log(Log.DEBUG, "DMI info unavailable, ignoring DMI tables")
@@ -115,7 +116,18 @@ class DMIinfo:
rep_n.newProp("not_available", "1")
else:
self.__dmixml.SetResultType(dmidecode.DMIXML_DOC)
- dmiqry = xmlout.convert_libxml2_to_lxml_doc(self.__dmixml.QuerySection('all'))
+ try:
+ dmiqry = xmlout.convert_libxml2_to_lxml_doc(self.__dmixml.QuerySection('all'))
+ except Exception as ex1:
+ self._log.log(Log.DEBUG, f'** EXCEPTION {str(ex1)}, will query BIOS only')
+ try:
+ # If we can't query 'all', at least query 'bios'
+ dmiqry = xmlout.convert_libxml2_to_lxml_doc(self.__dmixml.QuerySection('bios'))
+ except Exception as ex2:
+ rep_n.addContent("No DMI tables available")
+ rep_n.newProp("not_available", "1")
+ self._log.log(Log.DEBUG, f'** EXCEPTION {str(ex2)}, dmi info will not be reported')
+ return rep_n
resdoc = self.__xsltparser(dmiqry)
dmi_n = xmlout.convert_lxml_to_libxml2_nodes(resdoc.getroot())
rep_n.addChild(dmi_n)
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 8/8] rteval: Change the default kernel to compile to linux-6.1.8
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
` (5 preceding siblings ...)
2023-02-03 21:15 ` [PATCH 7/8] rteval: Catch failures in python-dmidecode John Kacur
@ 2023-02-03 21:15 ` John Kacur
6 siblings, 0 replies; 8+ messages in thread
From: John Kacur @ 2023-02-03 21:15 UTC (permalink / raw)
To: RT; +Cc: Clark Williams, John Kacur
rteval compiles the linux kernel as a load
Change the default kernel that rteval compiles to linux-6.1.8
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 2 +-
rteval/modules/loads/kcompile.py | 4 ++--
rteval/rteval.conf | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index ffea8a05f460..81ca8242bbbe 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ PREFIX := /usr
DATADIR := $(DESTDIR)/$(PREFIX)/share
LOADDIR := loadsource
-KLOAD := $(LOADDIR)/linux-5.18.1.tar.xz
+KLOAD := $(LOADDIR)/linux-6.1.8.tar.xz
BLOAD := $(LOADDIR)/dbench-4.0.tar.gz
LOADS := $(KLOAD) $(BLOAD)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 6faa686f81d0..35ee5cbbb52d 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -38,7 +38,7 @@ from rteval.systopology import CpuList, SysTopology
expand_cpulist = CpuList.expand_cpulist
compress_cpulist = CpuList.compress_cpulist
-DEFAULT_KERNEL_PREFIX = "linux-5.18"
+DEFAULT_KERNEL_PREFIX = "linux-6.1"
class KBuildJob:
'''Class to manage a build job bound to a particular node'''
@@ -349,7 +349,7 @@ class Kcompile(CommandLineLoad):
def ModuleParameters():
return {"source": {"descr": "Source tar ball",
- "default": "linux-5.18.1.tar.xz",
+ "default": "linux-6.1.8.tar.xz",
"metavar": "TARBALL"},
"jobspercore": {"descr": "Number of working threads per core",
"default": 2,
diff --git a/rteval/rteval.conf b/rteval/rteval.conf
index 1a8d0afd2642..79e28032dc6b 100644
--- a/rteval/rteval.conf
+++ b/rteval/rteval.conf
@@ -18,7 +18,7 @@ dbench: external
stressng: module
[kcompile]
-source: linux-5.18.1.xz
+source: linux-6.1.8.xz
jobspercore: 2
[hackbench]
--
2.39.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-02-03 21:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 21:15 [PATCH 1/8] rteval: rteval/__init__.py: Convert regular strings to f-strings John Kacur
2023-02-03 21:15 ` [PATCH 2/8] rteval: rtevalReport.py: " John Kacur
2023-02-03 21:15 ` [PATCH 3/8] rteval: rtevalXMLRPC.py: " John Kacur
2023-02-03 21:15 ` [PATCH 4/8] rteval: rtevalConfig.py: " John Kacur
2023-02-03 21:15 ` [PATCH 5/8] rteval: xmlout.py: Convert to f-strings where possible John Kacur
2023-02-03 21:15 ` [PATCH 6/8] rteval: Log.py: Convert to f-strings John Kacur
2023-02-03 21:15 ` [PATCH 7/8] rteval: Catch failures in python-dmidecode John Kacur
2023-02-03 21:15 ` [PATCH 8/8] rteval: Change the default kernel to compile to linux-6.1.8 John Kacur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).