diff options
author | Jeff Trawick <trawick@apache.org> | 2015-04-05 11:50:45 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2015-04-05 11:50:45 +0000 |
commit | dfdce0417001cc18fb653c53c0d003e389498ada (patch) | |
tree | e79c5c27241c5c800b6cb7893a5df06a34ea19b3 /test/testprocmutex.c | |
parent | 26b451a3a36f9b2ed3bbc287ac8bd3fb8e5c3ab0 (diff) | |
download | apr-dfdce0417001cc18fb653c53c0d003e389498ada.tar.gz |
Fix build on non-Unix.
This test was never implemented if !APR_HAS_FORK, but the
capability check was error prone.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1671386 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testprocmutex.c')
-rw-r--r-- | test/testprocmutex.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/testprocmutex.c b/test/testprocmutex.c index f2992de9e..ba19b9897 100644 --- a/test/testprocmutex.c +++ b/test/testprocmutex.c @@ -196,11 +196,9 @@ static void test_exclusive(abts_case *tc, const char *lockname, *x == MAX_COUNTER); } } -#endif static void proc_mutex(abts_case *tc, void *data) { -#if APR_HAS_FORK apr_status_t rv; const char *shmname = "tpm.shm"; apr_shm_t *shm; @@ -220,9 +218,6 @@ static void proc_mutex(abts_case *tc, void *data) test_exclusive(tc, NULL, data); rv = apr_shm_destroy(shm); APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv); -#else - ABTS_NOT_IMPL(tc, "APR lacks fork() support"); -#endif } @@ -255,3 +250,18 @@ abts_suite *testprocmutex(abts_suite *suite) } return suite; } + +#else /* APR_HAS_FORK */ + +static void proc_mutex(abts_case *tc, void *data) +{ + ABTS_NOT_IMPL(tc, "APR lacks fork() support"); +} + +abts_suite *testprocmutex(abts_suite *suite) +{ + suite = ADD_SUITE(suite); + abts_run_test(suite, proc_mutex, NULL); + return suite; +} +#endif /* APR_HAS_FORK */ |