[LTP] [PATCH] eventfd06: add AIO support check

Cyril Hrubis chrubis@suse.cz
Tue Jan 21 17:14:15 CET 2025


Hi!
> Just like what we did for io_setup01.c to avoid ENOSYS error:
>   eventfd06.c:140: TBROK: io_setup() failed: ENOSYS
> 
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/kernel/syscalls/eventfd/eventfd06.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/eventfd/eventfd06.c b/testcases/kernel/syscalls/eventfd/eventfd06.c
> index 7339dd471..46d7f73d3 100644
> --- a/testcases/kernel/syscalls/eventfd/eventfd06.c
> +++ b/testcases/kernel/syscalls/eventfd/eventfd06.c
> @@ -136,6 +136,8 @@ static void test_poll(void)
>  static void setup(void)
>  {
>  	TEST(io_setup(MAXEVENTS, &ctx));
> +	if (TST_RET == -ENOSYS)
> +		tst_brk(TCONF | TRERRNO, "io_setup(): AIO not supported by kernel");
>  	if (TST_RET < 0)
>  		tst_brk(TBROK, "io_setup() failed: %s", tst_strerrno(-TST_RET));
>  

Alternatively we can add CONFIG_AIO to the needs_kconfigs but anyways:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list