From: Shuah Khan <skhan@linuxfoundation.org>
To: Chengming Zhou <zhouchengming@bytedance.com>,
akpm@linux-foundation.org, shuah@kernel.org
Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 2/2] kselftest/vm: fix tests build with old libc
Date: Thu, 3 Mar 2022 14:27:41 -0700 [thread overview]
Message-ID: <ed6cc632-8209-0afe-fdff-ee179610d73d@linuxfoundation.org> (raw)
In-Reply-To: <20220227055330.43087-2-zhouchengming@bytedance.com>
On 2/26/22 10:53 PM, Chengming Zhou wrote:
> 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>
>
Looks good to me.
Andrew,
If you want to take this through your tree or I can apply it.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
next prev parent reply other threads:[~2022-03-03 21:27 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 ` [PATCH 2/2] kselftest/vm: fix tests build with old libc Chengming Zhou
2022-03-03 21:27 ` Shuah Khan [this message]
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=ed6cc632-8209-0afe-fdff-ee179610d73d@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--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 \
--cc=zhouchengming@bytedance.com \
/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;
as well as URLs for NNTP newsgroup(s).