On Minix 3.3, which has no multithreading, the test-lock reports: Skipping test: multithreading not enabled but the test-rwlock1 fails with Unexpected outcome 3
This patch fixes it. 2019-12-15 Bruno Haible <br...@clisp.org> lock tests: Skip test when no multithreading is enabled. * tests/test-rwlock1.c: Skip the test when no multithreading is enabled. diff --git a/tests/test-rwlock1.c b/tests/test-rwlock1.c index 097a60f..ca87fea 100644 --- a/tests/test-rwlock1.c +++ b/tests/test-rwlock1.c @@ -21,6 +21,8 @@ #include <config.h> +#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS + #include "glthread/lock.h" #include <errno.h> @@ -151,3 +153,18 @@ main () sleep (1); } } + +#else + +/* No multithreading available. */ + +#include <stdio.h> + +int +main () +{ + fputs ("Skipping test: multithreading not enabled\n", stderr); + return 77; +} + +#endif