[LTP] [PATCH] syscalls/epoll_create: Replace syscall to libc

Jan Stancek jstancek@redhat.com
Fri Oct 29 09:49:28 CEST 2021


On Thu, Oct 28, 2021 at 5:13 AM Zhao Gongyi <zhaogongyi@huawei.com> wrote:
>
> For epoll_create01.c/epoll_create02.c, we should replace syscall to libc
> or the testcase will fail because of Syscall epoll_create is not support
> in some arches.
>
> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>

Acked-by: Jan Stancek <jstancek@redhat.com>

> ---
>  testcases/kernel/syscalls/epoll_create/epoll_create01.c | 2 +-
>  testcases/kernel/syscalls/epoll_create/epoll_create02.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/epoll_create/epoll_create01.c b/testcases/kernel/syscalls/epoll_create/epoll_create01.c
> index 3ef5b5cac..b6ebe9ad7 100644
> --- a/testcases/kernel/syscalls/epoll_create/epoll_create01.c
> +++ b/testcases/kernel/syscalls/epoll_create/epoll_create01.c
> @@ -24,7 +24,7 @@ static int tc[] = {1, INT_MAX};
>
>  static void run(unsigned int n)
>  {
> -       TST_EXP_FD(tst_syscall(__NR_epoll_create, tc[n]), "epoll_create(%d)", tc[n]);
> +       TST_EXP_FD(epoll_create(tc[n]), "epoll_create(%d)", tc[n]);
>
>         if (!TST_PASS)
>                 return;
> diff --git a/testcases/kernel/syscalls/epoll_create/epoll_create02.c b/testcases/kernel/syscalls/epoll_create/epoll_create02.c
> index c59ea7944..e96228983 100644
> --- a/testcases/kernel/syscalls/epoll_create/epoll_create02.c
> +++ b/testcases/kernel/syscalls/epoll_create/epoll_create02.c
> @@ -27,7 +27,7 @@ static struct test_case_t {
>
>  static void run(unsigned int n)
>  {
> -       TST_EXP_FAIL(tst_syscall(__NR_epoll_create, tc[n].size),
> +       TST_EXP_FAIL(epoll_create(tc[n].size),
>                      tc[n].exp_err, "create(%d)", tc[n].size);
>  }
>
> --
> 2.17.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>



More information about the ltp mailing list