From: Helge Deller <deller@gmx.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Fix mmap01 testcase on hppa architecture
Date: Fri, 9 Jun 2017 16:53:28 +0200 [thread overview]
Message-ID: <20170609145328.GA7129@ls3530> (raw)
The mmap() syscall to map a file at any given page-aligned address (via the
MAP_FIXED flag) can fail on the hppa architecture due to cache colouring
requirements of the architecture.
This patch drops the MAP_FIXED flag and thus maps the file instead at
some convenient address based on the hint as given by the addr
parameter. The tests covered by mmap01 check the *end* of the mmaped
file for consistency, so mapping the beginning of the file at any
address is okay without breaking the main intention of the mmap01
testcase.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/testcases/kernel/syscalls/mmap/mmap01.c b/testcases/kernel/syscalls/mmap/mmap01.c
index 41183d109..a508edb10 100644
--- a/testcases/kernel/syscalls/mmap/mmap01.c
+++ b/testcases/kernel/syscalls/mmap/mmap01.c
@@ -81,7 +81,7 @@ int main(int ac, char **av)
*/
errno = 0;
addr = mmap(addr, page_sz, PROT_READ | PROT_WRITE,
- MAP_FILE | MAP_SHARED | MAP_FIXED, fildes, 0);
+ MAP_FILE | MAP_SHARED, fildes, 0);
/* Check for the return value of mmap() */
if (addr == MAP_FAILED) {
next reply other threads:[~2017-06-09 14:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 14:53 Helge Deller [this message]
2017-06-13 11:18 ` [LTP] [PATCH] Fix mmap01 testcase on hppa architecture Jan Stancek
2017-06-16 13:55 ` Helge Deller
2017-06-16 14:03 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170609145328.GA7129@ls3530 \
--to=deller@gmx.de \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox