apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r592254 - /apr/apr/branches/1.2.x/test/testshm.c
Date Tue, 06 Nov 2007 03:50:05 GMT
Author: wrowe
Date: Mon Nov  5 19:50:04 2007
New Revision: 592254

URL: http://svn.apache.org/viewvc?rev=592254&view=rev
Log:
Back out the last two patches, about to use an entirely different
approach and document the anticipated behavior in apr_shm_remove.

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=592254&r1=592253&r2=592254&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:50:04 2007
@@ -232,14 +232,21 @@
     }
     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);
+    if (rv != APR_SUCCESS) {
+        return ;
+    }
 
-    rv = apr_shm_attach(&shm, SHARED_FILENAME, p);
-    ABTS_TRUE(tc, rv != 0);
+    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);
 }
 
 #endif



Mime
View raw message