aboutsummaryrefslogtreecommitdiffstats
path: root/testing/stress-ng
diff options
context:
space:
mode:
authorOlliver Schinagl <oliver@schinagl.nl>2019-03-05 19:41:20 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2019-03-10 20:13:41 +0000
commit1911f2f0ee8a69c92c8440304b0f06c4f74ec82e (patch)
tree5c8305169d234b709222effe2172d4507f7ec650 /testing/stress-ng
parent85e7f8b38d8abe527ede0bb4968379e8c129c803 (diff)
downloadaports-1911f2f0ee8a69c92c8440304b0f06c4f74ec82e.tar.bz2
aports-1911f2f0ee8a69c92c8440304b0f06c4f74ec82e.tar.xz
testing/stress-ng: New aport
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Diffstat (limited to 'testing/stress-ng')
-rw-r--r--testing/stress-ng/0001-Remove-GLOB_ONLYDIR-for-musl.patch42
-rw-r--r--testing/stress-ng/APKBUILD60
2 files changed, 102 insertions, 0 deletions
diff --git a/testing/stress-ng/0001-Remove-GLOB_ONLYDIR-for-musl.patch b/testing/stress-ng/0001-Remove-GLOB_ONLYDIR-for-musl.patch
new file mode 100644
index 0000000000..14248a06f0
--- /dev/null
+++ b/testing/stress-ng/0001-Remove-GLOB_ONLYDIR-for-musl.patch
@@ -0,0 +1,42 @@
+From 3109c91234f71966d9488aedb285746ef12b44fd Mon Sep 17 00:00:00 2001
+From: Olliver Schinagl <oliver@schinagl.nl>
+Date: Mon, 4 Mar 2019 07:34:19 +0100
+Subject: [PATCH] Remove GLOB_ONLYDIR for musl
+
+The GNU specific flag to glob 'GLOB_ONLYDIR' is a hint for glob that the
+caller is only interested in directories, and so glob can do some
+internal performance optimizations. It does NOT mean glob WILL only
+return directories, the caller is still responsible for checking this.
+
+As musl does not support this GNU extension, lets just remove it.
+
+Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
+---
+ core-cache.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core-cache.c b/core-cache.c
+index 7fe4a354..52411f84 100644
+--- a/core-cache.c
++++ b/core-cache.c
+@@ -465,7 +465,7 @@ static int get_cpu_cache_details(cpu_t *cpu, const char *cpu_path)
+
+ (void)strncat(glob_path, GLOB_PATTERN_INDEX_PREFIX,
+ sizeof(glob_path) - len - 1);
+- ret2 = glob(glob_path, GLOB_ONLYDIR, NULL, &globbuf);
++ ret2 = glob(glob_path, 0, NULL, &globbuf);
+ if (ret2 != 0) {
+ if (warn_once(WARN_ONCE_NO_CACHE))
+ pr_err("glob on regex \"%s\" failed: %d\n",
+@@ -535,7 +535,7 @@ cpus_t * get_all_cpu_cache_details(void)
+ return NULL;
+ }
+
+- ret = glob(GLOB_PATTERN, GLOB_ONLYDIR, NULL, &globbuf);
++ ret = glob(GLOB_PATTERN, 0, NULL, &globbuf);
+ if (ret != 0) {
+ pr_err("glob on regex \"%s\" failed: %d\n",
+ GLOB_PATTERN, ret);
+--
+2.20.1
+
diff --git a/testing/stress-ng/APKBUILD b/testing/stress-ng/APKBUILD
new file mode 100644
index 0000000000..120d9f47f5
--- /dev/null
+++ b/testing/stress-ng/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Olliver Schinagl <oliver@schinagl.nl>
+# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
+pkgname=stress-ng
+pkgver=0.09.54
+pkgrel=0
+pkgdesc="stress-ng will stress test a computer system in various selectable ways."
+url="https://kernel.ubuntu.com/~cking/stress-ng/"
+arch="all"
+license="GPL-2.0-or-later"
+depends="
+ libc6-compat
+ libgcrypt
+"
+makedepends="
+ attr-dev
+ keyutils-dev
+ libaio-dev
+ libbsd-dev
+ libcap-dev
+ libgcrypt-dev
+ linux-headers
+ lksctp-tools-dev
+ zlib-dev
+"
+options="!check" # Tests are unreliable with qemu and take a long time
+subpackages="${pkgname}-doc ${pkgname}-examples"
+source="
+ https://kernel.ubuntu.com/~cking/tarballs/${pkgname}/${pkgname}-0.09.54.tar.xz
+
+ 0001-Remove-GLOB_ONLYDIR-for-musl.patch
+"
+
+build()
+{
+ make
+}
+
+doc()
+{
+ mkdir -p "${subpkgdir}/usr/share/man/"
+ mv "${pkgdir}/usr/share/man/man1/" "${subpkgdir}/usr/share/man/"
+ rm -r "${pkgdir}/usr/share/man/"
+ rmdir "${pkgdir}/usr/share" || true
+}
+
+examples()
+{
+ mkdir -p "${subpkgdir}/usr/share/doc/${pkgname}/"
+ mv "${pkgdir}/usr/share/doc/${pkgname}/example-jobs/" "${subpkgdir}/usr/share/doc/${pkgname}/"
+ rm -r "${pkgdir}/usr/share/doc/"
+ rmdir "${pkgdir}/usr/share" || true
+}
+
+package()
+{
+ make DESTDIR="${pkgdir}" JOBDIR="/usr/share/doc/${pkgname}/example-jobs/" install
+}
+
+sha512sums="d5e469772dbcabcfa3aa7296b9639de6713d48ef0f279be6df108dd94f3808f40ce13afd5c028bea08b47803cd4b92faea04cd036024c8be3e8a79b5f0850ff4 stress-ng-0.09.54.tar.xz
+8b648cdeced325a04c494e84be78182a941ce4c11327c3c0c24bff2caf399ff09a8e88ad19b564f1eb614e9cdc1560377075ec866d90d17a55cb45498b0c3a0d 0001-Remove-GLOB_ONLYDIR-for-musl.patch"