import rteval-3.1-4.el8

This commit is contained in:
CentOS Sources 2021-03-30 11:35:58 -04:00 committed by Stepan Oksanichenko
parent 20c1bd7ee0
commit 86198913b4
28 changed files with 160 additions and 1804 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/rteval-3.0.tar.xz
SOURCES/rteval-3.1.tar.xz

View File

@ -1 +1 @@
ee9134bcf8791823770f3ed764e52d003bd7a597 SOURCES/rteval-3.0.tar.xz
0ac2a091a1a36313e12a7d4158f57df8e4777078 SOURCES/rteval-3.1.tar.xz

View File

@ -1,51 +0,0 @@
From 3a432a4217e1d91bb1dbc2e0503942997c40f370 Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
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 <swood@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
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

View File

@ -1,29 +0,0 @@
From 91f72680851a7ab863d3733bc90e915404e68bc8 Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
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 <swood@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
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

View File

@ -1,34 +0,0 @@
From 7aba0df2cc6072da955ee0ad8bf907dc10cec468 Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
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 <swood@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
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

View File

@ -1,199 +0,0 @@
From d136b8b29b0ec90f07d89dfd834e02f8f8e525b6 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,119 +0,0 @@
From f65d46723cd0e2d3a9b1f788b0ffa51e7fd04f8b Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,33 +0,0 @@
From 24efd8cf2fbde73636c4c8434447b0e04dc7a89a Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -0,0 +1,38 @@
From f436194dc7ecc611f2bbe693b589d7f4993ea41e Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 13 Jan 2021 02:10:24 -0500
Subject: [PATCH] rteval: Fix incorrect import in sysinfo dir
Fix incorrect import in rteval/sysinfo/__init__.py
This could cause a traceback
rteval --duration=60
Traceback (most recent call last):
File "/usr/bin/rteval", line 196, in <module>
from rteval.sysinfo import dmi
File "/usr/lib/python3.6/site-packages/rteval/sysinfo/__init__.py", line 37, in <module>
import rteval.sysinfo.dmi as dmi
AttributeError: module 'rteval' has no attribute 'sysinfo'
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/sysinfo/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/sysinfo/__init__.py b/rteval/sysinfo/__init__.py
index 736354b6258e..0436ebb350d9 100644
--- a/rteval/sysinfo/__init__.py
+++ b/rteval/sysinfo/__init__.py
@@ -34,7 +34,7 @@ from rteval.sysinfo.memory import MemoryInfo
from rteval.sysinfo.osinfo import OSInfo
from rteval.sysinfo.network import NetworkInfo
from rteval.sysinfo.cmdline import cmdlineInfo
-import rteval.sysinfo.dmi as dmi
+from rteval.sysinfo import dmi
class SystemInfo(KernelInfo, SystemServices, dmi.DMIinfo, CPUtopology,
MemoryInfo, OSInfo, NetworkInfo, cmdlineInfo):
--
2.26.2

View File

@ -0,0 +1,74 @@
From d12487a752ad6ff2453c70c4e26e0d8e60fa0292 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 13 Jan 2021 11:12:06 -0500
Subject: [PATCH] rteval: Remove requirement to install python-schedutils
This is actually a no-op in the code as no code was actually importing
python-schedutils or using it!
This patches removes mention of it from a few documentation files.
Note: we should remove rteval.spec entirely, the reason we cannot yet
is that there is some code that parses the version number from it.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
README | 3 ---
doc/installing.txt | 6 +-----
rteval.spec | 2 +-
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/README b/README
index 5ac45dcb2826..a5cf98344a46 100644
--- a/README
+++ b/README
@@ -19,9 +19,6 @@ Rteval requires the following packages to run:
Python >= 3.0
http://www.python.org/download/
-python-schedutils
- git://git.kernel.org/pub/scm/libs/python/python-schedutils/python-schedutils.git
-
python-ethtool
git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git
diff --git a/doc/installing.txt b/doc/installing.txt
index 14a755c4ef18..ff2d43cb9481 100644
--- a/doc/installing.txt
+++ b/doc/installing.txt
@@ -1,10 +1,6 @@
The rteval utility requires some external software libraries to run
properly. These are:
-python-schedutils
- A python library to manipulate priority and affinty of threads
- git://git.kernel.org/pub/scm/libs/python/python-schedutils/python-schedutils.git
-
python-ethtool
A python library to query network interfaces
git://git.kernel.org/pub/scm/linux/kernel/git/acme/python-ethtool.git
@@ -26,7 +22,7 @@ rt-tests
git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
-$ sudo yum install python-{dmidecode,ethtool,schedutils}
+$ sudo yum install python-{dmidecode,ethtool)
$ git clone \
git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
$ cd rt-tests && sudo make prefix=/usr install
diff --git a/rteval.spec b/rteval.spec
index 834ac3c5d783..e84f46ab440b 100644
--- a/rteval.spec
+++ b/rteval.spec
@@ -14,7 +14,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python3-devel
Requires: platform-python
-Requires: python3-schedutils python3-ethtool python3-lxml
+Requires: python3-ethtool python3-lxml
Requires: python3-dmidecode >= 3.10
Requires: rt-tests >= 0.97
Requires: rteval-loads >= 1.4
--
2.26.2

