forked from pool/rt-tests
- Update to upstream version v2.4 https://lore.kernel.org/linux-rt-users/20220708150017.13462-1-jkacur@redhat.com/ - Update to upstream version v2.3 https://lore.kernel.org/linux-rt-users/20211210184649.11084-1-jkacur@redhat.com/ - Remove old patch rt-tests-1.10-Makefile.patch, which installed src/cyclictest/get_cyclictest_snapshot.8. Upstream guarded it with PYLIB in 3d1976b ("Makefile: manpages: only add get_cyclictest_snapshot if PYLIB") but PYLIB should be defined due BuildRequires: python3-base - Backport runtime fixes from upcomming release: * 0001-cyclictest-Fix-threads-being-affined-even-when-a-isn.patch * 0002-rt-tests-Remove-arbitrary-num-of-threads-limits.patch * 0003-rt-tests-hackbench-Add-error-checking-to-connect-and.patch * 0004-rt-tests-hwlatdetect-Update-to-integer-division.patch - Use tarball with xz compression instead of gz - Use %autosetup (not having to add -p1 for patches) OBS-URL: https://build.opensuse.org/request/show/1037851 OBS-URL: https://build.opensuse.org/package/show/benchmark/rt-tests?expand=0&rev=27
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From 7cd6289fbebfc436e0f157f1fd2731a684b3af95 Mon Sep 17 00:00:00 2001
|
|
From: John Kacur <jkacur@redhat.com>
|
|
Date: Tue, 1 Nov 2022 09:30:40 -0400
|
|
Subject: [PATCH 3/4] rt-tests: hackbench: Add error checking to connect and
|
|
getsockname
|
|
|
|
Add error checking around the calls connect and getsockname
|
|
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
[ upstream status: c7768aae2e6d9e5440a3f4dc62d6e03f05df80f4 ]
|
|
|
|
Signed-off-by: Petr Vorel <pvorel@suse.cz>
|
|
---
|
|
src/hackbench/hackbench.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
|
|
index 18c9284..8c6d835 100644
|
|
--- a/src/hackbench/hackbench.c
|
|
+++ b/src/hackbench/hackbench.c
|
|
@@ -130,14 +130,16 @@ static int inet_socketpair(int fds[2])
|
|
|
|
if (bind(s1, &sin, len) < 0)
|
|
barf("bind");
|
|
- getsockname(s1, &sin, &len);
|
|
+ if (getsockname(s1, &sin, &len) < 0)
|
|
+ barf("getsockname");
|
|
if (listen(s1, 10) < 0)
|
|
barf("listen");
|
|
if (ioctl(s2, FIONBIO, &ul) < 0)
|
|
barf("ioctl");
|
|
if (ioctl(s1, FIONBIO, &ul) < 0)
|
|
barf("ioctl");
|
|
- connect(s2, &sin, len);
|
|
+ if (connect(s2, &sin, len) < 0)
|
|
+ barf("connect");
|
|
if ((fds[0] = accept(s1, &sin, &len)) < 0)
|
|
barf("accept");
|
|
ul = 0;
|
|
--
|
|
2.38.1
|
|
|