[LTP] [PATCH] syscalls/madvise02.c: Fix ENOMEM errno tests

Jan Stancek jstancek@redhat.com
Thu Jul 26 09:46:12 CEST 2018


----- Original Message -----
> With commit 212a4b9 on some distros(e.g. RHEL6.9/7.5), running
> madvise02 got the following error:
> ------------------------------------------------------
> ...
> madvise02.c:181: CONF: MADV_UNMERGEABLE is not supported
> madvise02.c:196: FAIL: madvise succeeded unexpectedly
> madvise02.c:196: FAIL: madvise succeeded unexpectedly
> madvise02.c:181: CONF: MADV_WILLNEED is not supported
> ...
> -------------------------------------------------------
> 
> If MAP_SIZE was equal to a pagesize, shared_anon may get the same
> address which was a part of file2 and already unmapped, so that the
> whole address of file2 became valid again.  Subsequently, ENOMEM
> errno tests succeeded, so changing the order of mmaps to make
> shared_anon get different address.
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>

Hi,

I changed patch to move MUNMAP() instead and added comment
explaining why.

You can review it here:
  https://github.com/linux-test-project/ltp/commit/030e321ce1dfdc3a8daf7ef5a5b7bb7734cf2d9f

Thanks,
Jan


More information about the ltp mailing list