summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch132
1 files changed, 132 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch b/external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
new file mode 100644
index 00000000..c0b34490
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-test/stress-ng/stress-ng/0001-Several-changes-to-fix-musl-build.patch
@@ -0,0 +1,132 @@
+From 9bcb4e170f01dbe0a9e7bf6b899c5d9b5283d4c6 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Sun, 11 Nov 2018 23:00:53 -0500
+Subject: [PATCH] Several changes to fix musl build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Rebased patch for:
+
+stress-{context, stackmmap}.c: Set tests to non-implemented because uses
+swapcontext, musl provide the definition but not the implementation due
+ to that functions are pre-POSIX and set to be deprecated.
+ stress-{resources, pty}.c: Doesn't include termio.h and remove stress
+ operations that uses struct termio, musl doesn't provide that struct.
+stress-malloc.c: Check for definition of M_MMAP_THRESHOLD musl doesn't
+ ptovide that constant.
+stress-madvise.c: Add static poision_count integer, definition of
+ MADV_SOFT_OFFLINE doesn't grauntee MADV_HWPOISON to be defined.
+cache.c: Define GLOB_ONLYDIR not available on MUSL.
+
+Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
+Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
+Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
+
+Upstream-status: Pending
+---
+ cache.c | 4 ++++
+ stress-madvise.c | 1 +
+ stress-pty.c | 18 ------------------
+ stress-resources.c | 1 -
+ stress-stackmmap.c | 2 +-
+ 5 files changed, 6 insertions(+), 20 deletions(-)
+
+diff --git a/cache.c b/cache.c
+index e8a0f791..4c7bb486 100644
+--- a/cache.c
++++ b/cache.c
+@@ -28,6 +28,10 @@ typedef struct {
+
+ #include <glob.h>
+
++#ifndef GLOB_ONLYDIR
++#define GLOB_ONLYDIR 0x100
++#endif
++
+ #if defined(__linux__)
+ #define SYS_CPU_PREFIX "/sys/devices/system/cpu"
+ #define GLOB_PATTERN SYS_CPU_PREFIX "/cpu[0-9]*"
+diff --git a/stress-madvise.c b/stress-madvise.c
+index b2e3497f..77e43a91 100644
+--- a/stress-madvise.c
++++ b/stress-madvise.c
+@@ -146,6 +146,7 @@ static int stress_random_advise(const args_t *args)
+ #if defined(MADV_SOFT_OFFLINE)
+ if (advise == MADV_SOFT_OFFLINE) {
+ static int soft_offline_count;
++ static int poison_count;
+
+ /* ..and minimize number of soft offline pages */
+ if ((soft_offline_count >= NUM_SOFT_OFFLINE_MAX) ||
+diff --git a/stress-pty.c b/stress-pty.c
+index 4dd88ab9..c79a7021 100644
+--- a/stress-pty.c
++++ b/stress-pty.c
+@@ -26,7 +26,6 @@
+
+ #if defined(__linux__)
+
+-#include <termio.h>
+ #include <termios.h>
+
+ typedef struct {
+@@ -111,7 +110,6 @@ static int stress_pty(const args_t *args)
+ */
+ for (i = 0; i < n; i++) {
+ struct termios ios;
+- struct termio io;
+ struct winsize ws;
+ int arg;
+
+@@ -133,22 +131,6 @@ static int stress_pty(const args_t *args)
+ if (ioctl(ptys[i].slave, TCSETSF, &ios) < 0)
+ pr_fail_err("ioctl TCSETSF on slave pty");
+ #endif
+-#if defined(TCGETA)
+- if (ioctl(ptys[i].slave, TCGETA, &io) < 0)
+- pr_fail_err("ioctl TCGETA on slave pty");
+-#endif
+-#if defined(TCSETA)
+- if (ioctl(ptys[i].slave, TCSETA, &io) < 0)
+- pr_fail_err("ioctl TCSETA on slave pty");
+-#endif
+-#if defined(TCSETAW)
+- if (ioctl(ptys[i].slave, TCSETAW, &io) < 0)
+- pr_fail_err("ioctl TCSETAW on slave pty");
+-#endif
+-#if defined(TCSETAF)
+- if (ioctl(ptys[i].slave, TCSETAF, &io) < 0)
+- pr_fail_err("ioctl TCSETAF on slave pty");
+-#endif
+ #if defined(TIOCGLCKTRMIOS)
+ if (ioctl(ptys[i].slave, TIOCGLCKTRMIOS, &ios) < 0)
+ pr_fail_err("ioctl TIOCGLCKTRMIOS on slave pty");
+diff --git a/stress-resources.c b/stress-resources.c
+index f3dcfb38..86f9a5ba 100644
+--- a/stress-resources.c
++++ b/stress-resources.c
+@@ -28,7 +28,6 @@
+ #include <sys/inotify.h>
+ #endif
+ #if defined(__linux__)
+-#include <termio.h>
+ #include <termios.h>
+ #endif
+ #if defined(HAVE_LIB_PTHREAD) && defined(__linux__)
+diff --git a/stress-stackmmap.c b/stress-stackmmap.c
+index c2f4c31d..54308777 100644
+--- a/stress-stackmmap.c
++++ b/stress-stackmmap.c
+@@ -24,7 +24,7 @@
+ */
+ #include "stress-ng.h"
+
+-#if defined(__linux__)
++#if defined(__linux__) && False
+
+ #include <ucontext.h>
+
+--
+2.17.0
+