diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-07-19 13:13:18 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-19 16:19:14 +0100 |
commit | a921c2f9dbefde3592bfe65c80ff1ce973aac89b (patch) | |
tree | 26b492438631afde3c24b777ed7f960a750c26d7 /meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch | |
parent | 161d036569c17d28a1ce625a1c2e258fb6cb18c3 (diff) | |
download | poky-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/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch b/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch new file mode 100644 index 0000000000..d32ac1dd7c --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0009-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From a8715a1446305ffd76406f63c7f160c13a5b2e72 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongzhi.Song" <hongzhi.song@windriver.com> | ||
3 | Date: Wed, 10 Oct 2018 22:07:05 -0400 | ||
4 | Subject: [PATCH] open_posix_testsuite/mmap24-2: Relax condition a bit | ||
5 | |||
6 | Mips will return EINVAL instead of ENOMEM as expected | ||
7 | if the range [addr + len) exceeds TASK_SIZE. | ||
8 | |||
9 | Linux kernel code: arch/mips/mm/mmap.c | ||
10 | if (flags & MAP_FIXED) { | ||
11 | /* Even MAP_FIXED mappings must reside within TASK_SIZE */ | ||
12 | if (TASK_SIZE - len < addr) | ||
13 | return -EINVAL; | ||
14 | |||
15 | Relax the condition and accept both ENOMEM and EINVAL | ||
16 | as expected outcome. | ||
17 | |||
18 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2018-October/009624.html] | ||
19 | |||
20 | Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> | ||
21 | --- | ||
22 | .../open_posix_testsuite/conformance/interfaces/mmap/24-2.c | 10 +++++----- | ||
23 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
24 | |||
25 | diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c | ||
26 | index 9cf83d9..55090a6 100644 | ||
27 | --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c | ||
28 | +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/24-2.c | ||
29 | @@ -7,7 +7,7 @@ | ||
30 | * source tree. | ||
31 | * | ||
32 | * The mmap() function shall fail if: | ||
33 | - * [ENOMEM] MAP_FIXED was specified, | ||
34 | + * [ENOMEM or EINVAL] MAP_FIXED was specified, | ||
35 | * and the range [addr,addr+len) exceeds that allowed | ||
36 | * for the address space of a process; or, if MAP_FIXED was not specified and | ||
37 | * there is insufficient room in the address space to effect the mapping. | ||
38 | @@ -15,7 +15,7 @@ | ||
39 | * Test Step: | ||
40 | * 1. Map a shared memory object, with size exceeding the value get from | ||
41 | * rlim_cur of resource RLIMIT_AS, setting MAP_FIXED; | ||
42 | - * 3. Should get ENOMEM. | ||
43 | + * 3. Should get ENOMEM or EINVAL. | ||
44 | */ | ||
45 | |||
46 | #include <stdio.h> | ||
47 | @@ -92,8 +92,8 @@ int main(void) | ||
48 | (unsigned long)len); | ||
49 | pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, | ||
50 | 0); | ||
51 | - if (pa == MAP_FAILED && errno == ENOMEM) { | ||
52 | - printf("Got ENOMEM: %s\nTest PASSED\n", strerror(errno)); | ||
53 | + if (pa == MAP_FAILED && (errno == ENOMEM || errno == EINVAL)) { | ||
54 | + printf("Got ENOMEM or EINVAL: %s\nTest PASSED\n", strerror(errno)); | ||
55 | exit(PTS_PASS); | ||
56 | } | ||
57 | |||
58 | @@ -102,6 +102,6 @@ int main(void) | ||
59 | else | ||
60 | munmap(pa, len); | ||
61 | close(fd); | ||
62 | - printf("Test Fail: Did not get ENOMEM as expected\n"); | ||
63 | + printf("Test Failed: Did not get ENOMEM or EINVAL as expected\n"); | ||
64 | return PTS_FAIL; | ||
65 | } | ||
66 | -- | ||
67 | 2.7.4 | ||
68 | |||