aboutsummaryrefslogtreecommitdiff
path: root/utils/stress
diff options
context:
space:
mode:
authorAlexandru Ardelean <alex@shruggie.ro>2023-02-04 17:58:53 +0200
committerAlexandru Ardelean <alex@shruggie.ro>2023-02-06 13:19:10 +0200
commit815674151ea0548fbfe57ac0afa8ff28639b22d4 (patch)
treee3be7f8b186be3ddd00f3152636365b3f9284871 /utils/stress
parent37f203cba958b5480f7297d429fccc41ffed6363 (diff)
stress: bump to version 1.0.7
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Diffstat (limited to 'utils/stress')
-rw-r--r--utils/stress/Makefile8
-rw-r--r--utils/stress/patches/010-usleep.patch81
2 files changed, 47 insertions, 42 deletions
diff --git a/utils/stress/Makefile b/utils/stress/Makefile
index 953b21cd5..8e13158e5 100644
--- a/utils/stress/Makefile
+++ b/utils/stress/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=stress
+PKG_VERSION:=1.0.7
PKG_RELEASE:=1
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=1.0.5
-PKG_SOURCE_URL:=https://github.com/resurrecting-open-source-projects/stress
-PKG_MIRROR_HASH:=711e42ead6fd220a98821aae0cf024930785e439d3d0d50663fed1b2cd021bd1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://github.com/resurrecting-open-source-projects/stress/releases/download/${PKG_VERSION}/
+PKG_HASH:=e63adb57597e617c14ecb0d841b5d990460796d9e9ec69bd56fe645ef02eb239
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
PKG_LICENSE:=GPL-2.0-only
diff --git a/utils/stress/patches/010-usleep.patch b/utils/stress/patches/010-usleep.patch
index fde51cf85..02a220184 100644
--- a/utils/stress/patches/010-usleep.patch
+++ b/utils/stress/patches/010-usleep.patch
@@ -1,46 +1,51 @@
--- a/src/stress.c
+++ b/src/stress.c
-@@ -263,6 +263,7 @@ main (int argc, char **argv)
+@@ -266,9 +266,12 @@ main (int argc, char **argv)
+ while ((forks = (do_cpu + do_io + do_vm + do_hdd)))
+ {
+ long long backoff, timeout = 0;
++ struct timespec b;
- /* Calculate the backoff value so we get good fork throughput. */
- backoff = do_backoff * forks;
-+ struct timespec b = {backoff / 1000000, (backoff % 1000000) * 1000};
- dbg (stdout, "using backoff sleep of %llius\n", backoff);
+ /* Calculate the backoff value so we get good fork throughput. */
+ backoff = do_backoff * forks;
++ b.tv_sec = backoff / 1000000;
++ b.tv_nsec = (backoff % 1000000) * 1000;
+ dbg (stdout, "using backoff sleep of %llius\n", backoff);
- /* If we are supposed to respect a timeout, calculate it. */
-@@ -297,7 +298,7 @@ main (int argc, char **argv)
- {
+ /* If we are supposed to respect a timeout, calculate it. */
+@@ -304,7 +307,7 @@ main (int argc, char **argv)
case 0: /* child */
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep(&b, NULL);
- if (do_dryrun)
- exit (0);
- exit (hogcpu ());
-@@ -318,7 +319,7 @@ main (int argc, char **argv)
- {
+ worker_init();
+ alarm (timeout);
+- usleep (backoff);
++ nanosleep (&b, NULL);
+ if (do_dryrun)
+ exit (0);
+ exit (hogcpu ());
+@@ -326,7 +329,7 @@ main (int argc, char **argv)
case 0: /* child */
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep(&b,&b);
- if (do_dryrun)
- exit (0);
- exit (hogio ());
-@@ -338,7 +339,7 @@ main (int argc, char **argv)
- {
+ worker_init();
+ alarm (timeout);
+- usleep (backoff);
++ nanosleep (&b, NULL);
+ if (do_dryrun)
+ exit (0);
+ exit (hogio ());
+@@ -347,7 +350,7 @@ main (int argc, char **argv)
case 0: /* child */
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep(&b, &b);
- if (do_dryrun)
- exit (0);
- exit (hogvm
-@@ -359,7 +360,7 @@ main (int argc, char **argv)
- {
+ worker_init();
+ alarm (timeout);
+- usleep (backoff);
++ nanosleep (&b, NULL);
+ if (do_dryrun)
+ exit (0);
+ exit (hogvm (do_vm_bytes, do_vm_stride, do_vm_hang, do_vm_keep));
+@@ -368,7 +371,7 @@ main (int argc, char **argv)
case 0: /* child */
- alarm (timeout);
-- usleep (backoff);
-+ nanosleep(&b, &b);
- if (do_dryrun)
- exit (0);
- exit (hoghdd (do_hdd_bytes));
+ worker_init();
+ alarm (timeout);
+- usleep (backoff);
++ nanosleep (&b, NULL);
+ if (do_dryrun)
+ exit (0);
+ exit (hoghdd (do_hdd_bytes));