From: Richard Palethorpe <rpalethorpe@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] madvise07.c:72: FAIL: Did not receive SIGBUS
Date: Tue, 14 Feb 2017 16:18:45 +0100 [thread overview]
Message-ID: <20170214161845.5dfca62b@linux-v3j5> (raw)
In-Reply-To: <227667312.4337607.1487081174657.JavaMail.zimbra@redhat.com>
Hi Jan,
On Tue, 14 Feb 2017 09:06:14 -0500 (EST)
"Jan Stancek" <jstancek@redhat.com> wrote:
>
> Or maybe MADV_HWPOISON is supposed to work only for faulted-in pages?
> It works fine for me with change below:
>
> diff --git a/testcases/kernel/syscalls/madvise/madvise07.c b/testcases/kernel/syscalls/madvise/madvise07.c
> index 2f8c42e..f5fd4b7 100644
> --- a/testcases/kernel/syscalls/madvise/madvise07.c
> +++ b/testcases/kernel/syscalls/madvise/madvise07.c
> @@ -44,13 +44,13 @@ static int maptypes[] = {
>
> static void run_child(int maptype)
> {
> - const size_t msize = 4096;
> + const size_t msize = getpagesize();
> void *mem = NULL;
>
> mem = SAFE_MMAP(NULL,
> msize,
> PROT_READ | PROT_WRITE,
> - MAP_ANONYMOUS | maptype,
> + MAP_ANONYMOUS | maptype | MAP_POPULATE,
> -1,
> 0);
>
My only concern is that this is not documented in the man pages, but
considering we are testing a test interface, I'm not sure it matters.
Thank you,
Richard.
next prev parent reply other threads:[~2017-02-14 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 2:53 [LTP] madvise07.c:72: FAIL: Did not receive SIGBUS Li Wang
2017-02-13 9:08 ` Cyril Hrubis
2017-02-13 12:43 ` Richard Palethorpe
2017-02-14 14:06 ` Jan Stancek
2017-02-14 15:18 ` Richard Palethorpe [this message]
2017-02-14 15:25 ` Jan Stancek
2017-02-15 9:38 ` Li Wang
2017-02-15 9:45 ` Li Wang
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=20170214161845.5dfca62b@linux-v3j5 \
--to=rpalethorpe@suse.com \
--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