import rteval-3.3-9.el8

This commit is contained in:
CentOS Sources 2022-06-23 17:34:48 +00:00 committed by Stepan Oksanichenko
parent fc978f7684
commit c7898d35fd
6 changed files with 264 additions and 2 deletions

View File

@ -0,0 +1,66 @@
From e20fb6d6f1a357afe5ae7ba63d5bb340e0041156 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 7 Jun 2022 11:29:18 -0400
Subject: [PATCH] rteval: Change the default kernel to compile to linux-5.18.1
rteval compiles the linux kernel as a load
Change the default kernel that rteval compiles to linux-5.18.1
Signed-off-by: John Kacur <jkacur@redhat.com>
---
Makefile | 2 +-
rteval/modules/loads/kcompile.py | 4 ++--
rteval/rteval.conf | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 36d40867883c..ffea8a05f460 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ PREFIX := /usr
DATADIR := $(DESTDIR)/$(PREFIX)/share
LOADDIR := loadsource
-KLOAD := $(LOADDIR)/linux-5.13.2.tar.xz
+KLOAD := $(LOADDIR)/linux-5.18.1.tar.xz
BLOAD := $(LOADDIR)/dbench-4.0.tar.gz
LOADS := $(KLOAD) $(BLOAD)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 3d9b882d8810..2c93c794fe75 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -36,7 +36,7 @@ from rteval.Log import Log
from rteval.misc import expand_cpulist, compress_cpulist
from rteval.systopology import SysTopology
-DEFAULT_KERNEL_PREFIX = "linux-5.13"
+DEFAULT_KERNEL_PREFIX = "linux-5.18"
class KBuildJob:
'''Class to manage a build job bound to a particular node'''
@@ -326,7 +326,7 @@ class Kcompile(CommandLineLoad):
def ModuleParameters():
return {"source": {"descr": "Source tar ball",
- "default": "linux-5.13.2.tar.xz",
+ "default": "linux-5.18.1.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 aa0a53bcfc63..1a8d0afd2642 100644
--- a/rteval/rteval.conf
+++ b/rteval/rteval.conf
@@ -18,7 +18,7 @@ dbench: external
stressng: module
[kcompile]
-source: linux-5.13.2.xz
+source: linux-5.18.1.xz
jobspercore: 2
[hackbench]
--
2.36.1

View File

@ -0,0 +1,31 @@
From 5931ace285305edbf8c86508f89869c5f3be0bf0 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Wed, 9 Mar 2022 14:03:10 -0500
Subject: [PATCH 06/17] rteval: Fix allmodconfig build on machines that don't
allow sha1 signing
rteval compiles the kernel using allmodconfig as a load.
This can be a problem if sha1 signing of modules is disabled.
Fix this by signing with sha512
Suggested-by: Juri Lelli <juri.lelli@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/loads/kcompile.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 8f97d38eca56..367f8dc1ca86 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -66,6 +66,7 @@ class KBuildJob:
self.runcmd = f"make O={self.objdir} -C {self.kdir} -j{self.jobs}"
self.cleancmd = f"make O={self.objdir} -C {self.kdir} clean allmodconfig"
+ self.cleancmd += f"&& pushd {self.objdir} && {self.kdir}/scripts/config -d CONFIG_MODULE_SIG_SHA1 -e CONFIG_MODULE_SIG_SHA512 && popd && make O={self.objdir} -C {self.kdir} olddefconfig"
if self.binder:
self.runcmd = self.binder + " " + self.runcmd
self.cleancmd = self.binder + " " + self.cleancmd
--
2.36.1

View File

@ -0,0 +1,43 @@
From ddbff5f40845c64dbf40f8cbed018242d20abfcb Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 3 Jun 2022 11:16:59 -0400
Subject: [PATCH 15/17] rteval: kcompile: Fix regular expression to match
kernel prefix
If the user specifies a kernel to compile as a load other than the
default kernel, the kernel prefix is obtained with a regular expression.
Currently the regular expression does not accomodate two digit numbers
in the kernel version.
Fix that regular expression to accomodate different kernel versions,
with room to grow for the future.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/loads/kcompile.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 2701a0dcba91..3d9b882d8810 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -169,7 +169,7 @@ class Kcompile(CommandLineLoad):
if not os.path.exists(tarfile):
raise rtevalRuntimeError(self, " tarfile %s does not exist!" % tarfile)
self.source = tarfile
- kernel_prefix = re.search(r"linux-\d\.\d", self.source).group(0)
+ kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}", self.source).group(0)
else:
tarfiles = glob.glob(os.path.join(self.srcdir, "%s*" % DEFAULT_KERNEL_PREFIX))
if tarfiles:
@@ -177,6 +177,7 @@ class Kcompile(CommandLineLoad):
else:
raise rtevalRuntimeError(self, " no kernel tarballs found in %s" % self.srcdir)
kernel_prefix = DEFAULT_KERNEL_PREFIX
+ self._log(Log.DEBUG, f"kernel_prefix = {kernel_prefix}")
# check for existing directory
kdir = None
--
2.36.1

View File

@ -0,0 +1,65 @@
From bc36f2007d614748397c0ccec518ecb2876daca9 Mon Sep 17 00:00:00 2001
From: Valentin Schneider <vschneid@redhat.com>
Date: Tue, 3 May 2022 12:01:06 +0100
Subject: [PATCH 09/17] rteval: kcompile: Fix source tarball argument handling
Kcompile._WorkloadSetup() looks for a "tarball" and "tarfile" entry in
the CfgSection, but I couldn't find a single setter for thoses. The
only way for a user to specify a file is via --kcompile-source, which
doesn't seem to be actually used by the module.
Make Kcompile actually use --kcompile-source.
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/loads/kcompile.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index add0cd86cde4..2701a0dcba91 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -28,6 +28,7 @@ import sys
import os
import os.path
import glob
+import re
import subprocess
from rteval.modules import rtevalRuntimeError
from rteval.modules.loads import CommandLineLoad
@@ -35,7 +36,7 @@ from rteval.Log import Log
from rteval.misc import expand_cpulist, compress_cpulist
from rteval.systopology import SysTopology
-kernel_prefix = "linux-5.13"
+DEFAULT_KERNEL_PREFIX = "linux-5.13"
class KBuildJob:
'''Class to manage a build job bound to a particular node'''
@@ -163,17 +164,19 @@ class Kcompile(CommandLineLoad):
return
# find our source tarball
- if 'tarball' in self._cfg:
- tarfile = os.path.join(self.srcdir, self._cfg.tarfile)
+ if self._cfg.source:
+ tarfile = os.path.join(self.srcdir, self._cfg.source)
if not os.path.exists(tarfile):
raise rtevalRuntimeError(self, " tarfile %s does not exist!" % tarfile)
self.source = tarfile
+ kernel_prefix = re.search(r"linux-\d\.\d", self.source).group(0)
else:
- tarfiles = glob.glob(os.path.join(self.srcdir, "%s*" % kernel_prefix))
+ tarfiles = glob.glob(os.path.join(self.srcdir, "%s*" % DEFAULT_KERNEL_PREFIX))
if tarfiles:
self.source = tarfiles[0]
else:
raise rtevalRuntimeError(self, " no kernel tarballs found in %s" % self.srcdir)
+ kernel_prefix = DEFAULT_KERNEL_PREFIX
# check for existing directory
kdir = None
--
2.36.1

View File

@ -0,0 +1,35 @@
From da95d97bafc9b0740a83da93ba304345ab3c157f Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 29 Apr 2022 16:06:01 -0400
Subject: [PATCH 08/17] rteval: kcompile: Use systopology to get a list of cpus
on a node
kcompile gets a lists of cpus on a node but doesn't take into account
whether the cpus are online or not.
Instead of using the method in kcompile, use the method in systopology,
since that will consider whether the cpus are online or not.
Reported-by: Valentin Schneider <vschneid@redhat.com>
Tested-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
rteval/modules/loads/kcompile.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 367f8dc1ca86..add0cd86cde4 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -202,7 +202,7 @@ 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] = self.topology.getcpus(n)
self.cpus[n].sort()
# if a cpulist was specified, only allow cpus in that list on the node
--
2.36.1

