summaryrefslogtreecommitdiff
path: root/test/testlock.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2002-04-11 22:55:41 +0000
committerJeff Trawick <trawick@apache.org>2002-04-11 22:55:41 +0000
commitc054cd38d75451613f26c8da5a82c9b17227c661 (patch)
tree65aebdf7e7a5cd50430694f8dd9879393099544f /test/testlock.c
parentace6f6c522fbd6b5289aa02b7a892df099203a35 (diff)
downloadapr-c054cd38d75451613f26c8da5a82c9b17227c661.tar.gz
allow the testlock program to continue on systems where read/write locks
aren't implemented (e.g., Darwin); there is still useful stuff to test git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63251 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testlock.c')
-rw-r--r--test/testlock.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/testlock.c b/test/testlock.c
index 2daddf4ab..30a225759 100644
--- a/test/testlock.c
+++ b/test/testlock.c
@@ -482,9 +482,15 @@ int main(int argc, const char * const *argv)
}
if ((rv = test_thread_rwlock()) != APR_SUCCESS) {
- fprintf(stderr,"thread_rwlock test failed : [%d] %s\n",
- rv, apr_strerror(rv, (char*)errmsg, 200));
- exit(-6);
+ if (rv == APR_ENOTIMPL) {
+ fprintf(stderr, "read/write locks aren't implemented on this "
+ "platform... skipping those tests...\n");
+ }
+ else {
+ fprintf(stderr,"thread_rwlock test failed : [%d] %s\n",
+ rv, apr_strerror(rv, (char*)errmsg, 200));
+ exit(-6);
+ }
}
if ((rv = test_cond()) != APR_SUCCESS) {