summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-11-06 03:35:38 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-11-06 03:35:38 +0000
commit8bddba3b43a126487a7dcd7a731bfdf0594ae89f (patch)
tree8cb61d2f1300af21be81776216df6813e57e1772
parentcffb4d411b2d8994efff96275fa1faebb7bae810 (diff)
downloadapr-8bddba3b43a126487a7dcd7a731bfdf0594ae89f.tar.gz
The test for remove should actually be verifying that
we can no longer attach to a now-removed shm resource. Backport: r592245 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@592246 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testshm.c10
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