Add futex_waitv tests
PATCH v3 1/1 Add futex_waitv tests
Signed-off-by Andrea Cervesato <[email protected]>
---
In v3 fixed compiling after tst_syscall patch.
testcases/kernel/syscalls/futex/.gitignore | 3 + testcases/kernel/syscalls/futex/futex2test.h | 23 ++++ .../kernel/syscalls/futex/futex_waitv01.c | 121 ++++++++++++++++++ .../kernel/syscalls/futex/futex_waitv02.c | 95 ++++++++++++++ .../kernel/syscalls/futex/futex_waitv03.c | 108 ++++++++++++++++ 5 files changed, 350 insertions(+) create mode 100644 testcases/kernel/syscalls/futex/futex2test.h create mode 100644 testcases/kernel/syscalls/futex/futex_waitv01.c create mode 100644 testcases/kernel/syscalls/futex/futex_waitv02.c create mode 100644 testcases/kernel/syscalls/futex/futex_waitv03.c
testcases/kernel/syscalls/futex/.gitignore +3 -0
@@ -10,3 +10,6 @@ /futex_wake02 /futex_wake03 /futex_wake04 +/futex_waitv01 +/futex_waitv02 +/futex_waitv03
testcases/kernel/syscalls/futex/futex2test.h new file +23 -0
@@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Futex2 library addons for futex tests +* +* Copyright 2021 Collabora Ltd. +* Copyright (C) 2021 SUSE LLC Andrea Cervesato <[email protected]> +*/ +#include <stdint.h> +#include "lapi/syscalls.h" +#include "futextest.h" + +/** +* futex_waitv - Wait at multiple futexes, wake on any +* @waiters: Array of waiters +* @nr_waiters: Length of waiters array +* @flags: Operation flags +* @timo: Optional timeout for operation +*/ +static inline int futex_waitv (volatile struct futex_waitv *waiters,unsigned long nr_waiters, +unsigned long flags,struct timespec *timo,clockid_t clockid) +{ +return tst_syscall (__NR_futex_waitv, waiters, nr_waiters, flags, timo, clockid); +}
testcases/kernel/syscalls/futex/futex_waitv01.c new file +121 -0
121 lines not on this page · raw message
testcases/kernel/syscalls/futex/futex_waitv02.c new file +95 -0
95 lines not on this page · raw message
testcases/kernel/syscalls/futex/futex_waitv03.c new file +108 -0
108 lines not on this page · raw message
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
The same comments I send for v2 apply here as well.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp