[LTP] [PATCH] recvmsg01: Skip unsupported test

Li Wang liwang@redhat.com
Mon Sep 11 09:13:25 CEST 2023


On Sat, Sep 9, 2023 at 7:30 PM Takuya Wakazono <pastalian46@gmail.com>
wrote:

> Since it's already stated that MSQ_ERRQUEUE + SOCK_STREAM is not
> supported on kernels < 3.17, let's actually skip this test.
>
> Fixes: 7d365d72ba71 ("recvmsg01: Refactor using new LTP API")
> Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
> ---
>  testcases/kernel/syscalls/recvmsg/recvmsg01.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg01.c
> b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
> index 2576e1572..80c1b3aa9 100644
> --- a/testcases/kernel/syscalls/recvmsg/recvmsg01.c
> +++ b/testcases/kernel/syscalls/recvmsg/recvmsg01.c
> @@ -220,14 +220,14 @@ static void run(unsigned int n)
>         struct tcase *tc = &tcases[n];
>         int ret = tc->exp_errno ? -1 : 0;
>
> -       setup_all();
> -
>         if ((tst_kvercmp(3, 17, 0) < 0)
>                         && (tc->flags & MSG_ERRQUEUE)
>                         && (tc->type & SOCK_STREAM)) {
>                 tst_res(TCONF, "MSG_ERRQUEUE requires kernel >= 3.17");
> +               return;
>

It'd be better to use tst_brk TCONF rather than tst_res + return.

The rest looks good.
Reviewed-by: Li Wang <liwang@redhat.com>



>         }
>
> +       setup_all();
>         tc->setup(n);
>
>         iov[0].iov_base = tc->recv_buf;
> --
> 2.42.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang


More information about the ltp mailing list