Branch
Hash :
8c5f6314
Author :
Date :
2023-11-10T19:01:40
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.
Files:
tests/test-asyncsafe-spin1.c
tests/test-asyncsafe-spin2.c
tests/atomic-int-gnulib.h
m4/semaphore.m4
Depends-on:
thread
lock
yield
random
configure.ac:
AC_CHECK_HEADERS_ONCE([semaphore.h])
AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gl_SEMAPHORE])
Makefile.am:
TESTS += test-asyncsafe-spin1 test-asyncsafe-spin2
check_PROGRAMS += test-asyncsafe-spin1 test-asyncsafe-spin2
test_asyncsafe_spin2_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ @LIB_SEMAPHORE@