mirror of
https://git.yoctoproject.org/poky
synced 2026-06-05 09:52:39 +02:00
stress-ng: add a recipe that replaces the original stress
The original stress is no longer maintained and the homepage went down. This commit replaces it with a maintained re-implementation by Ubuntu. Stress-ng preserves command line option compatibility (for the options that are used in rt-tests), so adjustment is simply changing the name of the executable. Rt-tests is the only user of stress(-ng) in oe-core. (From OE-Core rev: 3fcc10aeba208381166f09861d098d6459d44dfe) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
fc0c93a62e
commit
23e9a8835e
@@ -661,7 +661,7 @@ RECIPE_MAINTAINER_pn-sqlite3 = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
|
||||
RECIPE_MAINTAINER_pn-startup-notification = "Alexander Kanavin <alex.kanavin@gmail.com>"
|
||||
RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
|
||||
RECIPE_MAINTAINER_pn-stress = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-stress-ng = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
|
||||
RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
|
||||
RECIPE_MAINTAINER_pn-swig = "Anuj Mittal <anuj.mittal@intel.com>"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From bbc85a439672120fa1d36be79e959b28fe840919 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Tue, 30 Jul 2019 18:38:03 +0200
|
||||
Subject: [PATCH] Do not preserve ownership when installing example jobs
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f36e57e..20488af 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -452,6 +452,6 @@ install: stress-ng stress-ng.1.gz
|
||||
mkdir -p ${DESTDIR}${MANDIR}
|
||||
cp stress-ng.1.gz ${DESTDIR}${MANDIR}
|
||||
mkdir -p ${DESTDIR}${JOBDIR}
|
||||
- cp -rp example-jobs/*.job ${DESTDIR}${JOBDIR}
|
||||
+ cp -r example-jobs/*.job ${DESTDIR}${JOBDIR}
|
||||
mkdir -p ${DESTDIR}${BASHDIR}
|
||||
cp bash-completion/stress-ng ${DESTDIR}${BASHDIR}
|
||||
20
meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb
Normal file
20
meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb
Normal file
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "System load testing utility"
|
||||
DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
|
||||
imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
|
||||
HOMEPAGE = "https://kernel.ubuntu.com/~cking/stress-ng/"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
SRC_URI = "https://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \
|
||||
file://0001-Do-not-preserve-ownership-when-installing-example-jo.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "46aa41d37690324ceab4febfcc549018"
|
||||
SRC_URI[sha256sum] = "d09dd2a1aea549e478995bf9be90b38906a4cdf33ea7b245ef9d46aa5213c074"
|
||||
|
||||
DEPENDS = "coreutils-native"
|
||||
|
||||
inherit bash-completion
|
||||
|
||||
do_install() {
|
||||
oe_runmake DESTDIR=${D} install
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
--- a/doc/stress.texi
|
||||
+++ b/doc/stress.texi
|
||||
@@ -62,47 +62,47 @@
|
||||
|
||||
@table @samp
|
||||
@item -?
|
||||
-@itemx --help
|
||||
+@item --help
|
||||
Show help information.
|
||||
|
||||
-@itemx --version
|
||||
+@item --version
|
||||
Show version information.
|
||||
|
||||
@item -v
|
||||
-@itemx --verbose
|
||||
+@item --verbose
|
||||
Turn up verbosity.
|
||||
|
||||
@item -q
|
||||
-@itemx --quiet
|
||||
+@item --quiet
|
||||
Turn down verbosity.
|
||||
|
||||
@item -n
|
||||
-@itemx --dry-run
|
||||
+@item --dry-run
|
||||
Show what would have been done.
|
||||
|
||||
@item -t @var{secs}
|
||||
-@itemx --timeout @var{secs}
|
||||
+@item --timeout @var{secs}
|
||||
Time out after @var{secs} seconds.
|
||||
|
||||
-@itemx --backoff @var{usecs}
|
||||
+@item --backoff @var{usecs}
|
||||
Wait for factor of @var{usecs} microseconds before starting work.
|
||||
|
||||
@item -c @var{forks}
|
||||
-@itemx --cpu @var{forks}
|
||||
+@item --cpu @var{forks}
|
||||
Spawn @var{forks} processes each spinning on @samp{sqrt()}.
|
||||
|
||||
@item -i @var{forks}
|
||||
-@itemx --io @var{forks}
|
||||
+@item --io @var{forks}
|
||||
Spawn @var{forks} processes each spinning on @samp{sync()}.
|
||||
|
||||
@item -m @var{forks}
|
||||
-@itemx --vm @var{forks}
|
||||
+@item --vm @var{forks}
|
||||
Spawn @var{forks} processes each spinning on @samp{malloc()}.
|
||||
|
||||
-@itemx --vm-bytes @var{bytes}
|
||||
+@item --vm-bytes @var{bytes}
|
||||
Allocate @var{bytes} number of bytes. The default is 1.
|
||||
|
||||
-@itemx --vm-hang
|
||||
+@item --vm-hang
|
||||
Instruct each vm hog process to go to sleep after allocating memory. This
|
||||
contrasts with their normal behavior, which is to free the memory and
|
||||
reallocate @emph{ad infinitum}. This is useful for simulating low memory
|
||||
@@ -114,13 +114,13 @@
|
||||
@end example
|
||||
|
||||
@item -d @var{forks}
|
||||
-@itemx --hdd @var{forks}
|
||||
+@item --hdd @var{forks}
|
||||
Spawn @var{forks} processes each spinning on @samp{write()}.
|
||||
|
||||
-@itemx --hdd-bytes @var{bytes}
|
||||
+@item --hdd-bytes @var{bytes}
|
||||
Write @var{bytes} number of bytes. The default is 1GB.
|
||||
|
||||
-@itemx --hdd-noclean
|
||||
+@item --hdd-noclean
|
||||
Do not unlink file(s) to which random ASCII data is written.
|
||||
|
||||
@end table
|
||||
@@ -1,15 +0,0 @@
|
||||
SUMMARY = "System load testing utility"
|
||||
DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
|
||||
imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
|
||||
HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
SRC_URI = "http://people.seas.harvard.edu/~apw/${BPN}/${BP}.tar.gz \
|
||||
file://texinfo.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "890a4236dd1656792f3ef9a190cf99ef"
|
||||
SRC_URI[sha256sum] = "057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b"
|
||||
|
||||
inherit autotools
|
||||
@@ -130,7 +130,7 @@ def log_test_header(seq_no, nr_of_tests, name):
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
def start_stress(*args):
|
||||
stress_cmd = [ "stress" ]
|
||||
stress_cmd = [ "stress-ng" ]
|
||||
added_stress_types = []
|
||||
req_stress_types = set(args)
|
||||
cpu_cnt = str(multiprocessing.cpu_count())
|
||||
|
||||
@@ -26,6 +26,6 @@ do_install_ptest() {
|
||||
cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
|
||||
}
|
||||
|
||||
RDEPENDS_${PN}-ptest += " stress python3 python3-multiprocessing python3-datetime python3-misc"
|
||||
RDEPENDS_${PN}-ptest += " stress-ng python3 python3-multiprocessing python3-datetime python3-misc"
|
||||
|
||||
FILES_${PN} += "${prefix}/src/backfire"
|
||||
|
||||
Reference in New Issue
Block a user