summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-07-01 23:00:44 +0200
committerBruno Haible <bruno@clisp.org>2020-07-01 23:00:44 +0200
commita0b286c0a5d50f2b52692f61f09e4500bcd98ebe (patch)
tree13131989e197910255b9284e66bc12543dc59104 /modules
parent79db2daddd96952239a77b74ebea9d40ccd5878b (diff)
downloadgnulib-a0b286c0a5d50f2b52692f61f09e4500bcd98ebe.tar.gz
asyncsafe-spin: Add tests.
* tests/test-asyncsafe-spin1.c: New file. * tests/test-asyncsafe-spin2.c: New file, based on tests/test-lock.c and tests/test-pthread-spin.c. * modules/asyncsafe-spin-tests: New file.
Diffstat (limited to 'modules')
-rw-r--r--modules/asyncsafe-spin-tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/asyncsafe-spin-tests b/modules/asyncsafe-spin-tests
new file mode 100644
index 0000000000..301c2afc1a
--- /dev/null
+++ b/modules/asyncsafe-spin-tests
@@ -0,0 +1,20 @@
+Files:
+tests/test-asyncsafe-spin1.c
+tests/test-asyncsafe-spin2.c
+tests/atomic-int-gnulib.h
+m4/semaphore.m4
+
+Depends-on:
+thread
+lock
+yield
+
+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@