Return-Path: Delivered-To: apmail-apr-cvs-archive@www.apache.org Received: (qmail 25996 invoked from network); 29 Jun 2004 17:16:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Jun 2004 17:16:34 -0000 Received: (qmail 11161 invoked by uid 500); 29 Jun 2004 17:16:33 -0000 Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 10985 invoked by uid 500); 29 Jun 2004 17:16:31 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 10911 invoked by uid 99); 29 Jun 2004 17:16:30 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Date: 29 Jun 2004 17:16:18 -0000 Message-ID: <20040629171618.25435.qmail@minotaur.apache.org> From: dreid@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/test testprocmutex.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N dreid 2004/06/29 10:16:18 Modified: test testprocmutex.c Log: Destroy the shared memory once the test finishes. Exit if we fail tests rather than pressing on. Revision Changes Path 1.22 +6 -1 apr/test/testprocmutex.c Index: testprocmutex.c =================================================================== RCS file: /home/cvs/apr/test/testprocmutex.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- testprocmutex.c 14 Jun 2004 09:09:05 -0000 1.21 +++ testprocmutex.c 29 Jun 2004 17:16:18 -0000 1.22 @@ -101,6 +101,8 @@ rv = apr_proc_mutex_create(&proc_lock, lockname, mech, p); APR_ASSERT_SUCCESS(tc, "create the mutex", rv); + if (rv != APR_SUCCESS) + return; for (n = 0; n < CHILDREN; n++) make_child(tc, &child[n], p); @@ -128,9 +130,13 @@ } APR_ASSERT_SUCCESS(tc, "create shm segment", rv); + if (rv != APR_SUCCESS) + return; x = apr_shm_baseaddr_get(shm); test_exclusive(tc, NULL, *mech); + rv = apr_shm_destroy(shm); + APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv); #else ABTS_NOT_IMPL(tc, "APR lacks fork() support"); #endif @@ -166,4 +172,3 @@ return suite; } -