selftests: ntsync: Add a stress test for contended waits.
authorElizabeth Figura <zfigura@codeweavers.com>
Fri, 13 Dec 2024 19:35:08 +0000 (13:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2025 12:18:12 +0000 (13:18 +0100)
commita22860e57b54e9b55028243764f7899fe7c4ae4b
treea5a5e1187f0f57f9b7f6a024fbcf736d3068b9fb
parentc52b9cb13fd1bd03199c3e5c58c5b7fcaa82d459
selftests: ntsync: Add a stress test for contended waits.

Test a more realistic usage pattern, and one with heavy contention, in order to
actually exercise ntsync's internal synchronization.

This test has several threads in a tight loop acquiring a mutex, modifying some
shared data, and then releasing the mutex. At the end we check if the data is
consistent.

Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com>
Link: https://lore.kernel.org/r/20241213193511.457338-28-zfigura@codeweavers.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/drivers/ntsync/ntsync.c