]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/futex: Create test for robust list
authorAndré Almeida <andrealmeid@igalia.com>
Mon, 10 Nov 2025 22:41:30 +0000 (19:41 -0300)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 14 Nov 2025 13:39:37 +0000 (14:39 +0100)
commitcd91b502f1b4bb81e82fbae38678c698ee5ac026
tree9b7d820c11b26db2f8d42ad1bc252933a3bd6ffb
parent275498b88104b36a0f7f913da53dc81c1daed277
selftests/futex: Create test for robust list

Create a test for the robust list mechanism. Test the following uAPI
operations:

- Creating a robust mutex where the lock waiter is wake by the kernel
  when the lock owner died
- Setting a robust list to the current task
- Getting a robust list from the current task
- Getting a robust list from another task
- Using the list_op_pending field from robust_list_head struct to test
  robustness when the lock owner dies before completing the locking
- Setting a invalid size for syscall argument `len`
- Adding multiple elements to a robust list wait waiting for each of
  them
- Creating a circular list and checking that the kernel does not get
  stuck in an infinity loop

Signed-off-by: André Almeida <andrealmeid@igalia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251110224130.3044761-1-andrealmeid@igalia.com
tools/testing/selftests/futex/functional/.gitignore
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/futex/functional/robust_list.c [new file with mode: 0644]