* [PATCH] khugepaged: selftests: fix timeout condition in wait_for_scan()
@ 2020-06-05 11:07 Dan Carpenter
2020-06-05 13:49 ` Kirill A. Shutemov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-06-05 11:07 UTC (permalink / raw)
To: Shuah Khan, Kirill A. Shutemov
Cc: Stephen Rothwell, Zi Yan, William Kucharski, Andrew Morton,
Yang Shi, John Hubbard, linux-kselftest, kernel-janitors
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@oracle.com>
---
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)
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] khugepaged: selftests: fix timeout condition in wait_for_scan()
2020-06-05 11:07 [PATCH] khugepaged: selftests: fix timeout condition in wait_for_scan() Dan Carpenter
@ 2020-06-05 13:49 ` Kirill A. Shutemov
0 siblings, 0 replies; 2+ messages in thread
From: Kirill A. Shutemov @ 2020-06-05 13:49 UTC (permalink / raw)
To: Dan Carpenter
Cc: Shuah Khan, Stephen Rothwell, Zi Yan, William Kucharski,
Andrew Morton, Yang Shi, John Hubbard, linux-kselftest,
kernel-janitors
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@oracle.com>
> ---
> 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@linux.intel.com>
Thanks.
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-05 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 11:07 [PATCH] khugepaged: selftests: fix timeout condition in wait_for_scan() Dan Carpenter
2020-06-05 13:49 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).