[LTP] madvise07.c:72: FAIL: Did not receive SIGBUS
Richard Palethorpe
rpalethorpe@suse.com
Tue Feb 14 16:18:45 CET 2017
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.
More information about the ltp
mailing list