stress: bump to version 1.0.7
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
parent
37f203cba9
commit
815674151e
2 changed files with 47 additions and 42 deletions
|
@ -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
|
||||
|
|
|
@ -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};
|
||||
+ 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)
|
||||
{
|
||||
@@ -304,7 +307,7 @@ main (int argc, char **argv)
|
||||
case 0: /* child */
|
||||
worker_init();
|
||||
alarm (timeout);
|
||||
- usleep (backoff);
|
||||
+ nanosleep (&b, NULL);
|
||||
if (do_dryrun)
|
||||
exit (0);
|
||||
exit (hogcpu ());
|
||||
@@ -318,7 +319,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
@@ -326,7 +329,7 @@ main (int argc, char **argv)
|
||||
case 0: /* child */
|
||||
worker_init();
|
||||
alarm (timeout);
|
||||
- usleep (backoff);
|
||||
+ nanosleep(&b,&b);
|
||||
+ nanosleep (&b, NULL);
|
||||
if (do_dryrun)
|
||||
exit (0);
|
||||
exit (hogio ());
|
||||
@@ -338,7 +339,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
@@ -347,7 +350,7 @@ main (int argc, char **argv)
|
||||
case 0: /* child */
|
||||
worker_init();
|
||||
alarm (timeout);
|
||||
- usleep (backoff);
|
||||
+ nanosleep(&b, &b);
|
||||
+ nanosleep (&b, NULL);
|
||||
if (do_dryrun)
|
||||
exit (0);
|
||||
exit (hogvm
|
||||
@@ -359,7 +360,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
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 */
|
||||
worker_init();
|
||||
alarm (timeout);
|
||||
- usleep (backoff);
|
||||
+ nanosleep(&b, &b);
|
||||
+ nanosleep (&b, NULL);
|
||||
if (do_dryrun)
|
||||
exit (0);
|
||||
exit (hoghdd (do_hdd_bytes));
|
||||
|
|
Loading…
Reference in a new issue