----- Original Message -----
> From: "DAN LI" <[email protected]>
> To: "LTP list" <[email protected]>
> Sent: Friday, 17 May, 2013 4:32:16 AM
> Subject: [LTP]  [PATCH] mem.c: check whether MADV_MERGEABLE is available
> 
> Before using MADV_MERGEABLE, check whether it's available by macro
> HAVE_MADV_MERGEABLE.
> 
> Signed-off-by: DAN LI <[email protected]>

Small and straightforward change.

Reviewed-by: Jan Stancek <[email protected]>

> ---
>  testcases/kernel/mem/lib/mem.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
> index 7cda3c5..9bc926e 100644
> --- a/testcases/kernel/mem/lib/mem.c
> +++ b/testcases/kernel/mem/lib/mem.c
> @@ -494,8 +494,10 @@ void test_ksm_merge_across_nodes(unsigned long nr_pages)
>                           MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
>               if (memory[i] == MAP_FAILED)
>                       tst_brkm(TBROK|TERRNO, tst_exit, "mmap");
> +#ifdef HAVE_MADV_MERGEABLE
>               if (madvise(memory[i], length, MADV_MERGEABLE) == -1)
>                       tst_brkm(TBROK|TERRNO, tst_exit, "madvise");
> +#endif
> 
>  #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \
>       && HAVE_MPOL_CONSTANTS
> --
> 1.7.11.rc0
> 
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to