linux-stable/tools/testing/selftests/futex/functional
Nysal Jan K.A fbf4dec702 selftests/futex: Order calls to futex_lock_pi
Observed occassional failures in the futex_wait_timeout test:

ok 1 futex_wait relative succeeds
ok 2 futex_wait_bitset realtime succeeds
ok 3 futex_wait_bitset monotonic succeeds
ok 4 futex_wait_requeue_pi realtime succeeds
ok 5 futex_wait_requeue_pi monotonic succeeds
not ok 6 futex_lock_pi realtime returned 0
......

The test expects the child thread to complete some steps before
the parent thread gets to run. There is an implicit expectation
of the order of invocation of futex_lock_pi between the child thread
and the parent thread. Make this order explicit. If the order is
not met, the futex_lock_pi call in the parent thread succeeds and
will not timeout.

Fixes: f4addd54b1 ("selftests: futex: Expand timeout test")
Signed-off-by: Nysal Jan K.A <nysal@linux.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-08-16 10:48:10 -06:00
..
.gitignore selftests: futex: Add sys_futex_waitv() test 2021-10-07 13:51:12 +02:00
futex_requeue.c selftests: futex: Add futex compare requeue test 2021-06-22 11:20:16 +02:00
futex_requeue_pi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
futex_requeue_pi_mismatched_ops.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
futex_requeue_pi_signal_restart.c selftests: futex: Fix 'the the' typo in comment 2022-08-02 21:57:03 +02:00
futex_wait.c selftests: futex: Add futex wait test 2021-06-22 11:20:15 +02:00
futex_wait_private_mapped_file.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
futex_wait_timeout.c selftests/futex: Order calls to futex_lock_pi 2023-08-16 10:48:10 -06:00
futex_wait_uninitialized_heap.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
futex_wait_wouldblock.c selftests: futex: Test sys_futex_waitv() wouldblock 2021-10-07 13:51:12 +02:00
futex_waitv.c selftests: futex: Add sys_futex_waitv() test 2021-10-07 13:51:12 +02:00
Makefile selftests: futex: Fix incorrect kernel headers search path 2023-02-13 09:09:44 -07:00
run.sh selftests: futex: Add sys_futex_waitv() test 2021-10-07 13:51:12 +02:00