View File

@ -1,6 +1,6 @@
Name: rteval
Version: 3.3
Release: 6%{?dist}
Release: 9%{?dist}
Summary: Utility to evaluate system suitability for RT Linux
Group: Development/Tools
@ -15,7 +15,7 @@ Requires: python3-ethtool
Requires: python3-lxml
Requires: python3-dmidecode >= 3.10
Requires: rt-tests >= 1.5-11
Requires: rteval-loads >= 1.5-1
Requires: rteval-loads >= 1.6-2
Requires: sysstat
Requires: xz bzip2 tar gzip m4 make gawk
Requires: kernel-headers
@ -37,6 +37,11 @@ Patch2: rteval-Fix-Popen-for-python3.6-where-text-True-is-no.patch
Patch3: rteval-Increase-default-buckets-from-2000-to-3500.patch
Patch4: rteval-Don-t-restrict-measurement-threads-to-inherit.patch
Patch5: rteval-If-the-user-doesn-t-specify-a-cpumask-use-the.patch
Patch6: rteval-Fix-allmodconfig-build-on-machines-that-don-t.patch
Patch7: rteval-kcompile-Use-systopology-to-get-a-list-of-cpu.patch
Patch8: rteval-kcompile-Fix-source-tarball-argument-handling.patch
Patch9: rteval-kcompile-Fix-regular-expression-to-match-kern.patch
Patch10: rteval-Change-the-default-kernel-to-compile.patch
%description
The rteval script is a utility for measuring various aspects of
@ -54,6 +59,11 @@ to the screen.
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%build
%{__python3} setup.py build
@ -91,6 +101,18 @@ rm -rf $RPM_BUILD_ROOT
%{python3_sitelib}/rteval/__pycache__/*
%changelog
* Wed Jun 22 2022 John Kacur <jkacur@redhat.com> - 3.3-9
- Add upstream kcompile patches
Resolves: rhbz#2093478
* Tue Jun 07 2022 John Kacur <jkacur@redhat.com> - 3.3-8
- Updates the Requires for rteval-loads with the correct kernel version
Resolves: rhbz#2093478
* Tue Jun 07 2022 John Kacur <jkacur@redhat.com> - 3.3-7
- Change the default kernel to compile to linux-5.18.1
Resolves: rhbz#2093478
* Tue Feb 15 2022 John Kacur <jkacur@redhat.com> - 3.3-6
- Use inherited cpumask if user doesn't specify a cpumask
Resolves: rhbz#2012284