diff options
5 files changed, 102 insertions, 49 deletions
diff --git a/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch b/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch index 3ed7efc7e0..f90e704f05 100644 --- a/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch +++ b/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch | |||
| @@ -11,7 +11,6 @@ swapcontext, musl provide the definition but not the implementation due | |||
| 11 | to that functions are pre-POSIX and set to be deprecated. | 11 | to that functions are pre-POSIX and set to be deprecated. |
| 12 | stress-{resources, pty}.c: Doesn't include termio.h and remove stress | 12 | stress-{resources, pty}.c: Doesn't include termio.h and remove stress |
| 13 | operations that uses struct termio, musl doesn't provide that struct. | 13 | operations that uses struct termio, musl doesn't provide that struct. |
| 14 | stress-pthread.c: Change pthread_yield to sched_yield to be more compatible. | ||
| 15 | stress-malloc.c: Check for definition of M_MMAP_THRESHOLD musl doesn't | 14 | stress-malloc.c: Check for definition of M_MMAP_THRESHOLD musl doesn't |
| 16 | ptovide that constant. | 15 | ptovide that constant. |
| 17 | stress-madvise.c: Add static poision_count integer, definition of | 16 | stress-madvise.c: Add static poision_count integer, definition of |
| @@ -19,13 +18,13 @@ stress-madvise.c: Add static poision_count integer, definition of | |||
| 19 | cache.c: Define GLOB_ONLYDIR not available on MUSL. | 18 | cache.c: Define GLOB_ONLYDIR not available on MUSL. |
| 20 | 19 | ||
| 21 | Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> | 20 | Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> |
| 21 | Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 22 | |||
| 22 | Upstream-status: Pending | 23 | Upstream-status: Pending |
| 23 | --- | 24 | --- |
| 24 | cache.c | 4 ++++ | 25 | cache.c | 4 ++++ |
| 25 | stress-context.c | 2 +- | ||
| 26 | stress-madvise.c | 1 + | 26 | stress-madvise.c | 1 + |
| 27 | stress-malloc.c | 2 +- | 27 | stress-malloc.c | 2 +- |
| 28 | stress-pthread.c | 2 +- | ||
| 29 | stress-pty.c | 18 ------------------ | 28 | stress-pty.c | 18 ------------------ |
| 30 | stress-resources.c | 1 - | 29 | stress-resources.c | 1 - |
| 31 | stress-stackmmap.c | 2 +- | 30 | stress-stackmmap.c | 2 +- |
| @@ -46,19 +45,6 @@ index e01fad0..27870ee 100644 | |||
| 46 | #if defined(__linux__) | 45 | #if defined(__linux__) |
| 47 | #define SYS_CPU_PREFIX "/sys/devices/system/cpu" | 46 | #define SYS_CPU_PREFIX "/sys/devices/system/cpu" |
| 48 | #define GLOB_PATTERN SYS_CPU_PREFIX "/cpu[0-9]*" | 47 | #define GLOB_PATTERN SYS_CPU_PREFIX "/cpu[0-9]*" |
| 49 | diff --git a/stress-context.c b/stress-context.c | ||
| 50 | index c5f50ed..67209e5 100644 | ||
| 51 | --- a/stress-context.c | ||
| 52 | +++ b/stress-context.c | ||
| 53 | @@ -24,7 +24,7 @@ | ||
| 54 | */ | ||
| 55 | #include "stress-ng.h" | ||
| 56 | |||
| 57 | -#if !defined(__OpenBSD__) | ||
| 58 | +#if !defined(__OpenBSD__) && False | ||
| 59 | |||
| 60 | #include <ucontext.h> | ||
| 61 | |||
| 62 | diff --git a/stress-madvise.c b/stress-madvise.c | 48 | diff --git a/stress-madvise.c b/stress-madvise.c |
| 63 | index 43ea454..2e1f8ee 100644 | 49 | index 43ea454..2e1f8ee 100644 |
| 64 | --- a/stress-madvise.c | 50 | --- a/stress-madvise.c |
| @@ -84,19 +70,6 @@ index 8dbe5cc..f505f32 100644 | |||
| 84 | if (get_setting("malloc-threshold", &malloc_threshold)) | 70 | if (get_setting("malloc-threshold", &malloc_threshold)) |
| 85 | (void)mallopt(M_MMAP_THRESHOLD, (int)malloc_threshold); | 71 | (void)mallopt(M_MMAP_THRESHOLD, (int)malloc_threshold); |
| 86 | #endif | 72 | #endif |
| 87 | diff --git a/stress-pthread.c b/stress-pthread.c | ||
| 88 | index 323a1d4..8269f4c 100644 | ||
| 89 | --- a/stress-pthread.c | ||
| 90 | +++ b/stress-pthread.c | ||
| 91 | @@ -139,7 +139,7 @@ static void *stress_pthread_func(void *parg) | ||
| 92 | break; | ||
| 93 | } | ||
| 94 | #if !defined(__NetBSD__) && !defined(__sun__) | ||
| 95 | - (void)pthread_yield(); | ||
| 96 | + (void)sched_yield(); | ||
| 97 | #endif | ||
| 98 | } | ||
| 99 | ret = pthread_mutex_unlock(&mutex); | ||
| 100 | diff --git a/stress-pty.c b/stress-pty.c | 73 | diff --git a/stress-pty.c b/stress-pty.c |
| 101 | index 8c3edf8..518f118 100644 | 74 | index 8c3edf8..518f118 100644 |
| 102 | --- a/stress-pty.c | 75 | --- a/stress-pty.c |
diff --git a/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch b/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch new file mode 100644 index 0000000000..8263401694 --- /dev/null +++ b/meta-oe/recipes-test/stress-ng/stress-ng/0002-stress-fcntl-fix-build-for-musl.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From 7be4680930e2867cefd5c8fe27a4ae81a4ae2628 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 3 | Date: Tue, 9 Jan 2018 18:38:45 -0800 | ||
| 4 | Subject: [PATCH] stress-fcntl: fix build for musl | ||
| 5 | |||
| 6 | Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 7 | |||
| 8 | Upstream-status: Pending | ||
| 9 | --- | ||
| 10 | stress-fcntl.c | 1 + | ||
| 11 | 1 file changed, 1 insertion(+) | ||
| 12 | |||
| 13 | diff --git a/stress-fcntl.c b/stress-fcntl.c | ||
| 14 | index b7eade2..9fa5c38 100644 | ||
| 15 | --- a/stress-fcntl.c | ||
| 16 | +++ b/stress-fcntl.c | ||
| 17 | @@ -413,6 +413,7 @@ ofd_lock_abort: { /* Nowt */ } | ||
| 18 | |||
| 19 | #if defined(F_GET_FILE_RW_HINT) && defined(F_SET_FILE_RW_HINT) | ||
| 20 | { | ||
| 21 | + int ret; | ||
| 22 | size_t i; | ||
| 23 | unsigned long hint; | ||
| 24 | static const unsigned long hints[] = { | ||
| 25 | -- | ||
| 26 | 2.14.3 | ||
| 27 | |||
diff --git a/meta-oe/recipes-test/stress-ng/stress-ng/0003-stress-fcntl.c-fix-syntax-errors.patch b/meta-oe/recipes-test/stress-ng/stress-ng/0003-stress-fcntl.c-fix-syntax-errors.patch new file mode 100644 index 0000000000..4b6a9b3916 --- /dev/null +++ b/meta-oe/recipes-test/stress-ng/stress-ng/0003-stress-fcntl.c-fix-syntax-errors.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From 8537dcafb12be4d986b571f1e1d9f3ceecdc8e63 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 3 | Date: Sun, 7 Jan 2018 21:29:12 -0800 | ||
| 4 | Subject: [PATCH] stress-fcntl.c: fix syntax errors | ||
| 5 | |||
| 6 | Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> | ||
| 7 | |||
| 8 | Upstream-status: Accepted | ||
| 9 | (commit 61d93d6857256cd49df6a6302caf6e7bb69b0f46) | ||
| 10 | --- | ||
| 11 | stress-fcntl.c | 6 +++--- | ||
| 12 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/stress-fcntl.c b/stress-fcntl.c | ||
| 15 | index 7c15d28..b7eade2 100644 | ||
| 16 | --- a/stress-fcntl.c | ||
| 17 | +++ b/stress-fcntl.c | ||
| 18 | @@ -173,7 +173,7 @@ static int do_fcntl(const args_t *args, const int fd) | ||
| 19 | owner.pid = getpgrp(); | ||
| 20 | ret = fcntl(fd, F_SETOWN_EX, &owner); | ||
| 21 | check_return(args, ret, "F_SETOWN_EX, F_OWNER_PGRP"); | ||
| 22 | -#else if defined(HAVE_GETPGRP) && defined(F_OWNER_GID) | ||
| 23 | +#elif defined(HAVE_GETPGRP) && defined(F_OWNER_GID) | ||
| 24 | owner.type = F_OWNER_GID; | ||
| 25 | owner.pid = getpgrp(); | ||
| 26 | ret = fcntl(fd, F_SETOWN_EX, &owner); | ||
| 27 | @@ -202,7 +202,7 @@ static int do_fcntl(const args_t *args, const int fd) | ||
| 28 | owner.type = F_OWNER_PGRP; | ||
| 29 | ret = fcntl(fd, F_GETOWN_EX, &owner); | ||
| 30 | check_return(args, ret, "F_GETOWN_EX, F_OWNER_PGRP"); | ||
| 31 | -#ele if defined(F_OWNER_GID) | ||
| 32 | +#elif defined(F_OWNER_GID) | ||
| 33 | owner.type = F_OWNER_GID; | ||
| 34 | ret = fcntl(fd, F_GETOWN_EX, &owner); | ||
| 35 | check_return(args, ret, "F_GETOWN_EX, F_OWNER_GID"); | ||
| 36 | @@ -436,7 +436,7 @@ ofd_lock_abort: { /* Nowt */ } | ||
| 37 | #endif | ||
| 38 | }; | ||
| 39 | |||
| 40 | - ret = fcntl(fd, F_GET_FILE_RW_HINT, &hint) | ||
| 41 | + ret = fcntl(fd, F_GET_FILE_RW_HINT, &hint); | ||
| 42 | if (ret == 0) { | ||
| 43 | for (i = 0; i < SIZEOF_ARRAY(hints); i++) { | ||
| 44 | hint = hints[i]; | ||
| 45 | -- | ||
| 46 | 2.14.3 | ||
| 47 | |||
diff --git a/meta-oe/recipes-test/stress-ng/stress-ng_0.08.17.bb b/meta-oe/recipes-test/stress-ng/stress-ng_0.08.17.bb deleted file mode 100644 index dc5b2e8ebe..0000000000 --- a/meta-oe/recipes-test/stress-ng/stress-ng_0.08.17.bb +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | SUMMARY = "A tool to load and stress a computer system" | ||
| 2 | HOMEPAGE = "http://kernel.ubuntu.com/~cking/stress-ng/" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
| 5 | |||
| 6 | DEPENDS = "zlib libaio" | ||
| 7 | |||
| 8 | SRC_URI = "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.gz \ | ||
| 9 | " | ||
| 10 | SRC_URI_append_libc-musl = "file://0001-Several-changes-to-fix-musl-build.patch" | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "e0f6497a8c06f5d652bc2ad88d449c12" | ||
| 13 | SRC_URI[sha256sum] = "37cc73e42f5bdb0e0571ba88f6a69b8f05ee28e51afcafc2231c1058b1a5dd18" | ||
| 14 | |||
| 15 | CFLAGS += "-Wall -Wextra -DVERSION='"$(VERSION)"'" | ||
| 16 | |||
| 17 | do_install_append() { | ||
| 18 | install -d ${D}${bindir} | ||
| 19 | install -m 755 ${S}/stress-ng ${D}${bindir}/stress-ng | ||
| 20 | } | ||
diff --git a/meta-oe/recipes-test/stress-ng/stress-ng_0.09.09.bb b/meta-oe/recipes-test/stress-ng/stress-ng_0.09.09.bb new file mode 100644 index 0000000000..24f55ada28 --- /dev/null +++ b/meta-oe/recipes-test/stress-ng/stress-ng_0.09.09.bb | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | SUMMARY = "A tool to load and stress a computer system" | ||
| 2 | HOMEPAGE = "http://kernel.ubuntu.com/~cking/stress-ng/" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
| 5 | |||
| 6 | DEPENDS = "zlib libaio" | ||
| 7 | |||
| 8 | SRC_URI = "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/${BP}.tar.xz \ | ||
| 9 | " | ||
| 10 | SRC_URI_append_libc-musl = " \ | ||
| 11 | file://0001-Several-changes-to-fix-musl-build.patch \ | ||
| 12 | file://0002-stress-fcntl-fix-build-for-musl.patch \ | ||
| 13 | file://0003-stress-fcntl.c-fix-syntax-errors.patch" | ||
| 14 | |||
| 15 | SRC_URI[md5sum] = "6e4df71095e780654ccc0a713b8423fe" | ||
| 16 | SRC_URI[sha256sum] = "e993fddb1d990a0cdb23b2af6cf6c417a1c09e155ada7c558ad80eae8a5feed3" | ||
| 17 | |||
| 18 | UPSTREAM_CHECK_URI ?= "http://kernel.ubuntu.com/~cking/tarballs/${BPN}/" | ||
| 19 | UPSTREAM_CHECK_REGEX ?= "(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 20 | |||
| 21 | CFLAGS += "-Wall -Wextra -DVERSION='"$(VERSION)"'" | ||
| 22 | |||
| 23 | do_install_append() { | ||
| 24 | install -d ${D}${bindir} | ||
| 25 | install -m 755 ${S}/stress-ng ${D}${bindir}/stress-ng | ||
| 26 | } | ||
