From: Shuah Khan <skhan@linuxfoundation.org>
To: Yu Liao <liaoyu15@huawei.com>, shuah@kernel.org
Cc: liwei391@huawei.com, Jason@zx2c4.com,
christophe.leroy@csgroup.eu, broonie@kernel.org,
linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom
Date: Thu, 19 Sep 2024 10:51:50 -0600 [thread overview]
Message-ID: <20ef1a1d-db00-44a7-a550-0b293d6e0d0e@linuxfoundation.org> (raw)
In-Reply-To: <20240919111841.20226-1-liaoyu15@huawei.com>
On 9/19/24 05:18, Yu Liao wrote:
> When building selftests/vDSO:
> $ make -C tools/testing/selftests TARGETS=vDSO
> I hit the following compilation error:
>
> vdso_test_getrandom.c:260:17: error: 'CLONE_NEWTIME' undeclared
> (first use in this function); did you mean 'CLONE_NEWIPC'?
> 260 | assert(unshare(CLONE_NEWTIME) == 0);
> | ^~~~~~~~~~~~~
>
> CLONE_NEWTIME is defined in linux/sched.h, so fix this by including
> <linux/sched.h>.
>
> Fixes: 2aec90036dcd ("selftests: vDSO: ensure vgetrandom works in a time namespace")
> Signed-off-by: Yu Liao <liaoyu15@huawei.com>
> ---
> tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> index 72a1d9b43a84..84f2bbb2d5e0 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
> @@ -19,6 +19,7 @@
> #include <sys/ptrace.h>
> #include <sys/wait.h>
> #include <sys/types.h>
> +#include <linux/sched.h>
> #include <linux/random.h>
> #include <linux/compiler.h>
> #include <linux/ptrace.h>
Do you see this error after installing headers? Installing headers is
a dependency to be able to compile selftests.
thanks,
-- Shuah
next prev parent reply other threads:[~2024-09-19 16:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-19 11:18 [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom Yu Liao
2024-09-19 16:51 ` Shuah Khan [this message]
2024-09-20 1:54 ` Yu Liao
2024-09-20 9:33 ` Christophe Leroy
2024-09-20 15:31 ` Jason A. Donenfeld
2024-09-23 15:30 ` Shuah Khan
2024-09-24 2:57 ` Yu Liao
2024-10-03 22:21 ` Shuah Khan
2024-10-08 2:50 ` Yu Liao
-- strict thread matches above, loose matches on Subject: below --
2024-10-02 15:28 [PATCH] selftests/vdso: Add linux/sched.h to fix CLONE_NEWTIME build error SurajSonawane2415
2024-10-03 11:52 ` [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom SurajSonawane2415
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=20ef1a1d-db00-44a7-a550-0b293d6e0d0e@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=Jason@zx2c4.com \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=liaoyu15@huawei.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=liwei391@huawei.com \
--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