summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2019-07-19 13:13:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-19 16:19:14 +0100
commita921c2f9dbefde3592bfe65c80ff1ce973aac89b (patch)
tree26b492438631afde3c24b777ed7f960a750c26d7 /meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
parent161d036569c17d28a1ce625a1c2e258fb6cb18c3 (diff)
downloadpoky-a921c2f9dbefde3592bfe65c80ff1ce973aac89b.tar.gz
ltp: upgrade 20190115 -> 20190517
Drop the following patches since the issues have been fixed upstream: 0001-file01.sh-Fix-in-was-not-recognized.patch 0001-lapi-Define-TST_ABI-32-64-to-detect-target-type.patch 0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch 0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch 0009-fix-redefinition-of-struct-msgbuf-error-building-wit.patch 0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch 0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch 0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch 0026-crash01-Define-_GNU_SOURCE.patch 0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch 0034-periodic_output.patch 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch define-sigrtmin-and-sigrtmax-for-musl.patch setregid01-security-string-formatting.patch Refresh the following patches: 0004-build-Add-option-to-select-libc-implementation.patch 0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch 0018-guard-mallocopt-with-__GLIBC__.patch 0020-getdents-define-getdents-getdents64-only-for-glibc.patch 0035-fix-test_proc_kill-hang.patch 0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch 0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch 0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch 0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch 0001-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch Add patch: 0006-rt_tgsigqueueinfo-disable-test-on-musl.patch (From OE-Core rev: eb59546c83f4c217de6272a8d3b2fa65e3c84e7f) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch b/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
new file mode 100644
index 0000000000..aecbc80e9b
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0012-getrlimit03-adjust-a-bit-of-code-to-compatiable-with.patch
@@ -0,0 +1,64 @@
1From 4ac747c1f7ff8e2ec2567d6672822e95a9b56e55 Mon Sep 17 00:00:00 2001
2From: "Hongzhi.Song" <hongzhi.song@windriver.com>
3Date: Mon, 15 Jul 2019 03:39:06 -0400
4Subject: [PATCH] getrlimit03: adjust a bit of code to compatiable with mips32
5
6Error info:
7getrlimit03.c:104: FAIL: __NR_prlimit64(0) had rlim_cur =
8ffffffffffffffff but __NR_getrlimit(0) had rlim_cur = 7fffffff
9
10According to kernel code: [arch/mips/include/uapi/asm/resource.h]
11RLIM_INFINITY is set to 0x7fffffffUL instead of ULONG_MAX on mips32.
12
13 /*
14 * SuS says limits have to be unsigned.
15 * Which makes a ton more sense anyway,
16 * but we keep the old value on MIPS32,
17 * for compatibility:
18 */
19 #ifndef __mips64
20 # define RLIM_INFINITY 0x7fffffffUL
21 #endif
22
23Adding conditional statement about mips to fix this.
24
25Signed-off-by: Jan Stancek <jstancek@redhat.com>
26Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
27
28Upstream-Status: Backport
29[https://github.com/linux-test-project/ltp/commit/7a3bca63cd7f059d490b6274f0fdf3247be93fde]
30
31Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
32---
33 testcases/kernel/syscalls/getrlimit/getrlimit03.c | 8 +++++++-
34 1 file changed, 7 insertions(+), 1 deletion(-)
35
36diff --git a/testcases/kernel/syscalls/getrlimit/getrlimit03.c b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
37index e4d56c4..319bc49 100644
38--- a/testcases/kernel/syscalls/getrlimit/getrlimit03.c
39+++ b/testcases/kernel/syscalls/getrlimit/getrlimit03.c
40@@ -26,6 +26,7 @@
41
42 #include "tst_test.h"
43 #include "lapi/syscalls.h"
44+#include "lapi/abisize.h"
45
46 /**
47 * Linux provides an "old" getrlimit syscall handler that uses signed long,
48@@ -61,7 +62,12 @@ struct rlimit_ulong {
49 unsigned long rlim_cur;
50 unsigned long rlim_max;
51 };
52-const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
53+
54+#if defined(__mips__) && defined(TST_ABI32)
55+ const unsigned long RLIM_INFINITY_UL = 0x7fffffffUL;
56+#else
57+ const unsigned long RLIM_INFINITY_UL = ULONG_MAX;
58+#endif
59
60 static int getrlimit_ulong(int resource, struct rlimit_ulong *rlim)
61 {
62--
632.7.4
64