Rebase realtime-tests to the latest upstream
Added 3 patches and updated spec file Resolves: RHEL-144701
This commit is contained in:
parent
740502a403
commit
b6805cebd6
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@
|
||||
/rt-tests-2.7.tar.xz
|
||||
/rt-tests-2.8.tar.xz
|
||||
/rt-tests-2.9.tar.xz
|
||||
/rt-tests-2.10.tar.xz
|
||||
|
||||
44
Makefile-Use-relative-symlinks-for-Python-scripts.patch
Normal file
44
Makefile-Use-relative-symlinks-for-Python-scripts.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 1d20e72c398e651e9afa7869281d257fdb263ebf Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Fri, 20 Mar 2026 15:02:47 -0400
|
||||
Subject: [PATCH 3/3] Makefile: Use relative symlinks for Python scripts
|
||||
|
||||
Use ln -rs to create relative symlinks instead of absolute symlinks
|
||||
for hwlatdetect and get_cyclictest_snapshot. This fixes RPM build
|
||||
warnings and makes the package relocatable.
|
||||
|
||||
Absolute symlinks cause issues when:
|
||||
- Installing to different prefixes
|
||||
- Building in mock/containers
|
||||
- Package relocation is needed
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 83d2a33ecf05..80c3f1073560 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -235,7 +235,7 @@ install_hwlatdetect: hwlatdetect
|
||||
mkdir -p "$(DESTDIR)$(bindir)" ; \
|
||||
install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
|
||||
rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
|
||||
- ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
|
||||
+ ln -rs "$(DESTDIR)$(PYLIB)/hwlatdetect.py" "$(DESTDIR)$(bindir)/hwlatdetect" ; \
|
||||
fi
|
||||
|
||||
.PHONY: install_get_cyclictest_snapshot
|
||||
@@ -244,7 +244,7 @@ install_get_cyclictest_snapshot: get_cyclictest_snapshot
|
||||
mkdir -p "${DESTDIR}${bindir}" ; \
|
||||
install -D -m 755 src/cyclictest/get_cyclictest_snapshot.py ${DESTDIR}${PYLIB}/get_cyclictest_snapshot.py ; \
|
||||
rm -f "${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
|
||||
- ln -s ${PYLIB}/get_cyclictest_snapshot.py "${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
|
||||
+ ln -rs "${DESTDIR}${PYLIB}/get_cyclictest_snapshot.py" "${DESTDIR}${bindir}/get_cyclictest_snapshot" ; \
|
||||
fi
|
||||
|
||||
.PHONY: install_manpages
|
||||
--
|
||||
2.53.0
|
||||
|
||||
35
cyclictest-fix-growing-shm-stat-file.patch
Normal file
35
cyclictest-fix-growing-shm-stat-file.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From f9c82184ce88d8de3ffe588279b0bc41d3887998 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Beckmann <lbckmnn@mailbox.org>
|
||||
Date: Sun, 1 Mar 2026 22:24:06 +0100
|
||||
Subject: [PATCH 2/3] cyclictest: fix growing shm stat file
|
||||
|
||||
On a received USR2 signal, the current statistics are written to a file
|
||||
in shared memory. Before that happens, it is truncated to zero to clear
|
||||
it.
|
||||
|
||||
However, currently the shm file keeps growing with each received signal
|
||||
because the seek pointer is not updated by ftruncate.
|
||||
|
||||
This is fixed by calling fseek after truncating.
|
||||
|
||||
Signed-off-by: Lukas Beckmann <lbckmnn@mailbox.org>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
src/cyclictest/cyclictest.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
|
||||
index 191945e1e0db..960c90560668 100644
|
||||
--- a/src/cyclictest/cyclictest.c
|
||||
+++ b/src/cyclictest/cyclictest.c
|
||||
@@ -1472,6 +1472,7 @@ static void sighand(int sig)
|
||||
return;
|
||||
}
|
||||
rstat_ftruncate(rstat_fd, 0);
|
||||
+ lseek(rstat_fd, 0, SEEK_SET);
|
||||
quiet = 0;
|
||||
dprintf(rstat_fd, "#---------------------------\n");
|
||||
dprintf(rstat_fd, "# cyclictest current status:\n");
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: realtime-tests
|
||||
Summary: Programs that test various rt-features
|
||||
Version: 2.9
|
||||
Version: 2.10
|
||||
Release: 1%{?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
|
||||
@ -18,6 +18,11 @@ BuildRequires: kernel-tools-libs-devel
|
||||
Requires: bash
|
||||
Requires: bc
|
||||
|
||||
# Patches
|
||||
Patch0: rt-tests-hwlatdetect-Add-timestamp-delta.patch
|
||||
Patch1: cyclictest-fix-growing-shm-stat-file.patch
|
||||
Patch2: Makefile-Use-relative-symlinks-for-Python-scripts.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
|
||||
@ -75,6 +80,11 @@ latency. It also tests the functioning of priority-inheritance mutexes.
|
||||
%{_mandir}/man8/determine_maximum_mpps.8.*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 01 2026 John Kacur <jkacur@redhat.com> - 2.10-1
|
||||
- Rebase realtime-tests to the latest upstream
|
||||
- Added 3 patches and updated spec file
|
||||
Resolves: RHEL-144701
|
||||
|
||||
* Thu Jul 10 2025 Tyonnchie Berry <tyberry@redhat.com> - 2.9-1
|
||||
- Rebased to latest upstream version
|
||||
- Dropped previously applied patches
|
||||
|
||||
59
rt-tests-hwlatdetect-Add-timestamp-delta.patch
Normal file
59
rt-tests-hwlatdetect-Add-timestamp-delta.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 5ced2b87b184f773ae331021c1fa1cda85f43c44 Mon Sep 17 00:00:00 2001
|
||||
From: Costa Shulyupin <costa.shul@redhat.com>
|
||||
Date: Tue, 10 Mar 2026 01:09:18 +0200
|
||||
Subject: [PATCH 1/3] rt-tests: hwlatdetect: Add timestamp delta
|
||||
|
||||
Add delta field that calculates the time interval between consecutive
|
||||
samples. For the first sample, the previous timestamp is initialized to
|
||||
'nan' (Not a Number), so the first delta is also 'nan'.
|
||||
|
||||
This helps identify periodic issues during hardware latency testing.
|
||||
|
||||
v2:
|
||||
Address John Kacur's review comments:
|
||||
- Use float('nan') instead of string 'nan' for prev initialization
|
||||
- Compute float(ts) once and reuse for delta calculation and prev update
|
||||
|
||||
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
src/hwlatdetect/hwlatdetect.py | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/hwlatdetect/hwlatdetect.py b/src/hwlatdetect/hwlatdetect.py
|
||||
index 42b9f301718a..18ca930487f0 100755
|
||||
--- a/src/hwlatdetect/hwlatdetect.py
|
||||
+++ b/src/hwlatdetect/hwlatdetect.py
|
||||
@@ -253,7 +253,8 @@ class Tracer(Detector):
|
||||
|
||||
class Sample:
|
||||
'private class for tracer sample data'
|
||||
- __slots__ = 'cpu', 'timestamp', 'inner', 'outer', 'count'
|
||||
+ __slots__ = 'cpu', 'timestamp', 'delta', 'inner', 'outer', 'count'
|
||||
+ prev = float('nan')
|
||||
|
||||
def __init__(self, line):
|
||||
fields = line.split()
|
||||
@@ -276,14 +277,16 @@ class Tracer(Detector):
|
||||
i, o = fields[6].split('/')
|
||||
ts = fields[7][3:]
|
||||
self.timestamp = str(ts)
|
||||
+ ts_float = float(ts)
|
||||
+ self.delta = ts_float - self.__class__.prev
|
||||
+ self.__class__.prev = ts_float
|
||||
self.inner = int(i)
|
||||
self.outer = int(o)
|
||||
self.count = int(kv["count"]) if "count" in kv else None
|
||||
|
||||
def __str__(self):
|
||||
- if self.count is not None:
|
||||
- return f"ts: {self.timestamp}, inner:{self.inner}, outer:{self.outer}, cpu:{self.cpu}, count:{self.count}"
|
||||
- return f"ts: {self.timestamp}, inner:{self.inner}, outer:{self.outer}, cpu:{self.cpu}"
|
||||
+ s = f"ts: {self.timestamp}, delta:{self.delta:.6f}, inner:{self.inner}, outer:{self.outer}, cpu:{self.cpu}"
|
||||
+ return s if self.count is None else s + f", count:{self.count}"
|
||||
|
||||
def display(self):
|
||||
""" convert object to string and print """
|
||||
--
|
||||
2.53.0
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (rt-tests-2.9.tar.xz) = 7e7fe2bc8833891900c9c29ad1e0b188003bcdbd40aeb2412153fef3d5f2157a8a3964d46060e9e12ffc200e66dcfb55f78b8df3163ed33116e9b834e4f3113f
|
||||
SHA512 (rt-tests-2.10.tar.xz) = 11a9ea73c28f01aa70542664e78694eac27ae3c4217969f03f9cc1ddb0720fba44f6378a9d44ea9ecc92025368873b7fe5111bf4f5395e47ae5527ddefdb113b
|
||||
|
||||
Loading…
Reference in New Issue
Block a user