You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/11/06 04:35:38 UTC
svn commit: r592246 - /apr/apr/branches/1.2.x/test/testshm.c
Author: wrowe
Date: Mon Nov 5 19:35:38 2007
New Revision: 592246
URL: http://svn.apache.org/viewvc?rev=592246&view=rev
Log:
The test for remove should actually be verifying that
we can no longer attach to a now-removed shm resource.
Backport: r592245
Modified:
apr/apr/branches/1.2.x/test/testshm.c
Modified: apr/apr/branches/1.2.x/test/testshm.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testshm.c?rev=592246&r1=592245&r2=592246&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testshm.c (original)
+++ apr/apr/branches/1.2.x/test/testshm.c Mon Nov 5 19:35:38 2007
@@ -232,18 +232,14 @@
}
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