View File

@ -1,83 +0,0 @@
From 0b45cccbe759c9f32bdf9903ed5a5f2a687692ee Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,57 +0,0 @@
From c6aac7eac1625c537f2517af3d3baf0ad5b8a2c4 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,100 +0,0 @@
From 421870656f299a63734855286a4c6ea703dac960 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,41 +0,0 @@
From 3c6483c6e6e24a3e457c631f031f83e81b5e930c Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,70 +0,0 @@
From e3bbc253a8b07b777ace70bd7f605188f43e1d88 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,133 +0,0 @@
From 42d772847f47068b0ad5b4cea0b8a90b7627ae79 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,117 +0,0 @@
From 6292c4793a60280b959ec0a51df994728d653e0a Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,54 +0,0 @@
From ba69dfd96da37208c63313ecab233a39568d576c Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,45 +0,0 @@
From 3059c4a512d3a3f4fb9f1dc29a9210cc018f88d2 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,38 +0,0 @@
From 9430749d66a5e55bf51ccdf3bb5b8a3292508161 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,87 +0,0 @@
From 761741d15d08e6ea420b55c9b26b203edc5e9531 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,117 +0,0 @@
From 415855a8cdafec5b0ec7b97578b9ee1e36878b3e Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,28 +0,0 @@
From 4bd385fb5f23e3f507b3dbbc51677b57abb40e7a Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,51 +0,0 @@
From dab38d731ca8bf69ef41985ff5cc480d64659368 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,55 +0,0 @@
From 0e483c0882b58a1d605e104aa8c1d6c361243116 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,103 +0,0 @@
From bf00009c188352d6b6c99273471b285c152313bd Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,78 +0,0 @@
From c7ba86bae03dc98f3f988e0f261af1651930fd50 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
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 <jkacur@redhat.com>
---
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

View File

@ -1,24 +1,24 @@
Name: rteval
Version: 3.0
Release: 11%{?dist}
Version: 3.1
Release: 4%{?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
URL: https://git.kernel.org/pub/scm/utils/rteval/rteval.git
Source0: https://www.kernel.org/pub/linux/utils/rteval/rteval-3.1.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-ethtool
Requires: 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: kernel-headers
Requires: sos
Requires: tar
BuildArch: noarch
@ -28,6 +28,11 @@ Requires: gcc flex bison bc make
Requires: elfutils elfutils-libelf-devel
Requires: openssl
Requires: openssl-devel
Obsoletes: rteval-common <= 3.1
#Patches
Patch1: rteval-Fix-incorrect-import-in-sysinfo-dir.patch
Patch2: rteval-Remove-python-schedutils-requirement.patch
%description
The rteval script is a utility for measuring various aspects of
@ -38,72 +43,10 @@ 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
%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
# 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
@ -114,8 +57,11 @@ Common files used by rteval, rteval-xmlrpc and rteval-parser
%clean
rm -rf $RPM_BUILD_ROOT
%files common
%doc COPYING
%files
%defattr(-,root,root,-)
%{python3_sitelib}/*.egg-info
%doc COPYING README doc/rteval.txt
%dir %{_datadir}/%{name}
%{python3_sitelib}/rteval/rtevalclient.py*
%{python3_sitelib}/rteval/rtevalConfig.py*
@ -124,12 +70,6 @@ rm -rf $RPM_BUILD_ROOT
%{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
@ -144,15 +84,41 @@ rm -rf $RPM_BUILD_ROOT
%{python3_sitelib}/rteval/__pycache__/*
%changelog
* Thu Jun 25 2020 John Kacur <jkacur@redhat.com> - 3.0.11
* Wed Jan 13 2021 John Kacur <jkacur@redhat.com> - 3.1-4
- Remove python-schedutils requirement
- Fix spec file to make Obsoletes rteval-common cover all necessary releases
Resolves: rhbz#1869340
* Wed Jan 13 2021 John Kacur <jkacur@redhat.com> - 3.1-3
- Remove a stray line in the changelog
Resolves: rhbz#1890555
* Wed Jan 13 2021 John Kacur <jkacur@redhat.com> - 3.1-2
- Fix incorrect import in rteval/sysinfo/__init__.py
Resolves: rhbz#1890555
* Mon Jan 11 2021 John Kacur <jkacur@redhat.com> - 3.1-1
- Upgrade to rteval-3.1
- Don't create a separate rteval-common package anymore
Resolves: rhbz#1890555
* Thu Aug 27 2020 John Kacur <jkacur@redhat.com> - 3.0-13
- Parse cpuinfo correctly when the model name has a colon in it.
Resolves: rhbz#1873120
* Thu Jul 23 2020 John Kacur <jkacur@redhat.com> - 3.0-12
- Use linux-5.7 in kcompile
Resolves: rhbz#1859762
* Thu Jun 25 2020 John Kacur <jkacur@redhat.com> - 3.0-11
- Make sure "make" is available for the kcompile module
Resolves: rhbz#1850924
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 3.0.10
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 3.0-10
- Ensure that a recent rteval-loads with stress-ng is required
Resolves: rhbz#1847233
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 3.0.9
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 3.0-9
- Ensure the stressng command line is displayed in the final report
Resolves: rhbz#1850151