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?

My view on this is that you have to take the more specific errors into
consideration first otherwise there is no need to define them in the
first place and you can return the most generic errors in all applicable
cases.

But given that interpreting POSIX is like interpreting religious texts
(POSIX it cryptic, POSIX contains logical errors and people tend to
 quarrel about smallest things) I'm open to any reasonable solution we
 can all agree on (so we can move on to more important things to test).

-- 
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

Reply via email to