khugepaged: selftests: fix timeout condition in wait_for_scan()
Subsystems (2)
PATCH 1/1 khugepaged: selftests: fix timeout condition in wait_for_scan()
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 <[email protected]>
--- tools/testing/selftests/vm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vm/khugepaged.c +1 -1
@@ -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 )
Signature · 1 line
2.26.2
Quoted 14 lines · Dan Carpenter
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 <[email protected]>--- tools/testing/selftests/vm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/vm/khugepaged.c +0
-0
tools/testing/selftests/vm/khugepaged.c static bool wait_for_scan(const char *msg, char *p) · line 508
Quoted 8 lines
tools/testing/selftests/vm/khugepaged.c +1
-1@@ -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 )
Thanks.
Signature · 1 line
Kirill A. Shutemov