[LTP] madvise07.c:72: FAIL: Did not receive SIGBUS

Jan Stancek jstancek@redhat.com
Tue Feb 14 16:25:59 CET 2017



----- Original Message -----
> From: "Richard Palethorpe" <rpalethorpe@suse.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: "Cyril Hrubis" <chrubis@suse.cz>, ltp@lists.linux.it
> Sent: Tuesday, 14 February, 2017 4:18:45 PM
> Subject: Re: [LTP] madvise07.c:72: FAIL: Did not receive SIGBUS
> 
> 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.

I'll ask on linux-mm.

> 
> Thank you,
> Richard.
> 


More information about the ltp mailing list