selftests: futex: Add futex compare requeue test
authorAndré Almeida <andrealmeid@collabora.com>
Mon, 31 May 2021 16:50:36 +0000 (13:50 -0300)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 22 Jun 2021 09:20:16 +0000 (11:20 +0200)
commit7cb5dd8e2c8ce2b8f778f37cfd8bb955d663d16d
treee42d7371ee9a50d5f514134df2806626c3e26d99
parentc3d128581f64a9b3729e697a63760ff0a2c4a8fe
selftests: futex: Add futex compare requeue test

Add testing for futex_cmp_requeue(). The first test just requeues from one
waiter to another one, and wakes it. The second performs both wake and
requeue, and checks the return values to see if the operation woke/requeued
the expected number of waiters.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Link: https://lore.kernel.org/r/20210531165036.41468-3-andrealmeid@collabora.com
tools/testing/selftests/futex/functional/.gitignore
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/futex/functional/futex_requeue.c [new file with mode: 0644]
tools/testing/selftests/futex/functional/run.sh