diff --git a/.gitignore b/.gitignore index e12f615..d369e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /rt-tests-2.5.tar.xz /rt-tests-2.6.tar.xz /rt-tests-2.7.tar.xz +/rt-tests-2.8.tar.xz diff --git a/0001-rt-tests-hackbench-removed-extra-use-of-optind.patch b/0001-rt-tests-hackbench-removed-extra-use-of-optind.patch deleted file mode 100644 index d35dee7..0000000 --- a/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/0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch b/0002-rt-tests-hackbench-properly-recognize-when-integer-a.patch deleted file mode 100644 index aef4a0d..0000000 --- a/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/realtime-tests.spec b/realtime-tests.spec index 56f93be..0a2848b 100644 --- a/realtime-tests.spec +++ b/realtime-tests.spec @@ -5,8 +5,8 @@ Name: realtime-tests # BuildRequires: numactl-devel # Numa argument to make: NUMA=1 # -Version: 2.7 -Release: 2%{?dist} +Version: 2.8 +Release: 1%{?dist} License: GPLv2 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 @@ -20,8 +20,6 @@ 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 %description realtime-tests is a set of programs that test and measure various components of @@ -30,8 +28,6 @@ latency. It also tests the functioning of priority-inheritance mutexes. %prep %setup -q -n rt-tests-%{version} -%patch1 -p1 -%patch2 -p1 %build %set_build_flags @@ -82,6 +78,10 @@ latency. It also tests the functioning of priority-inheritance mutexes. %{_mandir}/man8/determine_maximum_mpps.8.* %changelog +* Fri Nov 29 2024 John Kacur - 2.8-1 +- Rebase to rt-tests-2.8 upstream +Resolves: RHEL-68658 + * Thu May 23 2024 Anubhav Shelat - 2.7-2 - Added a patch to fix -s option in hackbench. - Added a patch to prevent the user from erroneously passing negative numbers to hackbench. diff --git a/sources b/sources index 2d77f6e..04d9ca4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rt-tests-2.7.tar.xz) = bfe08a30f88cc36a831a9bc338e37575e0ec128fe685eb6c37f9b6adb891821f29efd1c193aa3f0a24cf1a40a43616a30013e27960bdd586785404383c22c8e7 +SHA512 (rt-tests-2.8.tar.xz) = 2e33bb120ed1612d764a96a3afe2308fa21ae2cfc5f0e71a4503b6d5999d6f7ec3def74e164d3c596ee2888c379e54dd17b2908cf6a7f2dc3c20a7670160205a