-garrett
If testall is killed at just the wrong time you can leave a shared memory segment on the machine and all subsequent runs of the test will fail. To avoid this problem we now proactively remove named shared memory segments before trying to create them.
* test/testshm.c
(test_named): remove shm segment for SHARED_FILENAME before creating it.
(test_named_remove): ditto.
Index: test/testshm.c
===================================================================
--- test/testshm.c (revision 65537)
+++ test/testshm.c (working copy)
@@ -166,6 +166,8 @@
apr_exit_why_e why;
const char *args[4];
+ apr_shm_remove(SHARED_FILENAME, p);
+
rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
if (rv != APR_SUCCESS) {
@@ -220,6 +222,8 @@
apr_status_t rv;
apr_shm_t *shm;
+ apr_shm_remove(SHARED_FILENAME, p);
+
rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
if (rv != APR_SUCCESS) {
