Skip to content

Commit 9f267a1

Browse files
Dan Carpentertorvalds
authored andcommitted
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: e7b592f ("khugepaged: add self test") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Zi Yan <[email protected]> Cc: William Kucharski <[email protected]> Cc: Yang Shi <[email protected]> Cc: John Hubbard <[email protected]> Link: http://lkml.kernel.org/r/20200605110736.GH978434@mwanda Acked-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 6f63078 commit 9f267a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/vm/khugepaged.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static bool wait_for_scan(const char *msg, char *p)
502502

503503
madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE);
504504

505-
return !timeout;
505+
return timeout == -1;
506506
}
507507

508508
static void alloc_at_fault(void)

0 commit comments

Comments
 (0)