diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch | 49 | ||||
-rw-r--r-- | meta/recipes-extended/ltp/ltp_20190115.bb | 3 |
2 files changed, 51 insertions, 1 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch b/meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch new file mode 100644 index 0000000000..620027bd0d --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 785809201ad7dea2872d493efbfd65bb215710d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongzhi.Song" <hongzhi.song@windriver.com> | ||
3 | Date: Sun, 30 Jun 2019 21:56:16 -0400 | ||
4 | Subject: [PATCH] diotest4: Let kernel pick an address when calling mmap | ||
5 | |||
6 | Error: | ||
7 | diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument | ||
8 | diotest4 11 TBROK : diotest4.c:368: Remaining cases broken | ||
9 | |||
10 | This is because the specified addr from mmap is invalid. | ||
11 | We should let kernel itself pick an addrress. | ||
12 | |||
13 | Signed-off-by: Jan Stancek <jstancek@redhat.com> | ||
14 | |||
15 | Upstream-Status: Submitted [https://lists.linux.it/pipermail/ltp/2019-June/012570.html] | ||
16 | |||
17 | Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> | ||
18 | --- | ||
19 | testcases/kernel/io/direct_io/diotest4.c | 8 ++------ | ||
20 | 1 file changed, 2 insertions(+), 6 deletions(-) | ||
21 | |||
22 | diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c | ||
23 | index e4616e4..d88c431 100644 | ||
24 | --- a/testcases/kernel/io/direct_io/diotest4.c | ||
25 | +++ b/testcases/kernel/io/direct_io/diotest4.c | ||
26 | @@ -352,18 +352,14 @@ int main(int argc, char *argv[]) | ||
27 | total++; | ||
28 | |||
29 | /* Test-10: read, write to a mmaped file */ | ||
30 | - shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1)); | ||
31 | - if (shm_base == NULL) { | ||
32 | - tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno)); | ||
33 | - } | ||
34 | offset = 4096; | ||
35 | count = bufsize; | ||
36 | if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) { | ||
37 | tst_brkm(TBROK, cleanup, "can't open %s: %s", | ||
38 | filename, strerror(errno)); | ||
39 | } | ||
40 | - shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE, | ||
41 | - MAP_SHARED | MAP_FIXED, fd, 0); | ||
42 | + shm_base = mmap(NULL, 0x100000, PROT_READ | PROT_WRITE, | ||
43 | + MAP_SHARED, fd, 0); | ||
44 | if (shm_base == (caddr_t) - 1) { | ||
45 | tst_brkm(TBROK, cleanup, "can't mmap file: %s", | ||
46 | strerror(errno)); | ||
47 | -- | ||
48 | 2.8.1 | ||
49 | |||
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb b/meta/recipes-extended/ltp/ltp_20190115.bb index e91dea2f19..b8a7e673d3 100644 --- a/meta/recipes-extended/ltp/ltp_20190115.bb +++ b/meta/recipes-extended/ltp/ltp_20190115.bb | |||
@@ -50,7 +50,8 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \ | |||
50 | file://define-sigrtmin-and-sigrtmax-for-musl.patch \ | 50 | file://define-sigrtmin-and-sigrtmax-for-musl.patch \ |
51 | file://setregid01-security-string-formatting.patch \ | 51 | file://setregid01-security-string-formatting.patch \ |
52 | file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \ | 52 | file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \ |
53 | file://0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \ | 53 | file://0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \ |
54 | file://0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch\ | ||
54 | " | 55 | " |
55 | 56 | ||
56 | S = "${WORKDIR}/git" | 57 | S = "${WORKDIR}/git" |