diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2007-11-06 03:35:16 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2007-11-06 03:35:16 +0000 |
commit | 6d4deb4eff8beaf55399d72c0f68476049b697da (patch) | |
tree | ce97938b2b8c3de56578c82efde5959793d6fd9b | |
parent | 84d03e308ac337a3ad67e8cbaa7ae66a9fc1045b (diff) | |
download | apr-6d4deb4eff8beaf55399d72c0f68476049b697da.tar.gz |
The test for remove should actually be verifying that
we can no longer attach to a now-removed shm resource.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@592245 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | test/testshm.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/testshm.c b/test/testshm.c index 5e724005c..d15e72474 100644 --- a/test/testshm.c +++ b/test/testshm.c @@ -232,18 +232,14 @@ static void test_named_remove(abts_case *tc, void *data) } ABTS_PTR_NOTNULL(tc, shm); - rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p); - APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv); - if (rv != APR_SUCCESS) { - return; - } - ABTS_PTR_NOTNULL(tc, shm); - rv = apr_shm_destroy(shm); APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv); rv = apr_shm_remove(SHARED_FILENAME, p); APR_ASSERT_SUCCESS(tc, "Error removing shared memory block", rv); + + rv = apr_shm_attach(&shm, SHARED_FILENAME, p); + ABTS_TRUE(tc, rv != 0); } #endif |