apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r592246 - /apr/apr/branches/1.2.x/test/testshm.c
Date Tue, 06 Nov 2007 03:35:38 GMT
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



Mime
View raw message