----- Original Message -----
> From: chru...@suse.cz
> To: "Li Wang" <wangli.a...@gmail.com>
> Cc: "Stanislav Kholmanskikh" <stanislav.kholmansk...@oracle.com>, "Jan
> Stancek" <jstan...@redhat.com>,
> ltp-list@lists.sourceforge.net
> Sent: Monday, 25 August, 2014 1:07:02 PM
> Subject: Re: [LTP] [PATCH] mmap15: don't fail if mmap returns EINVAL
>
> Hi!
> If I remember right it's POSIX requirement to return ENOMEM in this case
> and EINVAL sometimes slips in into kernel arch specific memory
> management code.
>
> Citing POSIX:
>
> [ENOMEM]
> MAP_FIXED was specified, and the range [addr,addr+len) exceeds that
> allowed for the address space of a process;
>
It also says:
[EINVAL]
The addr argument (if MAP_FIXED was specified) or off is not a multiple
of the page size as returned by sysconf(), or is considered invalid by
the implementation.
"addr" used in testcase (HIGH_ADDR) is large enough for implementation to
reject it without even looking at len and range it would occupy.
Wouldn't this fit the EINVAL description too?
Regards,
Jan
> So if the testcase fails, it's a bug albeit a minor one.
>
> What we should do depends on how strict we are. I would personaly change
> the testcase to have specific failure message for EINVAL, ideally
> pointing to this discussion on mailing list archive. But if all the rest
> of you consider this minor enough to be ignored we can proceed with the
> original patch as well.
>
> --
> Cyril Hrubis
> chru...@suse.cz
>
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list