[LTP] [PATCH v2] futex_waitv01: Add test verifies EINVAL for invalid nr_futexes

Richard Palethorpe rpalethorpe@suse.de
Tue Apr 12 13:53:30 CEST 2022


Hello Zhao,

Zhao Gongyi via ltp <ltp@lists.linux.it> writes:

> Add test verifies EINVAL for invalid nr_futexes according to
> https://www.kernel.org/doc/html/latest/userspace-api/futex2.html.
>
> Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> ---
> v1->v2: Check also lower bound that suggested by Andrea Cervesato
>
>  testcases/kernel/syscalls/futex/futex_waitv01.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/futex/futex_waitv01.c b/testcases/kernel/syscalls/futex/futex_waitv01.c
> index 601fee8df..721852750 100644
> --- a/testcases/kernel/syscalls/futex/futex_waitv01.c
> +++ b/testcases/kernel/syscalls/futex/futex_waitv01.c
> @@ -98,6 +98,19 @@ static void test_invalid_clockid(void)
>  		     "futex_waitv invalid clockid");
>  }
>
> +static void test_invalid_nr_futex(void)
> +{
> +	struct timespec to;

Space required here (run `make check-<test_name>`).

Pushed with correction, thanks!

-- 
Thank you,
Richard.


More information about the ltp mailing list