Re: [PATCH] khugepaged: selftests: fix timeout condition in wait_for_scan()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 05, 2020 at 02:07:36PM +0300, Dan Carpenter wrote:
> The loop exits with "timeout" set to -1 and not to 0 so the test needs
> to be fixed.
> 
> Fixes: e7b592f6caca ("khugepaged: add self test")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  tools/testing/selftests/vm/khugepaged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/vm/khugepaged.c b/tools/testing/selftests/vm/khugepaged.c
> index 51b89cedd09d1..8b75821302a79 100644
> --- a/tools/testing/selftests/vm/khugepaged.c
> +++ b/tools/testing/selftests/vm/khugepaged.c
> @@ -502,7 +502,7 @@ static bool wait_for_scan(const char *msg, char *p)
>  
>  	madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE);
>  
> -	return !timeout;
> +	return timeout == -1;
>  }
>  
>  static void alloc_at_fault(void)

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Thanks.

-- 
 Kirill A. Shutemov



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux