From bd54146cc77729f945a7553fd1b00f033302d75e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 29 Aug 2020 18:28:19 +0000 Subject: [PATCH] import rteval-3.0-13.el8 --- .gitignore | 1 + .rteval.metadata | 1 + ...emove-non-distutil-install-leftovers.patch | 51 ++ ...le-Use-parentheses-around-print-args.patch | 29 + ...-t-abort-if-a-workload-isn-t-running.patch | 34 + .../rteval-Add-the-stressng-load-module.patch | 199 +++++ ...her-cpu-online-before-adding-to-list.patch | 119 +++ ...sume-cpu0-cannot-be-offlined-test-it.patch | 33 + ...orrectly-when-model-name-has-a-colon.patch | 37 + ...elf.cmd-to-self.args-for-inheritance.patch | 83 +++ ...e-changes-to-rteval-modules-measurem.patch | 57 ++ .../rteval-Use-linux-5.7-in-kcompile.patch | 80 ++ ...t.py-Some-style-changes-suggested-by.patch | 100 +++ ...ckbench-Fix-interating-through-nodes.patch | 41 + ....py-Some-Style-changes-suggested-by-.patch | 70 ++ ...py-Some-style-changes-suggested-by-p.patch | 133 ++++ ..._init__.py-Some-style-changes-sugges.patch | 117 +++ ...de-in-args-to-Popen-must-be-a-string.patch | 54 ++ ...g.py-Some-style-changes-suggested-fr.patch | 45 ++ ...init__.py-A-few-style-changes-sugges.patch | 38 + ...d-Some-style-changes-suggested-by-py.patch | 87 +++ ...fig.py-Some-style-changes-suggested-.patch | 117 +++ ...lReport.py-Fix-non-existant-variable.patch | 28 + ...ort.py-Some-style-changes-suggested-.patch | 51 ++ ...ome-style-changes-suggested-by-pylin.patch | 55 ++ ...gy.py-Some-style-changes-suggested-b.patch | 103 +++ ...ystopology-for-hackbench-online-cpus.patch | 78 ++ SPECS/rteval.spec | 701 ++++++++++++++++++ 28 files changed, 2542 insertions(+) create mode 100644 .gitignore create mode 100644 .rteval.metadata create mode 100644 SOURCES/Makefile-Remove-non-distutil-install-leftovers.patch create mode 100644 SOURCES/Makefile-Use-parentheses-around-print-args.patch create mode 100644 SOURCES/modules-Don-t-abort-if-a-workload-isn-t-running.patch create mode 100644 SOURCES/rteval-Add-the-stressng-load-module.patch create mode 100644 SOURCES/rteval-Check-whether-cpu-online-before-adding-to-list.patch create mode 100644 SOURCES/rteval-Don-t-assume-cpu0-cannot-be-offlined-test-it.patch create mode 100644 SOURCES/rteval-Parse-cpuinfo-correctly-when-model-name-has-a-colon.patch create mode 100644 SOURCES/rteval-Rename-self.cmd-to-self.args-for-inheritance.patch create mode 100644 SOURCES/rteval-Some-style-changes-to-rteval-modules-measurem.patch create mode 100644 SOURCES/rteval-Use-linux-5.7-in-kcompile.patch create mode 100644 SOURCES/rteval-cyclictest.py-Some-style-changes-suggested-by.patch create mode 100644 SOURCES/rteval-hackbench-Fix-interating-through-nodes.patch create mode 100644 SOURCES/rteval-hackbench.py-Some-Style-changes-suggested-by-.patch create mode 100644 SOURCES/rteval-kcompile.py-Some-style-changes-suggested-by-p.patch create mode 100644 SOURCES/rteval-modules-__init__.py-Some-style-changes-sugges.patch create mode 100644 SOURCES/rteval-node-in-args-to-Popen-must-be-a-string.patch create mode 100644 SOURCES/rteval-rteval-Log.py-Some-style-changes-suggested-fr.patch create mode 100644 SOURCES/rteval-rteval-__init__.py-A-few-style-changes-sugges.patch create mode 100644 SOURCES/rteval-rteval-cmd-Some-style-changes-suggested-by-py.patch create mode 100644 SOURCES/rteval-rtevalConfig.py-Some-style-changes-suggested-.patch create mode 100644 SOURCES/rteval-rtevalReport.py-Fix-non-existant-variable.patch create mode 100644 SOURCES/rteval-rtevalReport.py-Some-style-changes-suggested-.patch create mode 100644 SOURCES/rteval-sysstat-Some-style-changes-suggested-by-pylin.patch create mode 100644 SOURCES/rteval-systopology.py-Some-style-changes-suggested-b.patch create mode 100644 SOURCES/rteval-use-systopology-for-hackbench-online-cpus.patch create mode 100644 SPECS/rteval.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..60a09eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/rteval-3.0.tar.xz diff --git a/.rteval.metadata b/.rteval.metadata new file mode 100644 index 0000000..0078bc9 --- /dev/null +++ b/.rteval.metadata @@ -0,0 +1 @@ +ee9134bcf8791823770f3ed764e52d003bd7a597 SOURCES/rteval-3.0.tar.xz diff --git a/SOURCES/Makefile-Remove-non-distutil-install-leftovers.patch b/SOURCES/Makefile-Remove-non-distutil-install-leftovers.patch new file mode 100644 index 0000000..9f39443 --- /dev/null +++ b/SOURCES/Makefile-Remove-non-distutil-install-leftovers.patch @@ -0,0 +1,51 @@ +From 3a432a4217e1d91bb1dbc2e0503942997c40f370 Mon Sep 17 00:00:00 2001 +From: Scott Wood +Date: Mon, 6 Apr 2020 17:14:03 -0500 +Subject: [PATCH 01/17] Makefile: Remove non-distutil install leftovers + +setup.py installs into /usr/local by default, but the makefile +is still creating directories in /usr that it doesn't install +anything into. Worse, the uninstall target removes things +from /usr rather than what was installed by "make install". + +Signed-off-by: Scott Wood +Signed-off-by: John Kacur +--- + Makefile | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/Makefile b/Makefile +index f784ba778bc3..f91e6e06a9a4 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,9 +15,6 @@ XMLRPCDIR := server + DESTDIR := + PREFIX := /usr + DATADIR := $(DESTDIR)/$(PREFIX)/share +-CONFDIR := $(DESTDIR)/etc +-MANDIR := $(DESTDIR)/$(PREFIX)/share/man +-PYLIB := $(DESTDIR)$(shell $(PYTHON) -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') + LOADDIR := loadsource + + KLOAD := $(LOADDIR)/linux-5.1.tar.xz +@@ -60,17 +57,6 @@ install_loads: $(LOADS) + + installdirs: + [ -d $(DATADIR)/rteval ] || mkdir -p $(DATADIR)/rteval +- [ -d $(CONFDIR) ] || mkdir -p $(CONFDIR) +- [ -d $(MANDIR)/man8 ] || mkdir -p $(MANDIR)/man8 +- [ -d $(PYLIB) ] || mkdir -p $(PYLIB) +- [ -d $(DESTDIR)/usr/bin ] || mkdir -p $(DESTDIR)/usr/bin +- +-uninstall: +- rm -f /usr/bin/rteval +- rm -f $(CONFDIR)/rteval.conf +- rm -f $(MANDIR)/man8/rteval.8.gz +- rm -rf $(PYLIB)/rteval +- rm -rf $(DATADIR)/rteval + + tarfile: rteval-$(VERSION).tar.bz2 + +-- +2.21.3 + diff --git a/SOURCES/Makefile-Use-parentheses-around-print-args.patch b/SOURCES/Makefile-Use-parentheses-around-print-args.patch new file mode 100644 index 0000000..270f64d --- /dev/null +++ b/SOURCES/Makefile-Use-parentheses-around-print-args.patch @@ -0,0 +1,29 @@ +From 91f72680851a7ab863d3733bc90e915404e68bc8 Mon Sep 17 00:00:00 2001 +From: Scott Wood +Date: Mon, 6 Apr 2020 17:14:04 -0500 +Subject: [PATCH 02/17] Makefile: Use parentheses around print args + +Otherwise, this fails on python3. + +Signed-off-by: Scott Wood +Signed-off-by: John Kacur +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f91e6e06a9a4..479bda8d8674 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,7 +5,7 @@ else + PYTHON = python2 + endif + PACKAGE := rteval +-VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION") ++VERSION := $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print(RTEVAL_VERSION)") + D := 10 + + # XML-RPC related files +-- +2.21.3 + diff --git a/SOURCES/modules-Don-t-abort-if-a-workload-isn-t-running.patch b/SOURCES/modules-Don-t-abort-if-a-workload-isn-t-running.patch new file mode 100644 index 0000000..8380aad --- /dev/null +++ b/SOURCES/modules-Don-t-abort-if-a-workload-isn-t-running.patch @@ -0,0 +1,34 @@ +From 7aba0df2cc6072da955ee0ad8bf907dc10cec468 Mon Sep 17 00:00:00 2001 +From: Scott Wood +Date: Mon, 6 Apr 2020 17:14:05 -0500 +Subject: [PATCH 03/17] modules: Don't abort if a workload isn't running + +Each module is responsible for respawning the load when it finishes. The +only thing that the additional check at the rtevalModulePrototype level +accomplishes is introducing a race condition that will kill rteval if a +load ends after _WorkloadTask() checks, but before the check in the +caller. + +Signed-off-by: Scott Wood +Signed-off-by: John Kacur +--- + rteval/modules/__init__.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py +index 0feb8a916179..5ae7cd488406 100644 +--- a/rteval/modules/__init__.py ++++ b/rteval/modules/__init__.py +@@ -189,9 +189,6 @@ class rtevalModulePrototype(threading.Thread): + + if self.shouldStop(): + break +- if not self.WorkloadAlive(): +- self._log(Log.DEBUG, "%s workload stopped running." % self._module_type) +- break + time.sleep(self.__sleeptime) + + self.__timestamps["runloop_stop"] = datetime.now() +-- +2.21.3 + diff --git a/SOURCES/rteval-Add-the-stressng-load-module.patch b/SOURCES/rteval-Add-the-stressng-load-module.patch new file mode 100644 index 0000000..2a6432a --- /dev/null +++ b/SOURCES/rteval-Add-the-stressng-load-module.patch @@ -0,0 +1,199 @@ +From d136b8b29b0ec90f07d89dfd834e02f8f8e525b6 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Mon, 15 Jun 2020 18:06:45 -0400 +Subject: [PATCH 17/17] rteval: Add the stressng load module + +Add the stressng load module to run stress-ng as a load to rteval + +Signed-off-by: John Kacur +--- + rteval-cmd | 3 +- + rteval.conf | 1 + + rteval/modules/loads/stressng.py | 135 +++++++++++++++++++++++++++++++ + rteval/rteval.conf | 3 +- + 4 files changed, 140 insertions(+), 2 deletions(-) + create mode 100644 rteval/modules/loads/stressng.py + +diff --git a/rteval-cmd b/rteval-cmd +index 7d0d00516bd3..bc6948699788 100755 +--- a/rteval-cmd ++++ b/rteval-cmd +@@ -221,7 +221,8 @@ if __name__ == '__main__': + if not config.HasSection('loads'): + config.AppendConfig('loads', { + 'kcompile' : 'module', +- 'hackbench' : 'module'}) ++ 'hackbench' : 'module', ++ 'stressng' : 'module'}) + + if not config.HasSection('measurement'): + config.AppendConfig('measurement', { +diff --git a/rteval.conf b/rteval.conf +index 6b22b29943ee..4c32fcf4d842 100644 +--- a/rteval.conf ++++ b/rteval.conf +@@ -11,3 +11,4 @@ cyclictest: module + [loads] + kcompile: module + hackbench: module ++stressng: module +diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py +new file mode 100644 +index 000000000000..e5edb51c4c44 +--- /dev/null ++++ b/rteval/modules/loads/stressng.py +@@ -0,0 +1,135 @@ ++""" Module containing class Stressng to manage stress-ng as an rteval load """ ++import os ++import os.path ++import time ++import subprocess ++import signal ++from rteval.modules.loads import CommandLineLoad ++from rteval.Log import Log ++from rteval.misc import expand_cpulist ++from rteval.systopology import SysTopology ++ ++class Stressng(CommandLineLoad): ++ " This class creates a load module that runs stress-ng " ++ def __init__(self, config, logger): ++ CommandLineLoad.__init__(self, "stressng", config, logger) ++ self.logger = logger ++ self.started = False ++ self.process = None ++ self.cfg = config ++ self.__in = None ++ self.__out = None ++ self.__err = None ++ self.__nullfp = None ++ self.cmd = None ++ " Only run this module if the user specifies an option " ++ if self.cfg.option is not None: ++ self._donotrun = False ++ else: ++ self._donotrun = True ++ ++ def _WorkloadSetup(self): ++ " Since there is nothing to build, we don't need to do anything here " ++ return ++ ++ def _WorkloadBuild(self): ++ " Nothing to build, so we are ready " ++ self._setReady() ++ ++ def _WorkloadPrepare(self): ++ " Set-up logging " ++ self.__nullfp = os.open("/dev/null", os.O_RDWR) ++ self.__in = self.__nullfp ++ if self._logging: ++ self.__out = self.open_logfile("stressng.stdout") ++ self.__err = self.open_logfile("stressng.stderr") ++ else: ++ self.__out = self.__err = self.__nullfp ++ ++ # stress-ng is only run if the user specifies an option ++ self.cmd = ['stress-ng'] ++ self.cmd.append('--%s' % str(self.cfg.option)) ++ if self.cfg.arg is not None: ++ self.cmd.append(self.cfg.arg) ++ if self.cfg.timeout is not None: ++ self.cmd.append('--timeout %s' % str(self.cfg.timeout)) ++ ++ systop = SysTopology() ++ # get the number of nodes ++ nodes = systop.getnodes() ++ ++ # get the cpus for each node ++ cpus = {} ++ for n in nodes: ++ cpus[n] = systop.getcpus(int(n)) ++ # if a cpulist was specified, only allow cpus in that list on the node ++ if self.cpulist: ++ cpus[n] = [c for c in cpus[n] if str(c) in expand_cpulist(self.cpulist)] ++ ++ # remove nodes with no cpus available for running ++ for node, cpu in list(cpus.items()): ++ if not cpu: ++ nodes.remove(node) ++ self._log(Log.DEBUG, "node %s has no available cpus, removing" % node) ++ if self.cpulist: ++ for node in nodes: ++ cpulist = ",".join([str(n) for n in cpus[node]]) ++ self.cmd.append('--taskset %s' % cpulist) ++ ++ def _WorkloadTask(self): ++ """ Kick of the workload here """ ++ if self.started: ++ # Only start the task once ++ return ++ ++ self._log(Log.DEBUG, "starting with %s" % " ".join(self.cmd)) ++ try: ++ self.process = subprocess.Popen(self.cmd, ++ stdout=self.__out, ++ stderr=self.__err, ++ stdin=self.__in) ++ self.started = True ++ self._log(Log.DEBUG, "running") ++ except OSError: ++ self._log(Log.DEBUG, "Failed to run") ++ self.started = False ++ return ++ ++ def WorkloadAlive(self): ++ " Return true if stress-ng workload is alive " ++ if self.started: ++ return self.process.poll() is None ++ return False ++ ++ def _WorkloadCleanup(self): ++ " Makesure to kill stress-ng before rteval ends " ++ if not self.started: ++ return ++ # poll() returns None if the process is still running ++ while self.process.poll() is None: ++ self._log(Log.DEBUG, "Sending SIGINT") ++ self.process.send_signal(signal.SIGINT) ++ time.sleep(2) ++ return ++ ++ ++def create(config, logger): ++ """ Create an instance of the Stressng class in stressng module """ ++ return Stressng(config, logger) ++ ++def ModuleParameters(): ++ """ Commandline options for Stress-ng """ ++ return { ++ "option": { ++ "descr": "stressor specific option", ++ "metavar": "OPTION" ++ }, ++ "arg": { ++ "descr": "stressor specific arg", ++ "metavar" : "ARG" ++ }, ++ "timeout": { ++ "descr": "timeout after T seconds", ++ "metavar" : "T" ++ }, ++ } +diff --git a/rteval/rteval.conf b/rteval/rteval.conf +index 0d1afb30b754..db0b8ef005b6 100644 +--- a/rteval/rteval.conf ++++ b/rteval/rteval.conf +@@ -15,9 +15,10 @@ priority: 95 + kcompile: module + hackbench: module + dbench: external ++stressng: module + + [kcompile] +-source: linux-2.6.39.tar.bz2 ++source: linux-5.1.xz + jobspercore: 2 + + [hackbench] +-- +2.21.3 + diff --git a/SOURCES/rteval-Check-whether-cpu-online-before-adding-to-list.patch b/SOURCES/rteval-Check-whether-cpu-online-before-adding-to-list.patch new file mode 100644 index 0000000..b47ce44 --- /dev/null +++ b/SOURCES/rteval-Check-whether-cpu-online-before-adding-to-list.patch @@ -0,0 +1,119 @@ +From f65d46723cd0e2d3a9b1f788b0ffa51e7fd04f8b Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 23 May 2019 17:54:20 +0200 +Subject: [PATCH 1/2] rteval: Check whether a cpu is online before adding it to + the list + +Check whether a cpu is online before adding it to the list + +If sys online files exist, use them to determine if a cpu is online + +This is done in two places, misc.py, and also in systopology which is +getting the cpus from the numa node in /sys/devices, including offline +cpus + +Signed-off-by: John Kacur +--- + rteval/misc.py | 19 ++++++++++++++++++- + rteval/systopology.py | 29 ++++++++++++++++++++++++----- + 2 files changed, 42 insertions(+), 6 deletions(-) + +diff --git a/rteval/misc.py b/rteval/misc.py +index 7c9991483728..a43a8964e061 100644 +--- a/rteval/misc.py ++++ b/rteval/misc.py +@@ -36,7 +36,24 @@ def expand_cpulist(cpulist): + return [ str(i) for i in list(set(result)) ] + + def online_cpus(): +- return [ str(c.replace('/sys/devices/system/cpu/cpu', '')) for c in glob.glob('/sys/devices/system/cpu/cpu[0-9]*') ] ++ online_cpus = [] ++ # Check for the online file with cpu1 since cpu0 can't always be offlined ++ if os.path.exists('/sys/devices/system/cpu/cpu1/online'): ++ for c in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'): ++ num = str(c.replace('/sys/devices/system/cpu/cpu','')) ++ # On some machine you can't turn off cpu0 ++ if not os.path.exists(c + '/online') and num == "0": ++ online_cpus.append(num) ++ else: ++ with open(c + '/online') as f: ++ is_online = f.read().rstrip('\n') ++ if is_online == "1": ++ online_cpus.append(num) ++ else: # use the old heuristic ++ for c in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'): ++ num = str(c.replace('/sys/devices/system/cpu/cpu','')) ++ online_cpus.append(num) ++ return online_cpus + + def invert_cpulist(cpulist): + return [ c for c in online_cpus() if c not in cpulist] +diff --git a/rteval/systopology.py b/rteval/systopology.py +index 97a6037e83aa..07674658df8e 100644 +--- a/rteval/systopology.py ++++ b/rteval/systopology.py +@@ -45,6 +45,7 @@ class CpuList(object): + self.cpulist = cpulist + elif type(cpulist) is str: + self.cpulist = self.__expand_cpulist(cpulist) ++ self.cpulist = self.online_cpulist(self.cpulist) + self.cpulist.sort() + + def __str__(self): +@@ -56,6 +57,10 @@ class CpuList(object): + def __len__(self): + return len(self.cpulist) + ++ def online_file_exists(self): ++ if os.path.exists('/sys/devices/system/cpu/cpu1/online'): ++ return True ++ return False + + # return the index of the last element of a sequence + # that steps by one +@@ -68,7 +73,6 @@ class CpuList(object): + return idx + return lim - 1 + +- + # + # collapse a list of cpu numbers into a string range + # of cpus (e.g. 0-5, 7, 9) +@@ -110,15 +114,30 @@ class CpuList(object): + return self.cpulist + + # check whether cpu n is online +- def isonline(self, n): ++ def is_online(self, n): + if n not in self.cpulist: + raise RuntimeError("invalid cpu number %d" % n) + if n == 0: + return True + path = os.path.join(CpuList.cpupath,'cpu%d' % n) +- if os.path.exists(path): +- return sysread(path, "online") == 1 +- return False ++ # Some hardware doesn't allow cpu0 to be turned off ++ if not os.path.exists(path + '/online') and n == 0: ++ return True ++ else: ++ return sysread(path, "online") == "1" ++ ++ # Given a cpulist, return a cpulist of online cpus ++ def online_cpulist(self, cpulist): ++ # This only works if the sys online files exist ++ if not self.online_file_exists(): ++ return cpulist ++ newlist = [] ++ for cpu in cpulist: ++ if not self.online_file_exists() and cpu == '0': ++ newlist.append(cpu) ++ elif self.is_online(int(cpu)): ++ newlist.append(cpu) ++ return newlist + + # + # class to abstract access to NUMA nodes in /sys filesystem +-- +2.20.1 + diff --git a/SOURCES/rteval-Don-t-assume-cpu0-cannot-be-offlined-test-it.patch b/SOURCES/rteval-Don-t-assume-cpu0-cannot-be-offlined-test-it.patch new file mode 100644 index 0000000..7230bd7 --- /dev/null +++ b/SOURCES/rteval-Don-t-assume-cpu0-cannot-be-offlined-test-it.patch @@ -0,0 +1,33 @@ +From 24efd8cf2fbde73636c4c8434447b0e04dc7a89a Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 19 Nov 2019 12:12:33 +0100 +Subject: [PATCH] rteval: Don't assume cpu0 cannot be offlined, test it + +Don't just assume that cpu0 cannot be offlined. +If the file /sys/devices/system/cpu/cpu0/online exists, then test the +value just like for every other cpu + +However, if the file doesn't exist, that means that it cannot be +offlined. + +Signed-off-by: John Kacur +--- + rteval/systopology.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/rteval/systopology.py b/rteval/systopology.py +index 9556e51d96a2..7c3878e51be4 100644 +--- a/rteval/systopology.py ++++ b/rteval/systopology.py +@@ -117,8 +117,6 @@ class CpuList(object): + def is_online(self, n): + if n not in self.cpulist: + raise RuntimeError("invalid cpu number %d" % n) +- if n == 0: +- return True + path = os.path.join(CpuList.cpupath,'cpu%d' % n) + # Some hardware doesn't allow cpu0 to be turned off + if not os.path.exists(path + '/online') and n == 0: +-- +2.20.1 + diff --git a/SOURCES/rteval-Parse-cpuinfo-correctly-when-model-name-has-a-colon.patch b/SOURCES/rteval-Parse-cpuinfo-correctly-when-model-name-has-a-colon.patch new file mode 100644 index 0000000..d778e43 --- /dev/null +++ b/SOURCES/rteval-Parse-cpuinfo-correctly-when-model-name-has-a-colon.patch @@ -0,0 +1,37 @@ +From 08c37d8d5b5476a9ecf128eebe9aed1c033b1b08 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 27 Aug 2020 15:41:07 -0400 +Subject: [PATCH] rteval: Parse cpuinfo correctly when model name has a colon + +The function cpuinfo() splits fields in /proc/cpuinfo with a colon ':' + +This can cause a +ValueError: too many values to unpack (expected 2) + +This is easily fixed by setting the maximum number of splits to 1 + +Signed-off-by: John Kacur +--- + rteval/misc.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/rteval/misc.py b/rteval/misc.py +index a43a8964e061..6184c9286f11 100644 +--- a/rteval/misc.py ++++ b/rteval/misc.py +@@ -69,8 +69,10 @@ def cpuinfo(): + info = {} + for l in open('/proc/cpuinfo'): + l = l.strip() +- if not l: continue +- key,val = [ i.strip() for i in l.split(':')] ++ if not l: ++ continue ++ # Split a maximum of one time. In case a model name has ':' in it ++ key, val = [i.strip() for i in l.split(':', 1)] + if key == 'processor': + core = val + info[core] = {} +-- +2.26.2 + diff --git a/SOURCES/rteval-Rename-self.cmd-to-self.args-for-inheritance.patch b/SOURCES/rteval-Rename-self.cmd-to-self.args-for-inheritance.patch new file mode 100644 index 0000000..cdcacce --- /dev/null +++ b/SOURCES/rteval-Rename-self.cmd-to-self.args-for-inheritance.patch @@ -0,0 +1,83 @@ +From 0b45cccbe759c9f32bdf9903ed5a5f2a687692ee Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 24 Jun 2020 09:06:01 -0400 +Subject: [PATCH] rteval: Rename self.cmd to self.args for inheritance in + stressng + +Load modules inherits from CommandLineLoad +CommandLineLoad has a method MakeReport which relies on the variable +"args". Class Stressng needs to use this variable name instead of it's +own for this mechanism to work. + +This commit changes the name in Stressng, but perhaps a better fix in +the future would be to use accessor methods, instead of relying on a +variable name + +This commit also sets jobs to 1, which is required in MakeReport. The +actual number of jobs is handled by the external stress-ng program, +depending upon the arg that Class Stressng invokes it with. + +Signed-off-by: John Kacur +--- + rteval/modules/loads/stressng.py | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py +index e5edb51c4c44..926de38e3116 100644 +--- a/rteval/modules/loads/stressng.py ++++ b/rteval/modules/loads/stressng.py +@@ -21,7 +21,7 @@ class Stressng(CommandLineLoad): + self.__out = None + self.__err = None + self.__nullfp = None +- self.cmd = None ++ self.args = None + " Only run this module if the user specifies an option " + if self.cfg.option is not None: + self._donotrun = False +@@ -47,12 +47,12 @@ class Stressng(CommandLineLoad): + self.__out = self.__err = self.__nullfp + + # stress-ng is only run if the user specifies an option +- self.cmd = ['stress-ng'] +- self.cmd.append('--%s' % str(self.cfg.option)) ++ self.args = ['stress-ng'] ++ self.args.append('--%s' % str(self.cfg.option)) + if self.cfg.arg is not None: +- self.cmd.append(self.cfg.arg) ++ self.args.append(self.cfg.arg) + if self.cfg.timeout is not None: +- self.cmd.append('--timeout %s' % str(self.cfg.timeout)) ++ self.args.append('--timeout %s' % str(self.cfg.timeout)) + + systop = SysTopology() + # get the number of nodes +@@ -74,7 +74,7 @@ class Stressng(CommandLineLoad): + if self.cpulist: + for node in nodes: + cpulist = ",".join([str(n) for n in cpus[node]]) +- self.cmd.append('--taskset %s' % cpulist) ++ self.args.append('--taskset %s' % cpulist) + + def _WorkloadTask(self): + """ Kick of the workload here """ +@@ -82,13 +82,14 @@ class Stressng(CommandLineLoad): + # Only start the task once + return + +- self._log(Log.DEBUG, "starting with %s" % " ".join(self.cmd)) ++ self._log(Log.DEBUG, "starting with %s" % " ".join(self.args)) + try: +- self.process = subprocess.Popen(self.cmd, ++ self.process = subprocess.Popen(self.args, + stdout=self.__out, + stderr=self.__err, + stdin=self.__in) + self.started = True ++ self.jobs = 1 + self._log(Log.DEBUG, "running") + except OSError: + self._log(Log.DEBUG, "Failed to run") +-- +2.21.3 + diff --git a/SOURCES/rteval-Some-style-changes-to-rteval-modules-measurem.patch b/SOURCES/rteval-Some-style-changes-to-rteval-modules-measurem.patch new file mode 100644 index 0000000..f5c2b55 --- /dev/null +++ b/SOURCES/rteval-Some-style-changes-to-rteval-modules-measurem.patch @@ -0,0 +1,57 @@ +From c6aac7eac1625c537f2517af3d3baf0ad5b8a2c4 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 03:56:10 -0400 +Subject: [PATCH 12/17] rteval: Some style changes to + rteval/modules/measurement/__init__.py + +rteval: Some style changes to rteval/modules/measurement/__init__.py + +Signed-off-by: John Kacur +--- + rteval/modules/measurement/__init__.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/rteval/modules/measurement/__init__.py b/rteval/modules/measurement/__init__.py +index 5a179949ad36..318248bd7e35 100644 +--- a/rteval/modules/measurement/__init__.py ++++ b/rteval/modules/measurement/__init__.py +@@ -89,7 +89,7 @@ class MeasurementProfile(RtEvalModules): + if self.__run_parallel: + return self._isAlive() + +- if len(self.__serialised_mods) > 0: ++ if self.__serialised_mods: + # If running serialised, first check if measurement is still running, + # if so - return True. + mod = self.GetNamedModuleObject(self.__serialised_mods[0]) +@@ -98,7 +98,7 @@ class MeasurementProfile(RtEvalModules): + + # If not, go to next on the list and kick it off + self.__serialised_mods.remove(self.__serialised_mods[0]) +- if len(self.__serialised_mods) > 0: ++ if self.__serialised_mods: + mod = self.GetNamedModuleObject(self.__serialised_mods[0]) + mod.setStart() + return True +@@ -107,7 +107,7 @@ class MeasurementProfile(RtEvalModules): + return False + + +-class MeasurementModules(object): ++class MeasurementModules: + """Class which takes care of all measurement modules and groups them into + measurement profiles, based on their characteristics""" + +@@ -211,6 +211,6 @@ MeasurementProfile object to be processed""" + if self.__iter_item == 0: + self.__iter_item = None + raise StopIteration +- else: +- self.__iter_item -= 1 +- return self.__measureprofiles[self.__iter_item] ++ ++ self.__iter_item -= 1 ++ return self.__measureprofiles[self.__iter_item] +-- +2.21.3 + diff --git a/SOURCES/rteval-Use-linux-5.7-in-kcompile.patch b/SOURCES/rteval-Use-linux-5.7-in-kcompile.patch new file mode 100644 index 0000000..528bf0c --- /dev/null +++ b/SOURCES/rteval-Use-linux-5.7-in-kcompile.patch @@ -0,0 +1,80 @@ +From a377b5ae936ecf355da348883c4e143860d781ab Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 23 Jul 2020 15:00:01 -0400 +Subject: [PATCH] rteval: Use linux-5.7 in kcompile + +Use linux-5.7 in kcompile since it has some fixes for code that breaks +newer tools. + +Signed-off-by: John Kacur +--- + Makefile | 2 +- + rteval-loads.spec | 2 +- + rteval/modules/loads/kcompile.py | 4 ++-- + rteval/rteval.conf | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 479bda8d8674..b11ecec75e42 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,7 +17,7 @@ PREFIX := /usr + DATADIR := $(DESTDIR)/$(PREFIX)/share + LOADDIR := loadsource + +-KLOAD := $(LOADDIR)/linux-5.1.tar.xz ++KLOAD := $(LOADDIR)/linux-5.7.tar.xz + BLOAD := $(LOADDIR)/dbench-4.0.tar.gz + LOADS := $(KLOAD) $(BLOAD) + +diff --git a/rteval-loads.spec b/rteval-loads.spec +index 6b21dc9e6b36..710729914465 100644 +--- a/rteval-loads.spec ++++ b/rteval-loads.spec +@@ -5,7 +5,7 @@ Summary: Source files for rteval loads + Group: Development/Tools + License: GPLv2 + URL: http://git.kernel.org/?p=linux/kernel/git/clrkwllms/rteval.git +-Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.1.tar.xz ++Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.7.tar.xz + + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + Requires: gcc binutils make kernel-headers +diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py +index 3973c2af6bce..597f40238cf1 100644 +--- a/rteval/modules/loads/kcompile.py ++++ b/rteval/modules/loads/kcompile.py +@@ -32,7 +32,7 @@ from rteval.Log import Log + from rteval.misc import expand_cpulist, compress_cpulist + from rteval.systopology import SysTopology + +-kernel_prefix = "linux-5.1" ++kernel_prefix = "linux-5.7" + + class KBuildJob: + '''Class to manage a build job bound to a particular node''' +@@ -294,7 +294,7 @@ class Kcompile(CommandLineLoad): + + def ModuleParameters(): + return {"source": {"descr": "Source tar ball", +- "default": "linux-5.1.tar.xz", ++ "default": "linux-5.7.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 db0b8ef005b6..6065d2e909f6 100644 +--- a/rteval/rteval.conf ++++ b/rteval/rteval.conf +@@ -18,7 +18,7 @@ dbench: external + stressng: module + + [kcompile] +-source: linux-5.1.xz ++source: linux-5.7.xz + jobspercore: 2 + + [hackbench] +-- +2.26.2 + diff --git a/SOURCES/rteval-cyclictest.py-Some-style-changes-suggested-by.patch b/SOURCES/rteval-cyclictest.py-Some-style-changes-suggested-by.patch new file mode 100644 index 0000000..a4787d9 --- /dev/null +++ b/SOURCES/rteval-cyclictest.py-Some-style-changes-suggested-by.patch @@ -0,0 +1,100 @@ +From 421870656f299a63734855286a4c6ea703dac960 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 04:12:25 -0400 +Subject: [PATCH 13/17] rteval: cyclictest.py: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/modules/measurement/cyclictest.py | 27 ++++++++++++++---------- + 1 file changed, 16 insertions(+), 11 deletions(-) + +diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py +index 6584ea2bb5b8..dad144633cf5 100644 +--- a/rteval/modules/measurement/cyclictest.py ++++ b/rteval/modules/measurement/cyclictest.py +@@ -25,12 +25,17 @@ + # are deemed to be part of the source code. + # + +-import os, sys, subprocess, signal, libxml2, shutil, tempfile, time ++import os ++import subprocess ++import signal ++import time ++import tempfile ++import libxml2 + from rteval.Log import Log + from rteval.modules import rtevalModulePrototype + from rteval.misc import expand_cpulist, online_cpus, cpuinfo + +-class RunData(object): ++class RunData: + '''class to keep instance data from a cyclictest run''' + def __init__(self, coreid, datatype, priority, logfnc): + self.__id = coreid +@@ -51,7 +56,7 @@ class RunData(object): + self._log = logfnc + + def __str__(self): +- retval = "id: %s\n" % self.__id ++ retval = "id: %s\n" % self.__id + retval += "type: %s\n" % self.__type + retval += "numsamples: %d\n" % self.__numsamples + retval += "min: %d\n" % self.__min +@@ -207,7 +212,7 @@ class Cyclictest(rtevalModulePrototype): + + # create a RunData object for each core we'll measure + for core in self.__cpus: +- self.__cyclicdata[core] = RunData(core, 'core',self.__priority, ++ self.__cyclicdata[core] = RunData(core, 'core', self.__priority, + logfnc=self._log) + self.__cyclicdata[core].description = info[core]['model name'] + +@@ -294,9 +299,9 @@ class Cyclictest(rtevalModulePrototype): + self.__cyclicoutput.seek(0) + try: + self.__cyclicprocess = subprocess.Popen(self.__cmd, +- stdout=self.__cyclicoutput, +- stderr=self.__nullfp, +- stdin=self.__nullfp) ++ stdout=self.__cyclicoutput, ++ stderr=self.__nullfp, ++ stdin=self.__nullfp) + self.__started = True + except OSError: + self.__started = False +@@ -328,11 +333,11 @@ class Cyclictest(rtevalModulePrototype): + continue + + # Skipping blank lines +- if len(line) == 0: ++ if not line: + continue + + vals = line.split() +- if len(vals) == 0: ++ if not vals: + # If we don't have any values, don't try parsing + continue + +@@ -342,7 +347,7 @@ class Cyclictest(rtevalModulePrototype): + self._log(Log.DEBUG, "cyclictest: unexpected output: %s" % line) + continue + +- for i,core in enumerate(self.__cpus): ++ for i, core in enumerate(self.__cpus): + self.__cyclicdata[core].bucket(index, int(vals[i+1])) + self.__cyclicdata['system'].bucket(index, int(vals[i+1])) + +@@ -444,4 +449,4 @@ if __name__ == '__main__': + + xml = libxml2.newDoc('1.0') + xml.setRootElement(rep_n) +- xml.saveFormatFileEnc('-','UTF-8',1) ++ xml.saveFormatFileEnc('-', 'UTF-8', 1) +-- +2.21.3 + diff --git a/SOURCES/rteval-hackbench-Fix-interating-through-nodes.patch b/SOURCES/rteval-hackbench-Fix-interating-through-nodes.patch new file mode 100644 index 0000000..216e522 --- /dev/null +++ b/SOURCES/rteval-hackbench-Fix-interating-through-nodes.patch @@ -0,0 +1,41 @@ +From 3c6483c6e6e24a3e457c631f031f83e81b5e930c Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 10 Dec 2019 02:23:10 +0100 +Subject: [PATCH] rteval: hackbench Fix interating through nodes + +Fix iterating through the nodes in hackbench. +When creating a dictionary of node, cpus, we need to iterate through the +nodes and not through sysTop alone. + +Also use python3 syntax for iterating through a dictionary. + +Signed-off-by: John Kacur +--- + rteval/modules/loads/hackbench.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py +index f31e29dd3f13..d951d1a0b930 100644 +--- a/rteval/modules/loads/hackbench.py ++++ b/rteval/modules/loads/hackbench.py +@@ -61,7 +61,7 @@ class Hackbench(CommandLineLoad): + # get the cpus for each node + self.cpus = {} + biggest = 0 +- for n in sysTop: ++ for n in sysTop.getnodes(): + self.cpus[n] = sysTop.getcpus(int(n)) + # if a cpulist was specified, only allow cpus in that list on the node + if self.cpulist: +@@ -73,7 +73,7 @@ class Hackbench(CommandLineLoad): + biggest = node_biggest + + # remove nodes with no cpus available for running +- for node,cpus in self.cpus.items(): ++ for node,cpus in list(self.cpus.items()): + if not cpus: + self.nodes.remove(node) + self._log(Log.DEBUG, "node %s has no available cpus, removing" % node) +-- +2.20.1 + diff --git a/SOURCES/rteval-hackbench.py-Some-Style-changes-suggested-by-.patch b/SOURCES/rteval-hackbench.py-Some-Style-changes-suggested-by-.patch new file mode 100644 index 0000000..ce94984 --- /dev/null +++ b/SOURCES/rteval-hackbench.py-Some-Style-changes-suggested-by-.patch @@ -0,0 +1,70 @@ +From e3bbc253a8b07b777ace70bd7f605188f43e1d88 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 03:25:56 -0400 +Subject: [PATCH 09/17] rteval: hackbench.py: Some Style changes suggested by + pylint-3 + +Some Style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/modules/loads/hackbench.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py +index d951d1a0b930..0ea231e4d36b 100644 +--- a/rteval/modules/loads/hackbench.py ++++ b/rteval/modules/loads/hackbench.py +@@ -65,7 +65,7 @@ class Hackbench(CommandLineLoad): + self.cpus[n] = sysTop.getcpus(int(n)) + # if a cpulist was specified, only allow cpus in that list on the node + if self.cpulist: +- self.cpus[n] = [ c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist) ] ++ self.cpus[n] = [c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist)] + + # track largest number of cpus used on a node + node_biggest = len(sysTop.getcpus(int(n))) +@@ -73,7 +73,7 @@ class Hackbench(CommandLineLoad): + biggest = node_biggest + + # remove nodes with no cpus available for running +- for node,cpus in list(self.cpus.items()): ++ for node, cpus in list(self.cpus.items()): + if not cpus: + self.nodes.remove(node) + self._log(Log.DEBUG, "node %s has no available cpus, removing" % node) +@@ -91,7 +91,7 @@ class Hackbench(CommandLineLoad): + self.__usenumactl = True + self._log(Log.INFO, "using numactl for thread affinity") + +- self.args = ['hackbench', '-P', ++ self.args = ['hackbench', '-P', + '-g', str(self.jobs), + '-l', str(self._cfg.setdefault('loops', '1000')), + '-s', str(self._cfg.setdefault('datasize', '1000')) +@@ -120,10 +120,10 @@ class Hackbench(CommandLineLoad): + def __starton(self, node): + if self.__multinodes or self.cpulist: + if self.__usenumactl: +- args = [ 'numactl', '--cpunodebind', str(node) ] + self.args ++ args = ['numactl', '--cpunodebind', str(node)] + self.args + else: +- cpulist = ",".join([ str(n) for n in self.cpus[node] ]) +- args = ['taskset', '-c', cpulist ] + self.args ++ cpulist = ",".join([str(n) for n in self.cpus[node]]) ++ args = ['taskset', '-c', cpulist] + self.args + else: + args = self.args + +@@ -175,7 +175,7 @@ class Hackbench(CommandLineLoad): + if node in self.tasks and self.tasks[node].poll() is None: + self._log(Log.INFO, "cleaning up hackbench on node %s" % node) + self.tasks[node].send_signal(SIGKILL) +- if self.tasks[node].poll() == None: ++ if self.tasks[node].poll() is None: + time.sleep(2) + self.tasks[node].wait() + del self.tasks[node] +-- +2.21.3 + diff --git a/SOURCES/rteval-kcompile.py-Some-style-changes-suggested-by-p.patch b/SOURCES/rteval-kcompile.py-Some-style-changes-suggested-by-p.patch new file mode 100644 index 0000000..462b383 --- /dev/null +++ b/SOURCES/rteval-kcompile.py-Some-style-changes-suggested-by-p.patch @@ -0,0 +1,133 @@ +From 42d772847f47068b0ad5b4cea0b8a90b7627ae79 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 03:40:03 -0400 +Subject: [PATCH 10/17] rteval: kcompile.py: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/modules/loads/kcompile.py | 38 ++++++++++++++++---------------- + 1 file changed, 19 insertions(+), 19 deletions(-) + +diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py +index bba6d7be75e9..3973c2af6bce 100644 +--- a/rteval/modules/loads/kcompile.py ++++ b/rteval/modules/loads/kcompile.py +@@ -29,12 +29,12 @@ from signal import SIGTERM + from rteval.modules import rtevalRuntimeError + from rteval.modules.loads import CommandLineLoad + from rteval.Log import Log +-from rteval.misc import expand_cpulist,compress_cpulist ++from rteval.misc import expand_cpulist, compress_cpulist + from rteval.systopology import SysTopology + +-kernel_prefix="linux-5.1" ++kernel_prefix = "linux-5.1" + +-class KBuildJob(object): ++class KBuildJob: + '''Class to manage a build job bound to a particular node''' + + def __init__(self, node, kdir, logger=None, cpulist=None): +@@ -93,9 +93,9 @@ class KBuildJob(object): + stdin=sin, stdout=sout, stderr=serr) + + def isrunning(self): +- if self.jobid == None: ++ if self.jobid is None: + return False +- return (self.jobid.poll() == None) ++ return self.jobid.poll() is None + + def stop(self): + if not self.jobid: +@@ -113,7 +113,7 @@ class Kcompile(CommandLineLoad): + self.logger = logger + + def _extract_tarball(self): +- if self.source == None: ++ if self.source is None: + raise rtevalRuntimeError(self, " no source tarball specified!") + self._log(Log.DEBUG, "unpacking kernel tarball") + tarargs = ['tar', '-C', self.builddir, '-x'] +@@ -134,8 +134,8 @@ class Kcompile(CommandLineLoad): + return + self._log(Log.DEBUG, "removing kcompile directories in %s" % self.builddir) + null = os.open("/dev/null", os.O_RDWR) +- cmd=["rm", "-rf", os.path.join(self.builddir, "kernel*"), os.path.join(self.builddir, "node*")] +- ret = subprocess.call(cmd,stdin=null, stdout=null, stderr=null) ++ cmd = ["rm", "-rf", os.path.join(self.builddir, "kernel*"), os.path.join(self.builddir, "node*")] ++ ret = subprocess.call(cmd, stdin=null, stdout=null, stderr=null) + if ret: + raise rtevalRuntimeError(self, "error removing builddir (%s) (ret=%d)" % (self.builddir, ret)) + +@@ -154,21 +154,21 @@ class Kcompile(CommandLineLoad): + raise rtevalRuntimeError(self, " no kernel tarballs found in %s" % self.srcdir) + + # check for existing directory +- kdir=None +- names=os.listdir(self.builddir) ++ kdir = None ++ names = os.listdir(self.builddir) + for d in names: + if d.startswith(kernel_prefix): +- kdir=d ++ kdir = d + break +- if kdir == None: ++ if kdir is None: + self._extract_tarball() + names = os.listdir(self.builddir) + for d in names: + self._log(Log.DEBUG, "checking %s" % d) + if d.startswith(kernel_prefix): +- kdir=d ++ kdir = d + break +- if kdir == None: ++ if kdir is None: + raise rtevalRuntimeError(self, "Can't find kernel directory!") + self.mydir = os.path.join(self.builddir, kdir) + self._log(Log.DEBUG, "mydir = %s" % self.mydir) +@@ -180,15 +180,15 @@ class Kcompile(CommandLineLoad): + self.cpus = {} + self.nodes = self.topology.getnodes() + for n in self.nodes: +- self.cpus[n] = [ int(c.split('/')[-1][3:]) for c in glob.glob('/sys/devices/system/node/node%s/cpu[0-9]*' % n) ] ++ self.cpus[n] = [int(c.split('/')[-1][3:]) for c in glob.glob('/sys/devices/system/node/node%s/cpu[0-9]*' % n)] + self.cpus[n].sort() + + # if a cpulist was specified, only allow cpus in that list on the node + if self.cpulist: +- self.cpus[n] = [ c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist) ] ++ self.cpus[n] = [c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist)] + + # remove nodes with no cpus available for running +- for node,cpus in self.cpus.items(): ++ for node, cpus in self.cpus.items(): + if not cpus: + self.nodes.remove(node) + self._log(Log.DEBUG, "node %s has no available cpus, removing" % node) +@@ -229,7 +229,7 @@ class Kcompile(CommandLineLoad): + os.close(err) + # clean up object dirs and make sure each has a config file + for n in self.nodes: +- self.buildjobs[n].clean(sin=null,sout=null,serr=null) ++ self.buildjobs[n].clean(sin=null, sout=null, serr=null) + os.close(null) + self._setReady() + +@@ -277,7 +277,7 @@ class Kcompile(CommandLineLoad): + def _WorkloadCleanup(self): + self._log(Log.DEBUG, "out of stopevent loop") + for n in self.buildjobs: +- if self.buildjobs[n].jobid.poll() == None: ++ if self.buildjobs[n].jobid.poll() is None: + self._log(Log.DEBUG, "stopping job on node %d" % int(n)) + self.buildjobs[n].jobid.terminate() + self.buildjobs[n].jobid.wait() +-- +2.21.3 + diff --git a/SOURCES/rteval-modules-__init__.py-Some-style-changes-sugges.patch b/SOURCES/rteval-modules-__init__.py-Some-style-changes-sugges.patch new file mode 100644 index 0000000..1da4263 --- /dev/null +++ b/SOURCES/rteval-modules-__init__.py-Some-style-changes-sugges.patch @@ -0,0 +1,117 @@ +From 6292c4793a60280b959ec0a51df994728d653e0a Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 03:11:10 -0400 +Subject: [PATCH 08/17] rteval: modules/__init__.py: Some style changes + suggested by pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/modules/__init__.py | 25 ++++++++++++++----------- + 1 file changed, 14 insertions(+), 11 deletions(-) + +diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py +index 5ae7cd488406..eff74da5a885 100644 +--- a/rteval/modules/__init__.py ++++ b/rteval/modules/__init__.py +@@ -22,10 +22,13 @@ + # are deemed to be part of the source code. + # + ++import time ++from datetime import datetime ++import threading ++import optparse ++import libxml2 + from rteval.Log import Log + from rteval.rtevalConfig import rtevalCfgSection +-from datetime import datetime +-import time, libxml2, threading, optparse + + __all__ = ["rtevalRuntimeError", "rtevalModulePrototype", "ModuleContainer", "RtEvalModules"] + +@@ -115,7 +118,7 @@ class rtevalModulePrototype(threading.Thread): + self.__timestamps["finished_set"] = datetime.now() + + +- def WaitForCompletion(self, wtime = None): ++ def WaitForCompletion(self, wtime=None): + "Blocks until the module has completed its workload" + if not self.shouldStart(): + # If it hasn't been started yet, nothing to wait for +@@ -215,7 +218,7 @@ class rtevalModulePrototype(threading.Thread): + + + +-class ModuleContainer(object): ++class ModuleContainer: + """The ModuleContainer keeps an overview over loaded modules and the objects it + will instantiate. These objects are accessed by iterating the ModuleContainer object.""" + +@@ -256,7 +259,7 @@ reference from the first import""" + return mod + + +- def ModuleInfo(self, modname, modroot = None): ++ def ModuleInfo(self, modname, modroot=None): + """Imports a module and calls the modules' ModuleInfo() function and returns + the information provided by the module""" + +@@ -288,7 +291,7 @@ the information provided by the module""" + + grparser = optparse.OptionGroup(parser, "Options for the %s module" % shortmod) + for (o, s) in list(opts.items()): +- descr = 'descr' in s and s['descr'] or "" ++ descr = 'descr' in s and s['descr'] or "" + metavar = 'metavar' in s and s['metavar'] or None + + try: +@@ -311,7 +314,7 @@ the information provided by the module""" + parser.add_option_group(grparser) + + +- def InstantiateModule(self, modname, modcfg, modroot = None): ++ def InstantiateModule(self, modname, modcfg, modroot=None): + """Imports a module and instantiates an object from the modules create() function. + The instantiated object is returned in this call""" + +@@ -328,7 +331,7 @@ returned when a ModuleContainer object is iterated over""" + self.__modobjects[modname] = modobj + + +- def ExportModule(self, modname, modroot = None): ++ def ExportModule(self, modname, modroot=None): + "Export module info, used to transfer an imported module to another ModuleContainer" + if modroot is None: + modroot = self.__modules_root +@@ -378,7 +381,7 @@ module name and object to be processed""" + + + +-class RtEvalModules(object): ++class RtEvalModules: + """RtEvalModules should normally be inherrited by a more specific module class. + This class takes care of managing imported modules and have methods for starting + and stopping the workload these modules contains.""" +@@ -402,7 +405,7 @@ and will also be given to the instantiated objects during module import.""" + "Imports a module exported by ModuleContainer::ExportModule()" + return self.__modules.ImportModule(module) + +- def _InstantiateModule(self, modname, modcfg, modroot = None): ++ def _InstantiateModule(self, modname, modcfg, modroot=None): + "Imports a module and returns an instantiated object from the module" + return self.__modules.InstantiateModule(modname, modcfg, modroot) + +@@ -513,7 +516,7 @@ start their workloads yet""" + self.__timestamps['stop'] = datetime.now() + + +- def WaitForCompletion(self, wtime = None): ++ def WaitForCompletion(self, wtime=None): + """Waits for the running modules to complete their running""" + + self._logger.log(Log.INFO, "Waiting for %s modules to complete" % self._module_type) +-- +2.21.3 + diff --git a/SOURCES/rteval-node-in-args-to-Popen-must-be-a-string.patch b/SOURCES/rteval-node-in-args-to-Popen-must-be-a-string.patch new file mode 100644 index 0000000..b144644 --- /dev/null +++ b/SOURCES/rteval-node-in-args-to-Popen-must-be-a-string.patch @@ -0,0 +1,54 @@ +From ba69dfd96da37208c63313ecab233a39568d576c Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Mon, 2 Dec 2019 13:05:02 +0100 +Subject: [PATCH] rteval: node in args to Popen must be a string + +In hackbench.py, the args to Popen must be a string and not an integer + +Before this change, this can happen. + +rteval --duration=1m +got system topology: 2 node system (10 cores per node) +rteval run on 4.18.0-151.rt13.8.el8.x86_64 started at Tue Nov 26 14:42:18 2019 +started 2 loads on 20 cores with 2 numa nodes +started measurement threads on 20 cores +Run duration: 60.0 seconds +Exception in thread hackbench: +Traceback (most recent call last): + File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner + self.run() + File "/usr/lib/python3.6/site-packages/rteval/modules/__init__.py", line 188, in run + self._WorkloadTask() + File "/usr/lib/python3.6/site-packages/rteval/modules/loads/hackbench.py", line 147, in _WorkloadTask + self.tasks[n] = self.__starton(n) + File "/usr/lib/python3.6/site-packages/rteval/modules/loads/hackbench.py", line 134, in __starton + stderr=self.__err) + File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__ + restore_signals, start_new_session) + File "/usr/lib64/python3.6/subprocess.py", line 1295, in _execute_child + restore_signals, start_new_session, preexec_fn) +TypeError: expected str, bytes or os.PathLike object, not int + +After converting the node to a string, it works as expected + +Signed-off-by: John Kacur +--- + rteval/modules/loads/hackbench.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py +index b15ea6378310..f31e29dd3f13 100644 +--- a/rteval/modules/loads/hackbench.py ++++ b/rteval/modules/loads/hackbench.py +@@ -120,7 +120,7 @@ class Hackbench(CommandLineLoad): + def __starton(self, node): + if self.__multinodes or self.cpulist: + if self.__usenumactl: +- args = [ 'numactl', '--cpunodebind', node ] + self.args ++ args = [ 'numactl', '--cpunodebind', str(node) ] + self.args + else: + cpulist = ",".join([ str(n) for n in self.cpus[node] ]) + args = ['taskset', '-c', cpulist ] + self.args +-- +2.20.1 + diff --git a/SOURCES/rteval-rteval-Log.py-Some-style-changes-suggested-fr.patch b/SOURCES/rteval-rteval-Log.py-Some-style-changes-suggested-fr.patch new file mode 100644 index 0000000..4b17d1e --- /dev/null +++ b/SOURCES/rteval-rteval-Log.py-Some-style-changes-suggested-fr.patch @@ -0,0 +1,45 @@ +From 3059c4a512d3a3f4fb9f1dc29a9210cc018f88d2 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 01:37:09 -0400 +Subject: [PATCH 05/17] rteval: rteval/Log.py: Some style changes suggested + from pylint-3 + +Some style changes suggested from pylint-3 + +Signed-off-by: John Kacur +--- + rteval/Log.py | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/rteval/Log.py b/rteval/Log.py +index 66aa77a59431..63ca3b8681f8 100644 +--- a/rteval/Log.py ++++ b/rteval/Log.py +@@ -24,13 +24,13 @@ + + import sys + +-class Log(object): +- NONE = 0 ++class Log: ++ NONE = 0 + ALWAYS = 0 +- INFO = 1<<0 +- WARN = 1<<1 +- ERR = 1<<2 +- DEBUG = 1<<3 ++ INFO = 1<<0 ++ WARN = 1<<1 ++ ERR = 1<<2 ++ DEBUG = 1<<3 + + + def __init__(self, logfile=None): +@@ -106,4 +106,3 @@ def unit_test(rootdir): + + if __name__ == '__main__': + unit_test(None) +- +-- +2.21.3 + diff --git a/SOURCES/rteval-rteval-__init__.py-A-few-style-changes-sugges.patch b/SOURCES/rteval-rteval-__init__.py-A-few-style-changes-sugges.patch new file mode 100644 index 0000000..d14b819 --- /dev/null +++ b/SOURCES/rteval-rteval-__init__.py-A-few-style-changes-sugges.patch @@ -0,0 +1,38 @@ +From 9430749d66a5e55bf51ccdf3bb5b8a3292508161 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 02:56:46 -0400 +Subject: [PATCH 07/17] rteval: rteval/__init__.py: A few style changes + suggested by pylint-3 + +A few style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/__init__.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rteval/__init__.py b/rteval/__init__.py +index 5d8e5131051e..a4fd7422cbe1 100644 +--- a/rteval/__init__.py ++++ b/rteval/__init__.py +@@ -125,7 +125,7 @@ class RtEval(rtevalReport): + print("rteval time remaining: %d days, %d hours, %d minutes, %d seconds" % (days, hours, minutes, r)) + + +- def Prepare(self, onlyload = False): ++ def Prepare(self, onlyload=False): + builddir = os.path.join(self.__rtevcfg.workdir, 'rteval-build') + if not os.path.isdir(builddir): os.mkdir(builddir) + +@@ -165,7 +165,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)) ++ with_loads, run_parallel)) + try: + nthreads = 0 + +-- +2.21.3 + diff --git a/SOURCES/rteval-rteval-cmd-Some-style-changes-suggested-by-py.patch b/SOURCES/rteval-rteval-cmd-Some-style-changes-suggested-by-py.patch new file mode 100644 index 0000000..ef7ae09 --- /dev/null +++ b/SOURCES/rteval-rteval-cmd-Some-style-changes-suggested-by-py.patch @@ -0,0 +1,87 @@ +From 761741d15d08e6ea420b55c9b26b203edc5e9531 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 5 May 2020 17:02:11 -0400 +Subject: [PATCH 04/17] rteval: rteval-cmd: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval-cmd | 27 +++++++++++++-------------- + 1 file changed, 13 insertions(+), 14 deletions(-) + +diff --git a/rteval-cmd b/rteval-cmd +index dff972f663cf..7d0d00516bd3 100755 +--- a/rteval-cmd ++++ b/rteval-cmd +@@ -59,7 +59,7 @@ def summarize(repfile, xslt): + if f.find('summary.xml') != -1: + element = f + break +- if element == None: ++ if element is None: + print("No summary.xml found in tar archive %s" % repfile) + return + tmp = tempfile.gettempdir() +@@ -160,10 +160,10 @@ def parse_options(cfg, parser, cmdargs): + if not cmdargs: + cmdargs = ["--help"] + +- (cmd_opts, cmd_args) = parser.parse_args(args = cmdargs) ++ (cmd_opts, cmd_args) = parser.parse_args(args=cmdargs) + if cmd_opts.rteval___version: + print(("rteval version %s" % RTEVAL_VERSION)) +- sys.exit(0); ++ sys.exit(0) + + if cmd_opts.rteval___duration: + mult = 1.0 +@@ -217,15 +217,14 @@ if __name__ == '__main__': + except ValueError: + # No configuration file given, load defaults + config.Load() +- pass + + if not config.HasSection('loads'): +- config.AppendConfig('loads',{ +- 'kcompile' : 'module', +- 'hackbench' : 'module' }) ++ config.AppendConfig('loads', { ++ 'kcompile' : 'module', ++ 'hackbench' : 'module'}) + +- if not config.HasSection('measurement'): +- config.AppendConfig('measurement', { ++ if not config.HasSection('measurement'): ++ config.AppendConfig('measurement', { + 'cyclictest' : 'module', + 'sysstat' : 'module'}) + +@@ -289,10 +288,10 @@ if __name__ == '__main__': + logging: %s + duration: %f + sysreport: %s''' % ( +- rtevcfg.workdir, rtevcfg.srcdir, +- rtevcfg.reportdir, rtevcfg.verbose, +- rtevcfg.debugging, rtevcfg.logging, +- rtevcfg.duration, rtevcfg.sysreport)) ++ rtevcfg.workdir, rtevcfg.srcdir, ++ rtevcfg.reportdir, rtevcfg.verbose, ++ rtevcfg.debugging, rtevcfg.logging, ++ rtevcfg.duration, rtevcfg.sysreport)) + + if not os.path.isdir(rtevcfg.workdir): + raise RuntimeError("work directory %s does not exist" % rtevcfg.workdir) +@@ -307,7 +306,7 @@ if __name__ == '__main__': + loadmods.Start() + nthreads = loadmods.Unleash() + logger.log(Log.INFO, "Started %i load threads - will run for %f seconds" % ( +- nthreads, rtevcfg.duration)) ++ nthreads, rtevcfg.duration)) + logger.log(Log.INFO, "No measurements will be performed, due to the --onlyload option") + time.sleep(rtevcfg.duration) + loadmods.Stop() +-- +2.21.3 + diff --git a/SOURCES/rteval-rtevalConfig.py-Some-style-changes-suggested-.patch b/SOURCES/rteval-rtevalConfig.py-Some-style-changes-suggested-.patch new file mode 100644 index 0000000..037f4bc --- /dev/null +++ b/SOURCES/rteval-rtevalConfig.py-Some-style-changes-suggested-.patch @@ -0,0 +1,117 @@ +From 415855a8cdafec5b0ec7b97578b9ee1e36878b3e Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 7 May 2020 04:23:34 -0400 +Subject: [PATCH 14/17] rteval/rtevalConfig.py: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/rtevalConfig.py | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +diff --git a/rteval/rtevalConfig.py b/rteval/rtevalConfig.py +index 36f1354b6a4f..646f33b1b663 100644 +--- a/rteval/rtevalConfig.py ++++ b/rteval/rtevalConfig.py +@@ -30,7 +30,8 @@ + # including keys needed to generate an equivalently functional executable + # are deemed to be part of the source code. + # +-import os, sys ++import os ++import sys + import configparser + from .Log import Log + from .systopology import SysTopology +@@ -47,7 +48,7 @@ def get_user_name(): + return name + + def default_config_search(relative_path, verifdef=os.path.isdir): +- ConfigDirectories=[ ++ ConfigDirectories = [ + os.path.join(os.path.expanduser("~" + get_user_name()), '.rteval'), + '/etc/rteval', + '/usr/share/rteval' +@@ -67,7 +68,7 @@ def default_config_search(relative_path, verifdef=os.path.isdir): + + + # HACK: A temporary hack to try to figure out where the install dir is. +-typical_install_paths = ('/usr/bin','/usr/local/bin') ++typical_install_paths = ('/usr/bin', '/usr/local/bin') + try: + if typical_install_paths.index(os.path.dirname(os.path.abspath(sys.argv[0]))): + installdir = os.path.dirname(os.path.abspath(sys.argv[0])) +@@ -98,9 +99,9 @@ default_config = { + } + + +-class rtevalCfgSection(object): ++class rtevalCfgSection: + def __init__(self, section_cfg): +- if type(section_cfg) is not dict: ++ if not isinstance(section_cfg, dict): + raise TypeError('section_cfg argument is not a dict variable') + + self.__dict__['_rtevalCfgSection__cfgdata'] = section_cfg +@@ -109,9 +110,9 @@ class rtevalCfgSection(object): + + def __str__(self): + "Simple method for dumping config when object is used as a string" +- if len(self.__cfgdata) == 0: ++ if not self.__cfgdata: + return "# empty" +- return "\n".join(["%s: %s" % (k,v) for k,v in list(self.__cfgdata.items())]) + "\n" ++ return "\n".join(["%s: %s" % (k, v) for k, v in list(self.__cfgdata.items())]) + "\n" + + + def __setattr__(self, key, val): +@@ -168,7 +169,7 @@ class rtevalCfgSection(object): + + + def update(self, newdict): +- if type(newdict) is not dict: ++ if not isinstance(newdict, dict): + raise TypeError('update() method expects a dict as argument') + + for key, val in newdict.items(): +@@ -183,7 +184,7 @@ class rtevalCfgSection(object): + class rtevalConfig(object): + "Config parser for rteval" + +- def __init__(self, initvars = None, logger = None): ++ def __init__(self, initvars=None, logger=None): + self.__config_data = {} + self.__config_files = [] + self.__logger = logger +@@ -239,7 +240,7 @@ class rtevalConfig(object): + raise RuntimeError("Unable to find configfile") + + +- def Load(self, fname = None, append = False): ++ def Load(self, fname=None, append=False): + "read and parse the configfile" + + try: +@@ -265,7 +266,7 @@ class rtevalConfig(object): + # copy the section data into the __config_data dictionary + for s in ini.sections(): + cfg = {} +- for (k,v) in ini.items(s): ++ for (k, v) in ini.items(s): + cfg[k] = v.split('#')[0].strip() + + self.__update_section(s, cfg) +@@ -285,7 +286,7 @@ class rtevalConfig(object): + "Parse through the command line options and update the appropriate config settings" + + last_sect = None +- for sk,v in sorted(vars(parser.values).items()): ++ for sk, v in sorted(vars(parser.values).items()): + # optparse key template: {sectionname}___{key} + k = sk.split('___') + if k[0] != last_sect: +-- +2.21.3 + diff --git a/SOURCES/rteval-rtevalReport.py-Fix-non-existant-variable.patch b/SOURCES/rteval-rtevalReport.py-Fix-non-existant-variable.patch new file mode 100644 index 0000000..0378ba4 --- /dev/null +++ b/SOURCES/rteval-rtevalReport.py-Fix-non-existant-variable.patch @@ -0,0 +1,28 @@ +From 4bd385fb5f23e3f507b3dbbc51677b57abb40e7a Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 7 May 2020 04:51:25 -0400 +Subject: [PATCH 16/17] rteval/rtevalReport.py: Fix non-existant variable + +Fix non-existant variable + +Signed-off-by: John Kacur +--- + rteval/rtevalReport.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rteval/rtevalReport.py b/rteval/rtevalReport.py +index 062cc5efb86f..e02fc9858e69 100644 +--- a/rteval/rtevalReport.py ++++ b/rteval/rtevalReport.py +@@ -130,7 +130,7 @@ class rtevalReport: + + def _tar_results(self): + if not os.path.isdir(self.__reportdir): +- raise RuntimeError("no such directory: %s" % reportdir) ++ raise RuntimeError("no such directory: %s" % self.__reportdir) + + dirname = os.path.dirname(self.__reportdir) + rptdir = os.path.basename(self.__reportdir) +-- +2.21.3 + diff --git a/SOURCES/rteval-rtevalReport.py-Some-style-changes-suggested-.patch b/SOURCES/rteval-rtevalReport.py-Some-style-changes-suggested-.patch new file mode 100644 index 0000000..f0b81df --- /dev/null +++ b/SOURCES/rteval-rtevalReport.py-Some-style-changes-suggested-.patch @@ -0,0 +1,51 @@ +From dab38d731ca8bf69ef41985ff5cc480d64659368 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 7 May 2020 04:40:33 -0400 +Subject: [PATCH 15/17] rteval/rtevalReport.py: Some style changes suggested by + pylint-3 + + Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/rtevalReport.py | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/rteval/rtevalReport.py b/rteval/rtevalReport.py +index a18dd41b36fc..062cc5efb86f 100644 +--- a/rteval/rtevalReport.py ++++ b/rteval/rtevalReport.py +@@ -29,7 +29,7 @@ from datetime import datetime + from . import xmlout + + +-class rtevalReport(object): ++class rtevalReport: + def __init__(self, rtev_version, installdir, annotate): + self.__version = rtev_version + self.__installdir = installdir +@@ -48,10 +48,14 @@ class rtevalReport(object): + + duration = datetime.now() - measure_start + seconds = duration.seconds ++ + hours = int(seconds / 3600) +- if hours: seconds -= (hours * 3600) ++ if hours: ++ seconds -= (hours * 3600) ++ + minutes = int(seconds / 60) +- if minutes: seconds -= (minutes * 60) ++ if minutes: ++ seconds -= (minutes * 60) + + # Start new XML report + self.__xmlreport = xmlout.XMLOut('rteval', self.__version) +@@ -138,4 +142,3 @@ class rtevalReport(object): + t.close() + except: + os.chdir(cwd) +- +-- +2.21.3 + diff --git a/SOURCES/rteval-sysstat-Some-style-changes-suggested-by-pylin.patch b/SOURCES/rteval-sysstat-Some-style-changes-suggested-by-pylin.patch new file mode 100644 index 0000000..0d1be8f --- /dev/null +++ b/SOURCES/rteval-sysstat-Some-style-changes-suggested-by-pylin.patch @@ -0,0 +1,55 @@ +From 0e483c0882b58a1d605e104aa8c1d6c361243116 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 03:47:06 -0400 +Subject: [PATCH 11/17] rteval: sysstat: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/modules/measurement/sysstat.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/rteval/modules/measurement/sysstat.py b/rteval/modules/measurement/sysstat.py +index cbad928326dc..5e68720e25ea 100644 +--- a/rteval/modules/measurement/sysstat.py ++++ b/rteval/modules/measurement/sysstat.py +@@ -33,11 +33,11 @@ from rteval.modules import rtevalModulePrototype + class sysstat(rtevalModulePrototype): + def __init__(self, config, logger=None): + rtevalModulePrototype.__init__(self, 'measurement', 'sysstat', logger) +- self.__cfg = config +- self.__started = False ++ self.__cfg = config ++ self.__started = False + self.__logentry = 0 + self.__bin_sadc = "/usr/lib64/sa/sadc" # FIXME: Do dynamically +- self.__datadir = os.path.join(self.__cfg.reportdir, 'sysstat') ++ self.__datadir = os.path.join(self.__cfg.reportdir, 'sysstat') + self.__datafile = os.path.join(self.__datadir, "sysstat.dat") + + +@@ -93,10 +93,10 @@ class sysstat(rtevalModulePrototype): + compr = bz2.BZ2Compressor(9) + cmpr = compr.compress(fp.read()) + data = base64.b64encode(cmpr + compr.flush()) +- data_n = rep_n.newTextChild(None, 'data', "\n"+"\n".join(textwrap.wrap(data,75))+"\n") ++ data_n = rep_n.newTextChild(None, 'data', "\n"+"\n".join(textwrap.wrap(data, 75))+"\n") + data_n.newProp('contents', 'sysstat/sar binary data') +- data_n.newProp('encoding','base64') +- data_n.newProp('compression','bz2') ++ data_n.newProp('encoding', 'base64') ++ data_n.newProp('compression', 'bz2') + fp.close() + del cmpr + del compr +@@ -154,4 +154,4 @@ if __name__ == '__main__': + + xml = libxml2.newDoc('1.0') + xml.setRootElement(rep_n) +- xml.saveFormatFileEnc('-','UTF-8',1) ++ xml.saveFormatFileEnc('-', 'UTF-8', 1) +-- +2.21.3 + diff --git a/SOURCES/rteval-systopology.py-Some-style-changes-suggested-b.patch b/SOURCES/rteval-systopology.py-Some-style-changes-suggested-b.patch new file mode 100644 index 0000000..821543b --- /dev/null +++ b/SOURCES/rteval-systopology.py-Some-style-changes-suggested-b.patch @@ -0,0 +1,103 @@ +From bf00009c188352d6b6c99273471b285c152313bd Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 6 May 2020 02:47:13 -0400 +Subject: [PATCH 06/17] rteval: systopology.py: Some style changes suggested by + pylint-3 + +Some style changes suggested by pylint-3 + +Signed-off-by: John Kacur +--- + rteval/systopology.py | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/rteval/systopology.py b/rteval/systopology.py +index 7c3878e51be4..8e4daf6c1043 100644 +--- a/rteval/systopology.py ++++ b/rteval/systopology.py +@@ -28,22 +28,22 @@ import os.path + import glob + + def sysread(path, obj): +- fp = open(os.path.join(path,obj), "r") ++ fp = open(os.path.join(path, obj), "r") + return fp.readline().strip() + + # + # class to provide access to a list of cpus + # + +-class CpuList(object): ++class CpuList: + "Object that represents a group of system cpus" + + cpupath = '/sys/devices/system/cpu' + + def __init__(self, cpulist): +- if type(cpulist) is list: ++ if isinstance(cpulist, list): + self.cpulist = cpulist +- elif type(cpulist) is str: ++ elif isinstance(cpulist, str): + self.cpulist = self.__expand_cpulist(cpulist) + self.cpulist = self.online_cpulist(self.cpulist) + self.cpulist.sort() +@@ -66,7 +66,7 @@ class CpuList(object): + # that steps by one + def __longest_sequence(self, cpulist): + lim = len(cpulist) +- for idx,val in enumerate(cpulist): ++ for idx, _ in enumerate(cpulist): + if idx+1 == lim: + break + if int(cpulist[idx+1]) != (int(cpulist[idx])+1): +@@ -107,7 +107,7 @@ class CpuList(object): + else: + a = int(part) + result.append(a) +- return [ int(i) for i in list(set(result)) ] ++ return [int(i) for i in list(set(result))] + + # returns the list of cpus tracked + def getcpulist(self): +@@ -117,7 +117,7 @@ class CpuList(object): + def is_online(self, n): + if n not in self.cpulist: + raise RuntimeError("invalid cpu number %d" % n) +- path = os.path.join(CpuList.cpupath,'cpu%d' % n) ++ path = os.path.join(CpuList.cpupath, 'cpu%d' % n) + # Some hardware doesn't allow cpu0 to be turned off + if not os.path.exists(path + '/online') and n == 0: + return True +@@ -141,7 +141,7 @@ class CpuList(object): + # class to abstract access to NUMA nodes in /sys filesystem + # + +-class NumaNode(object): ++class NumaNode: + "class representing a system NUMA node" + + # constructor argument is the full path to the /sys node file +@@ -172,8 +172,8 @@ class NumaNode(object): + self.meminfo = {} + for l in open(os.path.join(self.path, "meminfo"), "r"): + elements = l.split() +- key=elements[2][0:-1] +- val=int(elements[3]) ++ key = elements[2][0:-1] ++ val = int(elements[3]) + if len(elements) == 5 and elements[4] == "kB": + val *= 1024 + self.meminfo[key] = val +@@ -189,7 +189,7 @@ class NumaNode(object): + # + # Class to abstract the system topology of numa nodes and cpus + # +-class SysTopology(object): ++class SysTopology: + "Object that represents the system's NUMA-node/cpu topology" + + cpupath = '/sys/devices/system/cpu' +-- +2.21.3 + diff --git a/SOURCES/rteval-use-systopology-for-hackbench-online-cpus.patch b/SOURCES/rteval-use-systopology-for-hackbench-online-cpus.patch new file mode 100644 index 0000000..d97164c --- /dev/null +++ b/SOURCES/rteval-use-systopology-for-hackbench-online-cpus.patch @@ -0,0 +1,78 @@ +From c7ba86bae03dc98f3f988e0f261af1651930fd50 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Tue, 28 May 2019 23:47:22 +0200 +Subject: [PATCH 2/2] rteval: Change hackbench to use systopology to calculate + online cpus + +- change the class SysTopology method getcpus to work properly +. have hackbench make use of SysTopology instead of it's own +implementation to calculate cpus. The advantage is that this will +automatically calculate online cpus and sort them + +Signed-off-by: John Kacur +--- + rteval/modules/loads/hackbench.py | 18 +++++++++--------- + rteval/systopology.py | 2 +- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py +index 0ee60d900f18..b15ea6378310 100644 +--- a/rteval/modules/loads/hackbench.py ++++ b/rteval/modules/loads/hackbench.py +@@ -30,6 +30,7 @@ from signal import SIGKILL + from rteval.modules.loads import CommandLineLoad + from rteval.Log import Log + from rteval.misc import expand_cpulist ++from rteval.systopology import SysTopology + + class Hackbench(CommandLineLoad): + def __init__(self, config, logger): +@@ -53,24 +54,23 @@ class Hackbench(CommandLineLoad): + mult = 0 + self._donotrun = True + +- # figure out how many nodes we have +- self.nodes = [ n.split('/')[-1][4:] for n in glob.glob('/sys/devices/system/node/node*') ] +- ++ sysTop = SysTopology() ++ # get the number of nodes ++ self.nodes = sysTop.getnodes() + + # get the cpus for each node + self.cpus = {} + biggest = 0 +- for n in self.nodes: +- self.cpus[n] = [ int(c.split('/')[-1][3:]) for c in glob.glob('/sys/devices/system/node/node%s/cpu[0-9]*' % n) ] +- self.cpus[n].sort() +- ++ for n in sysTop: ++ self.cpus[n] = sysTop.getcpus(int(n)) + # if a cpulist was specified, only allow cpus in that list on the node + if self.cpulist: + self.cpus[n] = [ c for c in self.cpus[n] if str(c) in expand_cpulist(self.cpulist) ] + + # track largest number of cpus used on a node +- if len(self.cpus[n]) > biggest: +- biggest = len(self.cpus[n]) ++ node_biggest = len(sysTop.getcpus(int(n))) ++ if node_biggest > biggest: ++ biggest = node_biggest + + # remove nodes with no cpus available for running + for node,cpus in self.cpus.items(): +diff --git a/rteval/systopology.py b/rteval/systopology.py +index 07674658df8e..9556e51d96a2 100644 +--- a/rteval/systopology.py ++++ b/rteval/systopology.py +@@ -246,7 +246,7 @@ class SysTopology(object): + return list(self.nodes.keys()) + + def getcpus(self, node): +- return self.nodes[node] ++ return self.nodes[node].getcpulist() + + + +-- +2.20.1 + diff --git a/SPECS/rteval.spec b/SPECS/rteval.spec new file mode 100644 index 0000000..932e0f6 --- /dev/null +++ b/SPECS/rteval.spec @@ -0,0 +1,701 @@ +Name: rteval +Version: 3.0 +Release: 13%{?dist} +Summary: Utility to evaluate system suitability for RT Linux + +Group: Development/Tools +License: GPLv2 +URL: https://www.kernel.org/pub/linux/utils/rteval/rteval-3.0.tar.xz +Source0: rteval-%{version}.tar.xz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: python3-devel +Requires: platform-python +Requires: python3-schedutils python3-ethtool python3-lxml +Requires: python3-dmidecode >= 3.10 +Requires: rt-tests >= 1.5-11 +Requires: rteval-loads >= 1.4-7 +Requires: rteval-common => %{version}-%{release} +Requires: sysstat +Requires: xz bzip2 +Requires: kernel-headers +Requires: sos +Requires: tar +BuildArch: noarch +Obsoletes: rteval <= 2.14 +Requires: numactl +Requires: gcc flex bison bc make +Requires: elfutils elfutils-libelf-devel +Requires: openssl +Requires: openssl-devel + +%description +The rteval script is a utility for measuring various aspects of +realtime behavior on a system under load. The script unpacks the +kernel source, and then goes into a loop, running hackbench and +compiling a kernel tree. During that loop the cyclictest program +is run to measure event response time. After the run time completes, +a statistical analysis of the event response times is done and printed +to the screen. + +%package common +Summary: Common rteval files +BuildArch: noarch + +# Patches +Patch1: rteval-Check-whether-cpu-online-before-adding-to-list.patch +Patch2: rteval-use-systopology-for-hackbench-online-cpus.patch +Patch3: rteval-Don-t-assume-cpu0-cannot-be-offlined-test-it.patch +Patch4: rteval-node-in-args-to-Popen-must-be-a-string.patch +Patch5: rteval-hackbench-Fix-interating-through-nodes.patch +Patch6: Makefile-Remove-non-distutil-install-leftovers.patch +Patch7: Makefile-Use-parentheses-around-print-args.patch +Patch8: modules-Don-t-abort-if-a-workload-isn-t-running.patch +Patch9: rteval-rteval-cmd-Some-style-changes-suggested-by-py.patch +Patch10: rteval-rteval-Log.py-Some-style-changes-suggested-fr.patch +Patch11: rteval-systopology.py-Some-style-changes-suggested-b.patch +Patch12: rteval-rteval-__init__.py-A-few-style-changes-sugges.patch +Patch13: rteval-modules-__init__.py-Some-style-changes-sugges.patch +Patch14: rteval-hackbench.py-Some-Style-changes-suggested-by-.patch +Patch15: rteval-kcompile.py-Some-style-changes-suggested-by-p.patch +Patch16: rteval-sysstat-Some-style-changes-suggested-by-pylin.patch +Patch17: rteval-Some-style-changes-to-rteval-modules-measurem.patch +Patch18: rteval-cyclictest.py-Some-style-changes-suggested-by.patch +Patch19: rteval-rtevalConfig.py-Some-style-changes-suggested-.patch +Patch20: rteval-rtevalReport.py-Some-style-changes-suggested-.patch +Patch21: rteval-rtevalReport.py-Fix-non-existant-variable.patch +Patch22: rteval-Add-the-stressng-load-module.patch +Patch23: rteval-Rename-self.cmd-to-self.args-for-inheritance.patch +Patch24: rteval-Use-linux-5.7-in-kcompile.patch +Patch25: rteval-Parse-cpuinfo-correctly-when-model-name-has-a-colon.patch + +%description common +Common files used by rteval, rteval-xmlrpc and rteval-parser + +%prep +%setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 + +# version sanity check (make sure specfile and rteval.py match) +#cp rteval/version.py rtevalversion.py +#srcver=$(%{__python3} -c "from rtevalversion import RTEVAL_VERSION; print RTEVAL_VERSION") +#rm -rf rtevalversion.py +#if [ $srcver != %{version} ]; then +# printf "\n***\n*** rteval spec file version do not match the rteval/rteval.py version\n***\n\n" +# exit -1 +#fi + +%build +%{__python3} setup.py build + +%install +%{__python3} setup.py install --root=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files common +%doc COPYING +%dir %{_datadir}/%{name} +%{python3_sitelib}/rteval/rtevalclient.py* +%{python3_sitelib}/rteval/rtevalConfig.py* +%{python3_sitelib}/rteval/rtevalXMLRPC.py* +%{python3_sitelib}/rteval/version.py* +%{python3_sitelib}/rteval/Log.py* +%{python3_sitelib}/rteval/misc.py* +%{python3_sitelib}/rteval/systopology.py* + +%files +%defattr(-,root,root,-) +%{python3_sitelib}/*.egg-info + +%doc COPYING README doc/rteval.txt +%{_mandir}/man8/rteval.8.gz +%config(noreplace) %{_sysconfdir}/rteval.conf +%{_datadir}/%{name}/rteval_*.xsl +%{python3_sitelib}/rteval/__init__.py* +%{python3_sitelib}/rteval/rtevalMailer.py* +%{python3_sitelib}/rteval/rtevalReport.py* +%{python3_sitelib}/rteval/xmlout.py* +%{python3_sitelib}/rteval/modules +%{python3_sitelib}/rteval/sysinfo +/usr/bin/rteval + +%{python3_sitelib}/rteval/__pycache__/* + +%changelog +* Thu Aug 27 2020 John Kacur - 3.0.13 +- Parse cpuinfo correctly when the model name has a colon in it. +Resolves: rhbz#1873120 + +* Thu Jul 23 2020 John Kacur - 3.0.12 +- Use linux-5.7 in kcompile +Resolves: rhbz#1859762 + +* Thu Jun 25 2020 John Kacur - 3.0.11 +- Make sure "make" is available for the kcompile module +Resolves: rhbz#1850924 + +* Wed Jun 24 2020 John Kacur - 3.0.10 +- Ensure that a recent rteval-loads with stress-ng is required +Resolves: rhbz#1847233 + +* Wed Jun 24 2020 John Kacur - 3.0.9 +- Ensure the stressng command line is displayed in the final report +Resolves: rhbz#1850151 + +* Mon Jun 15 2020 John Kacur - 3.0-8 +- Add the stress-ng load module +Resolves: rhbz#1816360 + +* Mon May 04 2020 John Kacur - 3.0-7 +- Make sure openssl is available so that rteval can compile the kernel +Resolves: rhbz#1831272 + +* Tue Dec 10 2019 John Kacur - 3.0-6 +- Iterate over nodes and not sysTop +- Explictly add a few more software requires for compiling the kernel +Resolves: rhbz#1755603 + +* Tue Dec 03 2019 John Kacur - 3.0-5 +- Explicitly add some software requires for compiling the kernel +Resolves: rhbz#1766879 + +* Mon Dec 02 2019 John Kacur - 3.0-4 +- In hackbench.py node in args to Popen must be a string +Resolves: rhbz#1777048 + +* Tue Nov 19 2019 John Kacur - 3.0-3 +- Don't assume cpu0 cannot be offlined, test for it +- Drop patches that are no longer in the spec file +Resolves: rhbz#1773792 + +* Mon Nov 18 2019 John Kacur - 3.0-2 +- Check whether a cpu is online before adding to a list +- Change hackbench to use the systopology interface for online cpus +Resolves: rhbz#1715081 + +* Fri Nov 15 2019 John Kacur - 3.0-1 +- Sync rt-tests and rteval-loads versions in the specfile +- Upgrade to upstream rteval-3.0 +Resolves: rhbz#1748955 + +* Fri Nov 08 2019 John Kacur - 2.14-27 +- Update kcompile sources to linux-5.1 +Resolves: rhbz#1770215 + +* Fri Nov 08 2019 John Kacur - 2.14-26 +- Fix number of hackbench jobs wrt number of CPUs +- Don't run on nodes with no CPUs available +Resolves: rhbz#1770211 + +* Tue Apr 02 2019 Clark Williams - 2.14.25 +- fix incorrect test logic in gating tests +Resolves: rhbz#1682426 + +* Tue Apr 02 2019 Clark Williams - 2.14.24 +- add rteval-loads dependency to gating +- added second test (short_run) to gating +Resolves: rhbz#1682426 + +* Mon Apr 01 2019 Clark Williams - 2.14.23 +- add missing gating.yaml +Resolves: rhbz#1682426 + +* Mon Apr 01 2019 Clark Williams - 2.14.22 +- checkin OSCI gating framework +Resolves: rhbz#1682426 + +* Mon Dec 17 2018 John Kacur - 2.14-21 +- Fix typo in debug output +Resolves: rhbz#1659974 + +* Tue Oct 16 2018 John Kacur - 2.14-20 +- Disable options for the remote xmlrpc server, not currently supported +Resolves: rhbz#1628322 + +* Sat Oct 13 2018 John Kacur - 2.14-19 +- Fix Requires for python3 +Resolves: rhbz#1638135 + +* Fri Oct 12 2018 John Kacur - 2.14-18 +- Fix time format in report +Resolves: rhbz#1630733 + +* Fri Sep 28 2018 John Kacur - 2.14-17 +- Change python3 to platform-python +Resolves: rhbz#1633619 + +* Fri Aug 10 2018 John Kacur - 2.14-16 +- remove unnecssary encode that is causing problems +Resolves: rhbz#1614384 + +* Tue Aug 07 2018 John Kacur - 2.14-15 +- tar is required in kcompile.py. Make it a Require in the specfile +Resolves: rhbz#1612992 + +* Fri Aug 03 2018 John Kacur - 2.14-14 +- fix python3 division of integers +Resolves: rhbz#1611813 + +* Fri Aug 03 2018 John Kacur - 2.14-13 +-fix rtevalclient import +Resolves: rhbz#1608464 + +* Sat Jun 23 2018 John Kacur - 2.14-12 +- More python3 changes +- Changes for the new version of rt-tests that automates --numa +Resolves: rhbz#1594287 + +* Tue Jun 12 2018 John Kacur jkacur@redhat.com> - 2.14-11 +- More specfile changes for python3 build +Resolves: rhbz#1518699 + +* Wed May 30 2018 John Kacur - 2.14-10 +- Chnages for a python3 build +Resolves: rhbz#1518699 + +* Fri Oct 27 2017 John Kacur - 2.14-9 +- Remove redundant files for clarity. +Resolves: rhbz1504162 + +* Fri Oct 27 2017 John Kacur - 2.14-8 +- Don't fail if we don't know the init system +Resolves: rhbz1504168 + +* Fri Oct 20 2017 John Kacur - 2.14-7 +- Remove underscore from sysread function in systopology.py +Resolves: rhbz1504164 + +* Fri Oct 20 2017 John Kacur - 2.14-6 +- Improve error handling if cyclictest fails to run +Resolves: rhbz1504159 + +* Fri Oct 20 2017 John Kacur - 2.14-5 +- Remove trace-cmd from Requires, since it is not needed to run rteval +Resolves: rhbz1504173 + +* Mon Oct 16 2017 John Kacur - 2.14-4 +- Don't sleep if hackbench fails to launch due to out-of-memory +- Instead, exit gracefully +Resolves: rhbz1380144 + +* Wed Oct 11 2017 John Kacur - 2.14-3 +- Add sos as a requires since this package is needed to run sosreport +Resolves: rhbz1500722 + +* Wed Oct 11 2017 John Kacur - 2.14-2 +- Add the contents of the kernel boot command line to the summary report +Resolves: rhbz1452788 + +* Thu Mar 16 2017 Clark Williams - 2.14-1 +- removed leftover import of systopology from sysinfo + +* Wed Mar 15 2017 Clark Williams - 2.13-2 +- Updated specfile to correct version and bz [1382155] + +* Tue Sep 20 2016 Clark Williams - 2.12-1 +- handle empty environment variables SUDO_USER and USER [1312057] + +* Tue Aug 30 2016 Clark Williams - 2.11-1 +- make sure we return non-zero for early exit from tests + +* Wed Aug 3 2016 Clark Williams - 2.10-1 +- bumped version for RHEL 7.3 release + +* Mon May 9 2016 Clark Williams - 2.9.1 +- default cpulist for modules if only one specified [1333831] + +* Tue Apr 26 2016 Clark Williams - 2.8.1 +- add the --version option to print the rteval version +- made the --cyclictest-breaktrace option work properly [1209986] + +* Fri Apr 1 2016 Clark Williams - 2.7.1 +- treat SIGINT and SIGTERM as valid end-of-run events [1278757] +- added cpulist options to man page + +* Thu Feb 11 2016 Clark Williams - 2.6.1 +- update to make --loads-cpulist and --measurement-cpulist work [1306437] + +* Thu Dec 10 2015 Clark Williams - 2.5-1 +- stop using old numactl --cpubind argument + +* Wed Dec 9 2015 Clark Williams - 2.4.2 +- added Require of package numactl + +* Tue Nov 17 2015 Clark Williams - 2.4.1 +- rework hackbench load to not generate cross-node traffic [1282826] + +* Wed Aug 12 2015 Clark Williams - 2.3-1 +- comment out HWLatDetect module from default config [1245699] + +* Wed Jun 10 2015 Clark Williams - 2.2-1 +- add --loads-cpulist and --measurement-cpulist to allow cpu placement [1230401] + +* Thu Apr 23 2015 Luis Claudio R. Goncalves - 2.1-8 +- load default configs when no config file is specified (Jiri kastner) [1212452] + +* Wed Jan 14 2015 Clark Williams - 2.1-7 +- added requires of bzip2 to specfile [1151567] + +* Thu Jan 8 2015 Clark Williams - 2.1-6 +- cleaned up product documentation [1173315] + +* Mon Nov 10 2014 Luis Claudio R. Goncalves - 2.1-5 +- rebuild for RHEL-7.1 (1151567) + +* Thu Mar 27 2014 Clark Williams - 2.1-4 +- cherry-picked old commit to deal with installdir problem + +* Wed Mar 26 2014 Clark Williams - 2.1-3 +- added sysstat requires to specfile + +* Tue Mar 12 2013 David Sommerseth - 2.1-2 +- Migrated from libxslt-python to python-lxml + +* Fri Jan 18 2013 David Sommerseth - 2.1-1 +- Made some log lines clearer +- cyclictest: Added --cyclictest-breaktrace feature +- cyclictest: Removed --cyclictest-distance option +- cyclictest: Use a tempfile buffer for cyclictest's stdout data +- cyclictest: Report if breaktrace was triggered +- cyclictest: Make the unit test work again +- cyclictest: Only log and show statistic data when samples are collected +- Copyright updates + +* Thu Jan 17 2013 David Sommerseth - 2.0.1-1 +- Fix up type casting in the core module code +- hwlatdetect: Add some more useful debug info +- Reworked the run logic for modules - allow them to flag they won't run +- Fixed a few log messages in load modules +- Add a 30 seconds sleep before unleashing the measurement threads + +* Thu Jan 10 2013 David Sommerseth - 2.0-3 +- Separate out RTEVAL_VERSION into rteval.version, to avoid + massive BuildRequirements + +* Fri Dec 21 2012 David Sommerseth - 2.0-2 +- Split out common files into rteval-common + +* Fri Dec 21 2012 David Sommerseth - 2.0-1 +- Updated to rteval v2.0 and reworked spec file to use setup.py directly + +* Tue Oct 23 2012 Clark Williams - 1.36-1 +- deal with system not having dmidecode python module +- make sure to cast priority parameter to int +- from Raphaƫl Beamonte : + - Rewrite of the get_kthreads method to make it cross-distribution + - Adds getcmdpath method to use which to locate the used commands + - Rewrite of the get_services method to make it cross-distribution + +* Mon Apr 2 2012 Clark Williams - 1.35-1 +- fix thinko where SIGINT and SIGTERM handlers were commented out + +* Thu Jan 12 2012 Clark Williams - 1.34-1 +- fix missing config merge in rteval.py to pass parameters + down to cyclictest +- modify hackbench to use helper function to start process + +* Sat May 14 2011 Clark Williams - 1.33-1 +- modify hackbench cutoff to be 0.75GB/core + +* Mon Aug 23 2010 Clark Williams - 1.32-1 +- update docs +- refactor some RTEval methods to utility functions +- modify hackbench.py not to run under low memory conditions +- clean up XML generation to deal with new hackbench code +- clean up XSL code to deal with new XML 'run' attribute +- from David Sommerseth : + - improve CPU socket counting logic + - delay log directory creation until actually needed +- from Gowrishankar : + - check if the core id really exists (multithreading fix) + +* Mon Jul 26 2010 Clark Williams - 1.31-1 +- from David Sommerseth : + - Updated hackbench implementation to avoid overusing resources + - Don't show NUMA node information if it's missing in the summary.xml + - Show CPU cores properly + +* Wed Jul 21 2010 Clark Williams - 1.30-1 +- added code to hackbench to try to detect and ease memory pressure + +* Fri Jul 16 2010 Clark Williams - 1.29-1 +- fixed incorrect type value in kcompile.py + +* Fri Jul 16 2010 Clark Williams - 1.28-1 +- added logic to loads to adjust number of jobs based on ratio + of memory per core + +* Wed Jul 14 2010 Clark Williams - 1.27-1 +- modified hackbench to go back to using threads rather than + processes for units of work +- added memory size, number of numa nodes and run duration to the + parameter dictionary passed to all loads and cyclictest + +* Tue Jul 13 2010 Clark Williams - 1.26-1 +- modified hackbench parameters to reduce memory consumption + +* Mon Jul 12 2010 Clark Williams - 1.25-1 +- fixed cyclictest bug that caused everything to be uniprocessor +- updated source copyrights to 2010 + +* Fri Jul 9 2010 Clark Williams - 1.24-1 +- modified hackbench arguments and added new parameters for + hackbench in rteval.conf + +* Thu Jul 8 2010 Clark Williams - 1.23-1 +- version bump to deal with out-of-sync cvs issue + +* Thu Jul 8 2010 Clark Williams - 1.22-1 +- merged David Sommerseth changes to use + hackbench from rt-tests packages rather than carry local copy +- converted all loads and cyclictest to pass __init__ parameters + in a dictionary rather than as discrete parameters +- added logging for load output + + * Tue Apr 13 2010 Clark Williams - 1.21-1 +- from Luis Claudio Goncalves : + - remove unecessary wait() call in cyclictest.py + - close /dev/null after using it + - call subprocess.wait() when needed + - remove delayloop code in hackbench.py +- from David Sommerseth : + - add SIGINT handler + - handle non-root user case + - process DMI warnings before command line arguments + - added --annotate feature to rteval + - updates to xmlrpc code + + * Tue Apr 6 2010 Clark Williams - 1.20-1 +- code fixes from Luis Claudio Goncalves +- from David Sommerseth : + - xmlrpc server updates + - cputopology.py for recording topology in xml + - added NUMA node recording for run data + - rpmlint fixes +- added start of rteval whitepaper in docs dir + +* Tue Mar 16 2010 Clark Williams - 1.19-1 +- add ability for --summarize to read tarfiles +- from David Sommerseth + - gather info about loaded kernel modules for XML file + - added child tracking to hackbench to prevent zombies + +* Tue Feb 16 2010 Clark Williams - 1.18-1 +- fix usage of python 2.6 features on RHEL5 (python 2.4) + +* Tue Feb 16 2010 Clark Williams - 1.17-1 +- added logic to filter non-printables from service status output + so that we have legal XML output +- added logic to hackbench.py to cleanup properly at the end + of the test + +* Thu Feb 11 2010 Clark Williams - 1.16-1 +- fix errors in show_remaining_time() introduced because + time values are floats rather than ints + +* Thu Feb 11 2010 Clark Williams - 1.15-1 +- added logic to use --numa and --smp options of new cyclictest +- added countdown report for time remaining in a run + +* Tue Feb 9 2010 Clark Williams - 1.14-1 +- David Sommerseth : + merged XMLReport() changes for hwcert suite + +* Tue Dec 22 2009 Clark Williams - 1.13-1 +- added cyclictest default initializers +- added sanity checks to statistics reduction code +- updated release checklist to include origin push +- updated Makefile clean and help targets +- davids updates (mainly for v7 integration): + - Add explicit sys.path directory to the python sitelib+ + '/rteval' + - Send program arguments via RtEval() constructor + - Added more DMI data into the summary.xml report + - Fixed issue with not including all devices in the + OnBoardDeviceInfo tag + +* Thu Dec 3 2009 David Sommerseth - 1.12-2 +- fixed Makefile and specfile to include and install the + rteval/rteval_histogram_raw.py source file for gaining + raw access to histogram data +- Removed xmlrpc package during merge against master_ipv4 branch + +* Wed Nov 25 2009 Clark Williams - 1.12-1 +- fix incorrect reporting of measurement thread priorities + +* Mon Nov 16 2009 Clark Williams - 1.11-5 +- ensure that no double-slashes ("//") appear in the symlink + path for /usr/bin/rteval (problem with rpmdiff) + +* Tue Nov 10 2009 Clark Williams - 1.11-4 +- changed symlink back to install and tracked by %%files + +* Mon Nov 9 2009 Clark Williams - 1.11-3 +- changed symlink generation from %%post to %%posttrans + +* Mon Nov 9 2009 Clark Williams - 1.11-2 +- fixed incorrect dependency for libxslt + +* Fri Nov 6 2009 Clark Williams - 1.11-1 +- added base OS info to XML file and XSL report +- created new package rteval-loads for the load source code + +* Wed Nov 4 2009 Clark Williams - 1.10-1 +- added config file section for cyclictest and two settable + parameters, buckets and interval + +* Thu Oct 29 2009 Clark Williams - 1.9-1 +- merged davids updates: + -H option (raw histogram data) + cleaned up xsl files + fixed cpu sorting + +* Mon Oct 26 2009 David Sommerseth - 1.8-3 +- Fixed rpmlint complaints + +* Mon Oct 26 2009 David Sommerseth - 1.8-2 +- Added xmlrpc package, containing the XML-RPC mod_python modules + +* Tue Oct 20 2009 Clark Williams - 1.8-1 +- split kcompile and hackbench into sub-packages +- reworked Makefile (and specfile) install/uninstall logic +- fixed sysreport incorrect plugin option +- catch failure when running on root-squashed NFS + +* Tue Oct 13 2009 Clark Williams - 1.7-1 +- added kthread status to xml file +- merged davids changes for option processing and additions + to xml summary + +* Tue Oct 13 2009 Clark Williams - 1.6-1 +- changed stat calculation to loop less +- added methods to grab service and kthread status + +* Mon Oct 12 2009 Clark Williams - 1.5-1 +- changed cyclictest to use less memory when doing statisics + calculations +- updated debug output to use module name prefixes +- changed option processing to only process config file once + +* Fri Oct 9 2009 Clark Williams - 1.4-1 +- changed cyclictest to use histogram rather than sample array +- calcuated statistics directly from histogram +- changed sample interval to 100us +- added -a (affinity) argument to force cpu affinity for + measurement threads + +* Thu Sep 24 2009 David Sommerseth - 1.3-3 +- Cleaned up the spec file and made rpmlint happy + +* Wed Sep 23 2009 David Sommerseth - 1.3-2 +- Removed version number from /usr/share/rteval path + +* Tue Sep 22 2009 Clark Williams - 1.3-1 +- changes from davids: + * changed report code to sort by processor id + * added report submission retry logic + * added emailer class + +* Fri Sep 18 2009 Clark Williams - 1.2-1 +- added config file handling for modifying load behavior and + setting defaults +- added units in report per IBM request + +* Wed Aug 26 2009 Clark Williams - 1.1-2 +- missed a version change in rteval/rteval.py + +* Wed Aug 26 2009 Clark Williams - 1.1-1 +- modified cyclictest.py to start cyclictest threads with a + 'distance' of zero, meaning they all have the same measurement + interval + +* Tue Aug 25 2009 Clark Williams - 1.0-1 +- merged davids XMLRPC fixes +- fixed --workdir option +- verion bump to 1.0 + +* Thu Aug 13 2009 Clark Williams - 0.9-2 +- fixed problem with incorrect version in rteval.py + +* Tue Aug 4 2009 Clark Williams - 0.9-1 +- merged dsommers XMLRPC and database changes +- Specify minimum python-dmidecode version, which got native XML support +- Added rteval_dmi.xsl +- Fixed permission issues in /usr/share/rteval-x.xx + +* Wed Jul 22 2009 Clark Williams - 0.8-1 +- added code to capture clocksource info +- added code to copy dmesg info to report directory +- added code to display clocksource info in report +- added --summarize option to display summary of existing report +- added helpfile target to Makefile + +* Thu Mar 26 2009 Clark Williams - 0.7-1 +- added require for python-schedutils to specfile +- added default for cyclictest output file +- added help parameter to option parser data +- renamed xml output file to summary.xml +- added routine to create tarfile of result files + +* Wed Mar 18 2009 Clark Williams - 0.6-6 +- added code to handle binary data coming from DMI tables + +* Wed Mar 18 2009 Clark Williams - 0.6-5 +- fixed logic for locating XSL template (williams) +- fixed another stupid typo in specfile (williams) + +* Wed Mar 18 2009 Clark Williams - 0.6-4 +- fixed specfile to install rteval_text.xsl in /usr/share directory + +* Wed Mar 18 2009 Clark Williams - 0.6-3 +- added Requires for libxslt-python (williams) +- fixed race condition in xmlout constructor/destructor (williams) + +* Wed Mar 18 2009 Clark Williams - 0.6-2 +- added Requires for libxslt (williams) +- fixed stupid typo in rteval/rteval.py (williams) + +* Wed Mar 18 2009 Clark Williams - 0.6-1 +- added xml output logic (williams, dsommers) +- added xlst template for report generator (dsommers) +- added dmi/smbios output to report (williams) +- added __del__ method to hackbench to cleanup after run (williams) +- modified to always keep run data (williams) + +* Fri Feb 20 2009 Clark Williams - 0.5-1 +- fixed tab/space mix problem +- added report path line to report + +* Fri Feb 20 2009 Clark Williams - 0.4-1 +- reworked report output +- handle keyboard interrupt better +- removed duration mismatch between rteval and cyclictest + +* Mon Feb 2 2009 Clark Williams - 0.3-1 +- initial checkin