summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-07-30 18:47:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-31 23:02:56 +0100
commit3fcc10aeba208381166f09861d098d6459d44dfe (patch)
tree73dfb736f9e50152eed9be16879e33ac0742e3fc
parenteede1c8e35e09afd06582312ca88a6413cdccf75 (diff)
downloadopenembedded-core-contrib-3fcc10aeba208381166f09861d098d6459d44dfe.tar.gz
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. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/maintainers.inc2
-rw-r--r--meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch23
-rw-r--r--meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb20
-rw-r--r--meta/recipes-extended/stress/files/texinfo.patch80
-rw-r--r--meta/recipes-extended/stress/stress_1.0.4.bb15
-rwxr-xr-xmeta/recipes-rt/rt-tests/files/rt_bmark.py2
-rw-r--r--meta/recipes-rt/rt-tests/rt-tests_1.1.bb2
7 files changed, 46 insertions, 98 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 3d5ab9dcd6..77af8b6dad 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -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>"
diff --git a/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch
new file mode 100644
index 0000000000..c860c717ac
--- /dev/null
+++ b/meta/recipes-extended/stress-ng/stress-ng/0001-Do-not-preserve-ownership-when-installing-example-jo.patch
@@ -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}
diff --git a/meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb b/meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb
new file mode 100644
index 0000000000..f7faf97e68
--- /dev/null
+++ b/meta/recipes-extended/stress-ng/stress-ng_0.10.00.bb
@@ -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
+}
diff --git a/meta/recipes-extended/stress/files/texinfo.patch b/meta/recipes-extended/stress/files/texinfo.patch
deleted file mode 100644
index f23a1f69c4..0000000000
--- a/meta/recipes-extended/stress/files/texinfo.patch
+++ /dev/null
@@ -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
diff --git a/meta/recipes-extended/stress/stress_1.0.4.bb b/meta/recipes-extended/stress/stress_1.0.4.bb
deleted file mode 100644
index e9179d3e19..0000000000
--- a/meta/recipes-extended/stress/stress_1.0.4.bb
+++ /dev/null
@@ -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
diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py
index 080a655893..57b39b52a1 100755
--- a/meta/recipes-rt/rt-tests/files/rt_bmark.py
+++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py
@@ -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())
diff --git a/meta/recipes-rt/rt-tests/rt-tests_1.1.bb b/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
index 496f04fdba..b673cd784f 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_1.1.bb
@@ -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"