Revert 1790047 (r1790045 from trunk), was
Follow up to r1667900: don't fail test{proc,global}mutex if
APR_LOCK_DEFAULT_TIMED is not implemented (e.g. MacOS).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1796071 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/testglobalmutex.c b/test/testglobalmutex.c
index c79884c..7340e25 100644
--- a/test/testglobalmutex.c
+++ b/test/testglobalmutex.c
@@ -84,11 +84,6 @@
abts_log_message(mutexname(mech));
rv = apr_global_mutex_create(&global_lock, LOCKNAME, mech, p);
- if (rv == APR_ENOTIMPL) {
- /* MacOS lacks TIMED implementation, so don't fail for ENOTIMPL */
- ABTS_NOT_IMPL(tc, "global mutex TIMED not implemented");
- return;
- }
APR_ASSERT_SUCCESS(tc, "Error creating mutex", rv);
launch_child(tc, mech, &p1, p);
diff --git a/test/testprocmutex.c b/test/testprocmutex.c
index 599d585..ba19b98 100644
--- a/test/testprocmutex.c
+++ b/test/testprocmutex.c
@@ -130,12 +130,14 @@
int n;
rv = apr_proc_mutex_create(&proc_lock, lockname, mech->num, p);
- if (rv == APR_ENOTIMPL) {
- /* MacOS lacks TIMED implementation, so don't fail for ENOTIMPL */
- fprintf(stderr, "method %s not implemented, ", mech->name);
+ APR_ASSERT_SUCCESS(tc, "create the mutex", rv);
+ if (rv != APR_SUCCESS) {
+ fprintf(stderr, "%s not implemented, ", mech->name);
+ ABTS_ASSERT(tc, "Default timed not implemented",
+ mech->num != APR_LOCK_DEFAULT &&
+ mech->num != APR_LOCK_DEFAULT_TIMED);
return;
}
- APR_ASSERT_SUCCESS(tc, "create the mutex", rv);
for (n = 0; n < CHILDREN; n++)
make_child(tc, 0, &child[n], p);