Re: [LTP] Posix test case mmap/31-1 fails on Linux/eglibc

Cyril Hrubis
2011-12-28T18:05:44Z

Hi!
> I run mmap/31-1 failed with ENOMEM on linux, with error message:
> off: fffffffffffff000, len: fffffffffffff000
> Test FAIL: expect EOVERFLOW but get other error: Cannot allocate memory
>
> But compare to mmap/24-2, it mmap() the same length but pass. Its output:
> available memory: 18446744073709551615
> addr: 7f78c54fa000, len: ffffffffffffffff
> addr: 7f78c54fa000, len: fffffffffffff000
> Test Pass: mmap/24-2.c Get ENOMEM: Cannot allocate memory

At least the mmap/31-1, mmap/28-1, mmap/27-1, mmap/24-2, mmap/11-4 and
mmap/11-5 are known to fail sometimes and most likely are coded
incorrecly.

> So I suppose that mmap/31-1 may need update, but I don't know how to
> make mmap() overflow as expect.
> Any suggestion is appreciated.

I would start with careful reading of the mmap() manpages/docs, as most
likely some of the assumptions that the testcase makes is incorrect.

--
Cyril Hrubis
chrubis@suse.cz