selftests/vm: madv_populate: fix missing MADV_POPULATE_(READ|WRITE) definitions
The tests fail to compile in some environments (e.g., Debian 11.5 on x86).
Let's simply conditionally define MADV_POPULATE_(READ|WRITE) if not
already defined, similar to how the khugepaged.c test handles it.
Link: https://lkml.kernel.org/r/20221205193716.276024-3-david@redhat.com
Fixes: 39b2e5cae4
("selftests/vm: make MADV_POPULATE_(READ|WRITE) use in-tree headers")
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
a0ac9b3598
commit
d88825f22b
|
@ -20,6 +20,13 @@
|
|||
#include "../kselftest.h"
|
||||
#include "vm_util.h"
|
||||
|
||||
#ifndef MADV_POPULATE_READ
|
||||
#define MADV_POPULATE_READ 22
|
||||
#endif /* MADV_POPULATE_READ */
|
||||
#ifndef MADV_POPULATE_WRITE
|
||||
#define MADV_POPULATE_WRITE 23
|
||||
#endif /* MADV_POPULATE_WRITE */
|
||||
|
||||
/*
|
||||
* For now, we're using 2 MiB of private anonymous memory for all tests.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue