]> Savannah Git Hosting - gnulib.git/commit
tests: In multithreaded tests, use random() instead of rand().
authorBruno Haible <bruno@clisp.org>
Fri, 10 Nov 2023 18:01:40 +0000 (19:01 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 24 Nov 2023 07:27:42 +0000 (08:27 +0100)
commit6545a040af554f325c0cd63779a46f3f37222541
tree0195f3bb5243f947293d9ab5f4dae410107002f4
parent0b170bae41b2dcd5eeabc09628ce0f3cc5817e6f
tests: In multithreaded tests, use random() instead of rand().

* tests/test-asyncsafe-spin2.c (random_account, lock_mutator_thread):
Use random() instead of rand().
* tests/test-lock.c (random_account, lock_mutator_thread,
rwlock_mutator_thread, recshuffle): Likewise.
* tests/test-mtx.c (random_account, lock_mutator_thread, recshuffle):
Likewise.
* tests/test-pthread-mutex.c (random_account, lock_mutator_thread,
recshuffle): Likewise.
* tests/test-pthread-rwlock.c (random_account, rwlock_mutator_thread):
Likewise.
* tests/test-pthread-spin.c (random_account, lock_mutator_thread):
Likewise.
* tests/test-pthread-tss.c (perhaps_yield, worker_thread,
racecheck_thread): Likewise.
* tests/test-thread_local.c (perhaps_yield, worker_thread): Likewise.
* tests/test-tls.c (perhaps_yield, worker_thread, racecheck_thread):
Likewise.
* tests/test-tss.c (perhaps_yield, worker_thread, racecheck_thread):
Likewise.
* asyncsafe-spin-tests (Depends-on): Add random.
* lock-tests (Depends-on): Likewise.
* mtx-tests (Depends-on): Likewise.
* pthread-mutex-tests (Depends-on): Likewise.
* pthread-rwlock-tests (Depends-on): Likewise.
* pthread-spin-tests (Depends-on): Likewise.
* pthread-tss-tests (Depends-on): Likewise.
* threads-h-tests (Depends-on): Likewise.
* tls-tests (Depends-on): Likewise.
* tss-tests (Depends-on): Likewise.
21 files changed:
ChangeLog
modules/asyncsafe-spin-tests
modules/lock-tests
modules/mtx-tests
modules/pthread-mutex-tests
modules/pthread-rwlock-tests
modules/pthread-spin-tests
modules/pthread-tss-tests
modules/threads-h-tests
modules/tls-tests
modules/tss-tests
tests/test-asyncsafe-spin2.c
tests/test-lock.c
tests/test-mtx.c
tests/test-pthread-mutex.c
tests/test-pthread-rwlock.c
tests/test-pthread-spin.c
tests/test-pthread-tss.c
tests/test-thread_local.c
tests/test-tls.c
tests/test-tss.c