package/stress-ng: update to 0.18.02

Patches 0001/0002 are upstream.
Stress-ng requires Thread support.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Waldemar Brodkorb
2024-08-10 17:51:12 +02:00
committed by Thomas Petazzoni
parent 9173306d24
commit 15a5c0a5d9
5 changed files with 5 additions and 100 deletions

View File

@@ -1,56 +0,0 @@
From 142c3b2414f0adfb13b59dea993054a0daa6cd52 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 4 May 2024 10:04:20 +0200
Subject: [PATCH] stress-sock.c: fix build without SO_ZEROCOPY
uclibc-ng defines MSG_ZEROCOPY but not SO_ZEROCOPY resulting in the
following build failure since version 0.17.04 and
https://github.com/ColinIanKing/stress-ng/commit/2ad8aff9bc1ab822cf615c72712c6031a8f60bbd:
stress-sock.c: In function 'stress_sock_client':
stress-sock.c:656:35: error: 'SO_ZEROCOPY' undeclared (first use in this function); did you mean 'MSG_ZEROCOPY'?
656 | if (setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, &so_zerocopy, sizeof(so_zerocopy)) == 0) {
| ^~~~~~~~~~~
| MSG_ZEROCOPY
stress-sock.c:656:35: note: each undeclared identifier is reported only once for each function it appears in
CC stress-sockfd.c
stress-sock.c: In function 'stress_sock_server':
stress-sock.c:1060:34: error: 'SO_ZEROCOPY' undeclared (first use in this function); did you mean 'MSG_ZEROCOPY'?
1060 | if (setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, &so_zerocopy, sizeof(so_zerocopy)) == 0) {
| ^~~~~~~~~~~
| MSG_ZEROCOPY
Fixes:
- http://autobuild.buildroot.org/results/bcff31bd9820cf0b95f8d8c6de44fd4ab8e2f065
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://github.com/ColinIanKing/stress-ng/commit/142c3b2414f0adfb13b59dea993054a0daa6cd52
---
stress-sock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stress-sock.c b/stress-sock.c
index 253730168..880530d04 100644
--- a/stress-sock.c
+++ b/stress-sock.c
@@ -649,7 +649,7 @@ retry:
args->name, errno, strerror(errno));
goto free_controls;
}
-#if defined(MSG_ZEROCOPY)
+#if defined(MSG_ZEROCOPY) && defined(SO_ZEROCOPY)
if (sock_zerocopy) {
int so_zerocopy = 1;
@@ -1053,7 +1053,7 @@ static int OPTIMIZE3 stress_sock_server(
goto die;
}
-#if defined(MSG_ZEROCOPY)
+#if defined(MSG_ZEROCOPY) && defined(SO_ZEROCOPY)
if (sock_zerocopy) {
int so_zerocopy = 1;
--
2.43.0

View File

@@ -1,40 +0,0 @@
From f8dc9f790251562c3a4635edd29d7674298cd5f7 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 4 May 2024 17:52:32 +0200
Subject: [PATCH] core-sched.c: fix uclibc-ng build
Since version 0.17.02 and commit
e75ecbc8994e94b9e151b1191c1888bd2821fe72, sched.h is not included before
including core-shim.h. The issue is that core-shim.h defines its own
sched_priority parameter in shim_sched_attr. When sched.h is included
after core-shim.h, the build will fail because __sched_priority will not
be found:
In file included from core-sched.c:25:
core-sched.c: In function 'stress_set_sched':
core-sched.c:170:22: error: 'struct shim_sched_attr' has no member named '__sched_priority'; did you mean 'sched_priority'?
170 | attr.sched_priority = (unsigned int)sched_priority;
| ^~~~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/d7d38dbb10f7f188da8dccc44a84a3c46a720bed
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://github.com/ColinIanKing/stress-ng/commit/f8dc9f790251562c3a4635edd29d7674298cd5f7
---
core-shim.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core-shim.h b/core-shim.h
index bed4cf2f6..475aac512 100644
--- a/core-shim.h
+++ b/core-shim.h
@@ -23,6 +23,8 @@
#include <sys/uio.h>
#endif
+#include <sched.h>
+
/*
* BeagleBoneBlack with 4.1.15 kernel does not
* define the following, these should be defined

View File

@@ -4,6 +4,7 @@ config BR2_PACKAGE_STRESS_NG
# perf.c needs PERF_COUNT_HW_REF_CPU_CYCLES
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
depends on BR2_TOOLCHAIN_HAS_THREADS
# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 and ARC
depends on !BR2_nios2
depends on !BR2_arc
@@ -15,8 +16,8 @@ config BR2_PACKAGE_STRESS_NG
https://github.com/ColinIanKing/stress-ng
comment "stress-ng needs a toolchain w/ headers >= 3.3"
comment "stress-ng needs a toolchain w/ threads, headers >= 3.3"
depends on !BR2_nios2 && !BR2_arc
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 || !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -1,3 +1,3 @@
# Locally calculated
sha256 b0bc1495adce6c7a1f82d53f363682b243d6d7e93a06be7f94c9559c0a311a6f stress-ng-0.17.07.tar.gz
sha256 45eac8d354df5be26c9675ec7fc24910f846e47eb6b151e9955d6eae30cfe060 stress-ng-0.18.02.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING

View File

@@ -4,7 +4,7 @@
#
################################################################################
STRESS_NG_VERSION = 0.17.07
STRESS_NG_VERSION = 0.18.02
STRESS_NG_SITE = $(call github,ColinIanKing,stress-ng,V$(STRESS_NG_VERSION))
STRESS_NG_LICENSE = GPL-2.0+
STRESS_NG_LICENSE_FILES = COPYING