From a0eb1c8efc7982068ebe79f6fb2379896f45c9d2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mon, 9 Aug 2021 18:26:16 +0000 Subject: [PATCH] import rteval-3.2-2.el8 --- .gitignore | 2 +- .rteval.metadata | 2 +- ...-Fix-incorrect-import-in-sysinfo-dir.patch | 38 ---------- ...Remove-python-schedutils-requirement.patch | 74 ------------------- ...ement-threads-to-the-cpus-in-cpumask.patch | 35 +++++++++ SPECS/rteval.spec | 18 +++-- 6 files changed, 49 insertions(+), 120 deletions(-) delete mode 100644 SOURCES/rteval-Fix-incorrect-import-in-sysinfo-dir.patch delete mode 100644 SOURCES/rteval-Remove-python-schedutils-requirement.patch create mode 100644 SOURCES/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch diff --git a/.gitignore b/.gitignore index a331781..c5cd9ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rteval-3.1.tar.xz +SOURCES/rteval-3.2.tar.xz diff --git a/.rteval.metadata b/.rteval.metadata index 6266f9e..51e5107 100644 --- a/.rteval.metadata +++ b/.rteval.metadata @@ -1 +1 @@ -0ac2a091a1a36313e12a7d4158f57df8e4777078 SOURCES/rteval-3.1.tar.xz +91a7a126a2fafd88f03880a21c656fd571a347f5 SOURCES/rteval-3.2.tar.xz diff --git a/SOURCES/rteval-Fix-incorrect-import-in-sysinfo-dir.patch b/SOURCES/rteval-Fix-incorrect-import-in-sysinfo-dir.patch deleted file mode 100644 index 349af6e..0000000 --- a/SOURCES/rteval-Fix-incorrect-import-in-sysinfo-dir.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f436194dc7ecc611f2bbe693b589d7f4993ea41e Mon Sep 17 00:00:00 2001 -From: John Kacur -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 - from rteval.sysinfo import dmi - File "/usr/lib/python3.6/site-packages/rteval/sysinfo/__init__.py", line 37, in - import rteval.sysinfo.dmi as dmi -AttributeError: module 'rteval' has no attribute 'sysinfo' - -Signed-off-by: John Kacur ---- - 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 - diff --git a/SOURCES/rteval-Remove-python-schedutils-requirement.patch b/SOURCES/rteval-Remove-python-schedutils-requirement.patch deleted file mode 100644 index 3842e99..0000000 --- a/SOURCES/rteval-Remove-python-schedutils-requirement.patch +++ /dev/null @@ -1,74 +0,0 @@ -From d12487a752ad6ff2453c70c4e26e0d8e60fa0292 Mon Sep 17 00:00:00 2001 -From: John Kacur -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 ---- - 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 - diff --git a/SOURCES/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch b/SOURCES/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch new file mode 100644 index 0000000..e55a6f1 --- /dev/null +++ b/SOURCES/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch @@ -0,0 +1,35 @@ +From be811d28a471cfcaf7960289e00960e7f5b18f03 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Thu, 15 Jul 2021 10:09:03 -0400 +Subject: [PATCH] rteval: Restrict measurement threads to the cpus in cpumask + +Only run measurement threads on cpus in the list from sched_getaffinity + +Signed-off-by: John Kacur +--- + rteval/modules/measurement/cyclictest.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py +index 232bd6b9acc6..ae91dbb7c043 100644 +--- a/rteval/modules/measurement/cyclictest.py ++++ b/rteval/modules/measurement/cyclictest.py +@@ -209,6 +209,15 @@ class Cyclictest(rtevalModulePrototype): + else: + self.__cpus = online_cpus() + ++ # Get the cpuset from the environment ++ cpuset = os.sched_getaffinity(0) ++ ++ # Convert the elements to strings ++ cpuset = [str(c) for c in cpuset] ++ ++ # Only include cpus that are in the cpuset ++ self.__cpus = [c for c in self.__cpus if c in cpuset] ++ + self.__numcores = len(self.__cpus) + + info = cpuinfo() +-- +2.31.1 + diff --git a/SPECS/rteval.spec b/SPECS/rteval.spec index af11e30..e0f0d07 100644 --- a/SPECS/rteval.spec +++ b/SPECS/rteval.spec @@ -1,12 +1,12 @@ Name: rteval -Version: 3.1 -Release: 4%{?dist} +Version: 3.2 +Release: 2%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools License: GPLv2 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 +Source0: https://www.kernel.org/pub/linux/utils/rteval/rteval-%{version}.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python3-devel @@ -31,8 +31,7 @@ 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 +Patch1: rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch %description The rteval script is a utility for measuring various aspects of @@ -46,7 +45,6 @@ to the screen. %prep %setup -q %patch1 -p1 -%patch2 -p1 %build %{__python3} setup.py build @@ -84,6 +82,14 @@ rm -rf $RPM_BUILD_ROOT %{python3_sitelib}/rteval/__pycache__/* %changelog +* Thu Jul 15 2021 John Kacur - 3.2-2 +- Restrict measurement threads to cpus in cpumask +Resolves: rhbz#1942261 + +* Thu Jul 15 2021 John Kacur - 3.2-1 +- Rebase to latest upstream rteval-3.2 +Resolves: rhbz#1982718 + * Wed Jan 13 2021 John Kacur - 3.1-4 - Remove python-schedutils requirement - Fix spec file to make Obsoletes rteval-common cover all necessary releases