From: Chengming Zhou <zhouchengming@bytedance.com>
To: akpm@linux-foundation.org, shuah@kernel.org
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Chengming Zhou <zhouchengming@bytedance.com>
Subject: [PATCH 2/2] kselftest/vm: fix tests build with old libc
Date: Sun, 27 Feb 2022 13:53:30 +0800 [thread overview]
Message-ID: <20220227055330.43087-2-zhouchengming@bytedance.com> (raw)
In-Reply-To: <20220227055330.43087-1-zhouchengming@bytedance.com>
The error message when I build vm tests on debian10 (GLIBC 2.28):
userfaultfd.c: In function ‘userfaultfd_pagemap_test’:
userfaultfd.c:1393:37: error: ‘MADV_PAGEOUT’ undeclared (first use
in this function); did you mean ‘MADV_RANDOM’?
if (madvise(area_dst, test_pgsize, MADV_PAGEOUT))
^~~~~~~~~~~~
MADV_RANDOM
This patch includes these newer definitions from UAPI linux/mman.h,
is useful to fix tests build on systems without these definitions in
glibc sys/mman.h.
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
tools/testing/selftests/vm/userfaultfd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c
index 2f49c9af1b58..3fc1d2ee2948 100644
--- a/tools/testing/selftests/vm/userfaultfd.c
+++ b/tools/testing/selftests/vm/userfaultfd.c
@@ -46,6 +46,7 @@
#include <signal.h>
#include <poll.h>
#include <string.h>
+#include <linux/mman.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/ioctl.h>
--
2.20.1
next prev parent reply other threads:[~2022-02-27 5:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 5:53 [PATCH 1/2] kselftest/vm: override TARGETS from arguments Chengming Zhou
2022-02-27 5:53 ` Chengming Zhou [this message]
2022-03-03 21:27 ` [PATCH 2/2] kselftest/vm: fix tests build with old libc Shuah Khan
2022-03-03 19:17 ` [PATCH 1/2] kselftest/vm: override TARGETS from arguments Shuah Khan
2022-03-04 14:50 ` [External] " Chengming Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220227055330.43087-2-zhouchengming@bytedance.com \
--to=zhouchengming@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox