On Fri, Feb 11, 2011 at 1:32 AM, Bian Naimeng <[email protected]> wrote:
> If len is too large, mmap may return ENOMEM, so we should set a less
> value to it.
>
> Signed-off-by: Bian Naimeng <[email protected]>
>
> ---
>  .../conformance/interfaces/mmap/31-1.c             |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git 
> a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c 
> b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
> index 86ff0a0..2dbb81c 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/31-1.c
> @@ -71,12 +71,7 @@ int main()
>    * FIXME: We assume maximum offset is ULONG_MAX
>    * */
>
> -  len = ULONG_MAX;
> -  if (len % page_size)
> -  {
> -    /* Lower boundary */
> -    len &= ~(page_size - 1);
> -  }
> +  len = page_size * 2;
>
>   off = ULONG_MAX;
>   if (off % page_size)
> @@ -103,4 +98,4 @@ int main()
>   close (fd);
>   munmap (pa, len);
>   return PTS_FAIL;

    This doesn't properly fix the testcase. Please read the
description in the header and formulate a different solution.
Thanks,
-Garrett

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to