* [PATCH] ltp: diotest4: Let kernel pick an address when calling mmap
@ 2019-07-01 9:47 Hongzhi.Song
2019-07-01 10:00 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Hongzhi.Song @ 2019-07-01 9:47 UTC (permalink / raw)
To: openembedded-core
Error:
diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument
diotest4 11 TBROK : diotest4.c:368: Remaining cases broken
This is because the manually specified addr from mmap is invalid.
We should let kernel itself pick an addrress.
Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
---
...nel-pick-an-address-when-calling-mma.patch | 50 +++++++++++++++++++
meta/recipes-extended/ltp/ltp_20190115.bb | 3 +-
2 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch
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..109c8ea80c
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch
@@ -0,0 +1,50 @@
+From 785809201ad7dea2872d493efbfd65bb215710d6 Mon Sep 17 00:00:00 2001
+From: "Hongzhi.Song" <hongzhi.song@windriver.com>
+Date: Sun, 30 Jun 2019 21:56:16 -0400
+Subject: [PATCH] diotest4: Let kernel pick an address when calling mmap
+
+Error:
+diotest4 10 TBROK : diotest4.c:368: can't mmap file: Invalid argument
+diotest4 11 TBROK : diotest4.c:368: Remaining cases broken
+
+This is because the specified addr from mmap is invalid.
+We should let kernel itself pick an addrress.
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+
+Upstream-Status: Submitted
+[https://lists.linux.it/pipermail/ltp/2019-June/012570.html]
+
+Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
+---
+ testcases/kernel/io/direct_io/diotest4.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
+index e4616e4..d88c431 100644
+--- a/testcases/kernel/io/direct_io/diotest4.c
++++ b/testcases/kernel/io/direct_io/diotest4.c
+@@ -352,18 +352,14 @@ int main(int argc, char *argv[])
+ total++;
+
+ /* Test-10: read, write to a mmaped file */
+- shm_base = (char *)(((long)sbrk(0) + (shmsz - 1)) & ~(shmsz - 1));
+- if (shm_base == NULL) {
+- tst_brkm(TBROK, cleanup, "sbrk failed: %s", strerror(errno));
+- }
+ offset = 4096;
+ count = bufsize;
+ if ((fd = open(filename, O_DIRECT | O_RDWR)) < 0) {
+ tst_brkm(TBROK, cleanup, "can't open %s: %s",
+ filename, strerror(errno));
+ }
+- shm_base = mmap(shm_base, 0x100000, PROT_READ | PROT_WRITE,
+- MAP_SHARED | MAP_FIXED, fd, 0);
++ shm_base = mmap(NULL, 0x100000, PROT_READ | PROT_WRITE,
++ MAP_SHARED, fd, 0);
+ if (shm_base == (caddr_t) - 1) {
+ tst_brkm(TBROK, cleanup, "can't mmap file: %s",
+ strerror(errno));
+--
+2.8.1
+
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 \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
file://setregid01-security-string-formatting.patch \
file://0001-syscalls-setrlimit03.c-read-proc-sys-fs-nr_open-for-.patch \
- file://0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \
+ file://0001-shmctl01-don-t-use-hardcoded-index-0-for-SHM_STAT-te.patch \
+ file://0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch\
"
S = "${WORKDIR}/git"
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ patchtest: failure for ltp: diotest4: Let kernel pick an address when calling mmap
2019-07-01 9:47 [PATCH] ltp: diotest4: Let kernel pick an address when calling mmap Hongzhi.Song
@ 2019-07-01 10:00 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2019-07-01 10:00 UTC (permalink / raw)
To: Hongzhi.Song; +Cc: openembedded-core
== Series Details ==
Series: ltp: diotest4: Let kernel pick an address when calling mmap
Revision: 1
URL : https://patchwork.openembedded.org/series/18462/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Upstream-Status is Submitted, but it is not mentioned where [test_upstream_status_presence_format]
Suggested fix Include where 0001-diotest4-Let-kernel-pick-an-address-when-calling-mma.patch was submitted
Current Upstream-Status: Submitted
Standard format Upstream-Status: Submitted [where]
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-01 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-01 9:47 [PATCH] ltp: diotest4: Let kernel pick an address when calling mmap Hongzhi.Song
2019-07-01 10:00 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox