diff --git a/.gitignore b/.gitignore index 1804103..342d19b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rt-tests-2.7.tar.xz +SOURCES/rt-tests-2.8.tar.xz diff --git a/.realtime-tests.metadata b/.realtime-tests.metadata index 79aeb90..e43caed 100644 --- a/.realtime-tests.metadata +++ b/.realtime-tests.metadata @@ -1 +1 @@ -6d64c51123fa798257459213a0b8788f898f1cb1 SOURCES/rt-tests-2.7.tar.xz +5d0eed772fbcd6198f45b2746e0a7477366b1984 SOURCES/rt-tests-2.8.tar.xz diff --git a/SOURCES/0001-rt-tests-Put-variables-in-test-feature-in-quotes.patch b/SOURCES/0001-rt-tests-Put-variables-in-test-feature-in-quotes.patch new file mode 100644 index 0000000..9518c03 --- /dev/null +++ b/SOURCES/0001-rt-tests-Put-variables-in-test-feature-in-quotes.patch @@ -0,0 +1,33 @@ +From cb0d857539d2fedc31533390021b600edb906352 Mon Sep 17 00:00:00 2001 +From: Tomas Glozar +Date: Wed, 4 Dec 2024 16:40:03 +0100 +Subject: [PATCH 1/2] rt-tests: Put variables in test-feature in quotes + +test-feature passes several variables (OBJDIR, CFLAGS, CPPFLAGS, +LDFLAGS) to make via a shell command from inside the Makefile. If there +are spaces in either of these, it gets parsed as a second argument +to make and feature detection fails. + +Add quotes around the values to prevent them being passed as multiple +arguments. + +Signed-off-by: Tomas Glozar +Signed-off-by: John Kacur +--- + feature/test-feature.mak | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/feature/test-feature.mak b/feature/test-feature.mak +index 0b3e51c..aef915a 100644 +--- a/feature/test-feature.mak ++++ b/feature/test-feature.mak +@@ -1,5 +1,5 @@ + # SPDX-License-Identifier: GPL-2.0-or-later + define test-feature +-$(shell $(MAKE) OBJDIR=$(OBJDIR) CFLAGS=$(CFLAGS) CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS) \ ++$(shell $(MAKE) OBJDIR="$(OBJDIR)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + -f feature/Makefile feature-$1 clean >/dev/null 2>/dev/null; echo $$?) + endef +-- +2.43.5 + diff --git a/SOURCES/0001-rt-tests-hackbench-removed-extra-use-of-optind.patch b/SOURCES/0001-rt-tests-hackbench-removed-extra-use-of-optind.patch deleted file mode 100644 index d35dee7..0000000 --- a/SOURCES/0001-rt-tests-hackbench-removed-extra-use-of-optind.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 64c7f92979ded63ac5a19ea59e9b791e3da1fae4 Mon Sep 17 00:00:00 2001 -From: Anubhav Shelat -Date: Wed, 22 May 2024 10:43:46 -0400 -Subject: [PATCH 1/2] rt-tests: hackbench: removed extra use of optind - -Currently, using the -s option displays the usage message, even if the -option is properly used. - -This is because Commit 778a02b7c519 ("rt-tests: hackbench: drop incorrect -and unnecessary usage of optind") forgot to drop a use of optind when -processing option 's' which was fixed in this commit. - -Now the -s option works correctly with the proper arguments. - -Note: The next commit in this patchset fixes "ERROR: do not use -assignment in if condition" on line 459. - -Signed-off-by: Anubhav Shelat -Signed-off-by: John Kacur ---- - src/hackbench/hackbench.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c -index d4924b3cc129..fec8357bef81 100644 ---- a/src/hackbench/hackbench.c -+++ b/src/hackbench/hackbench.c -@@ -456,7 +456,7 @@ static void process_options(int argc, char *argv[]) - use_inet = 1; - break; - case 's': -- if (!(argv[optind] && (datasize = atoi(optarg)) > 0)) { -+ if ((datasize = atoi(optarg)) <= 0) { - fprintf(stderr, "%s: --datasize|-s requires an integer > 0\n", argv[0]); - print_usage_exit(1); - } --- -2.45.1 - diff --git a/SOURCES/0002-rt-tests-Handle-lcpupower-flag-outside-LDFLAGS.patch b/SOURCES/0002-rt-tests-Handle-lcpupower-flag-outside-LDFLAGS.patch new file mode 100644 index 0000000..32bf10e --- /dev/null +++ b/SOURCES/0002-rt-tests-Handle-lcpupower-flag-outside-LDFLAGS.patch @@ -0,0 +1,45 @@ +From 623f6908ef3bc8367661a2e1440dd8c5bee91397 Mon Sep 17 00:00:00 2001 +From: Tomas Glozar +Date: Wed, 4 Dec 2024 16:40:04 +0100 +Subject: [PATCH 2/2] rt-tests: Handle -lcpupower flag outside LDFLAGS + +The rt-tests Makefile adds -lcpupower to LDFLAGS if libcpupower support +is detected on the system. However, this does not work when LDFLAGS is +overwritten by an external source. + +Add separate variable LIBCPUPOWER to contain the flag and pass it to the +cyclictest linking phase. This also avoids unnecessarily passing the +flag to the linking of other rt-tests binaries which do not use +libcpupower. + +Signed-off-by: Tomas Glozar +Signed-off-by: John Kacur +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index f656e34..0fa0928 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,7 @@ PYLIB ?= $(shell python3 -m get_pylib) + ifneq ($(no_libcpupower), 1) + ifeq ($(call test-feature,libcpupower), 0) + CPPFLAGS += -DHAVE_LIBCPUPOWER_SUPPORT +-LDFLAGS += -lcpupower ++LIBCPUPOWER += -lcpupower + else + $(warning libcpupower is missing, building without --deepest-idle-state support.) + $(warning Please install libcpupower-dev/kernel-tools-libs-devel) +@@ -135,7 +135,7 @@ $(OBJDIR): + -include $(addprefix $(OBJDIR)/,$(sources:.c=.d)) + + cyclictest: $(OBJDIR)/cyclictest.o $(OBJDIR)/librttest.a $(OBJDIR)/librttestnuma.a +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(RTTESTNUMA) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) $(RTTESTNUMA) $(LIBCPUPOWER) + + cyclicdeadline: $(OBJDIR)/cyclicdeadline.o $(OBJDIR)/librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB) +-- +2.43.5 + diff --git a/SOURCES/0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch b/SOURCES/0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch deleted file mode 100644 index aef4a0d..0000000 --- a/SOURCES/0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch +++ /dev/null @@ -1,70 +0,0 @@ -From cadd661f984c0e6717e681fdaca1ce589b0ed964 Mon Sep 17 00:00:00 2001 -From: Anubhav Shelat -Date: Wed, 22 May 2024 10:43:47 -0400 -Subject: [PATCH 2/2] rt-tests: hackbench: properly recognize when integer - arguments are negative - -hackbench is supposed to catch when the user passes -negative arguments to options -f, -g, -l, and -s. - -Previously hackbench would allow options to accept -negative arguments, resulting in undefined behavior. - -Now process_options() assigns variables outside of -the if considiton where they are used. hackbench will -output a usage message if the user inputs a negative -argument. - -Signed-off-by: Anubhav Shelat -Signed-off-by: John Kacur ---- - src/hackbench/hackbench.c | 12 ++++++++---- - 1 file changed, 8 insertions(+), 4 deletions(-) - -diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c -index fec8357bef81..55be325a38df 100644 ---- a/src/hackbench/hackbench.c -+++ b/src/hackbench/hackbench.c -@@ -426,7 +426,8 @@ static void process_options(int argc, char *argv[]) - } - switch (c) { - case 'f': -- if ((num_fds = atoi(optarg)) <= 0) { -+ num_fds = atoi(optarg); -+ if (atoi(optarg) <= 0) { - fprintf(stderr, "%s: --fds|-f requires an integer > 0\n", argv[0]); - print_usage_exit(1); - } -@@ -435,7 +436,8 @@ static void process_options(int argc, char *argv[]) - fifo = 1; - break; - case 'g': -- if ((num_groups = atoi(optarg)) <= 0) { -+ num_groups = atoi(optarg); -+ if (atoi(optarg) <= 0) { - fprintf(stderr, "%s: --groups|-g requires an integer > 0\n", argv[0]); - print_usage_exit(1); - } -@@ -444,7 +446,8 @@ static void process_options(int argc, char *argv[]) - print_usage_exit(0); - break; - case 'l': -- if ((loops = atoi(optarg)) <= 0) { -+ loops = atoi(optarg); -+ if (atoi(optarg) <= 0) { - fprintf(stderr, "%s: --loops|-l requires an integer > 0\n", argv[0]); - print_usage_exit(1); - } -@@ -456,7 +459,8 @@ static void process_options(int argc, char *argv[]) - use_inet = 1; - break; - case 's': -- if ((datasize = atoi(optarg)) <= 0) { -+ datasize = atoi(optarg); -+ if (atoi(optarg) <= 0) { - fprintf(stderr, "%s: --datasize|-s requires an integer > 0\n", argv[0]); - print_usage_exit(1); - } --- -2.45.1 - diff --git a/SPECS/realtime-tests.spec b/SPECS/realtime-tests.spec index 3f4e0a6..dab9e48 100644 --- a/SPECS/realtime-tests.spec +++ b/SPECS/realtime-tests.spec @@ -1,7 +1,7 @@ Name: realtime-tests Summary: Programs that test various rt-features -Version: 2.7 -Release: 4%{?dist} +Version: 2.8 +Release: 3%{?dist} License: GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.1-or-later URL: https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git Source0: https://www.kernel.org/pub/linux/utils/rt-tests/rt-tests-%{version}.tar.xz @@ -11,12 +11,16 @@ BuildRequires: make BuildRequires: gcc BuildRequires: numactl-devel BuildRequires: python3-devel +# Architectures we build tools/cpupower on +%ifarch i686 x86_64 ppc64le aarch64 +BuildRequires: kernel-tools-libs-devel +%endif Requires: bash Requires: bc -#Patches -Patch1: 0001-rt-tests-hackbench-removed-extra-use-of-optind.patch -Patch2: 0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch +Patch1: 0001-rt-tests-Put-variables-in-test-feature-in-quotes.patch +Patch2: 0002-rt-tests-Handle-lcpupower-flag-outside-LDFLAGS.patch + %description realtime-tests is a set of programs that test and measure various components of real-time kernel behavior. This package measures timer, signal, and hardware @@ -74,6 +78,18 @@ latency. It also tests the functioning of priority-inheritance mutexes. %{_mandir}/man8/determine_maximum_mpps.8.* %changelog +* Fri Dec 13 2024 Tomas Glozar - 2.8-3 +- Limit libcpupower dependency to where it is present +Resolves: RHEL-65488 + +* Wed Dec 04 2024 Tomas Glozar - 2.8-2 +- Fix building against libcpupower +Resolves: RHEL-65488 + +* Fri Nov 29 2024 John Kacur - 2.8-1 +- Rebase to rt-tests-2.8 upstream +Resolves: RHEL-68659 + * Tue Oct 29 2024 Troy Dawson - 2.7-4 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018