From commits-return-6996-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Tue Sep 13 02:46:04 2005 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 22383 invoked from network); 13 Sep 2005 02:46:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Sep 2005 02:46:04 -0000 Received: (qmail 2963 invoked by uid 500); 13 Sep 2005 02:46:03 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 2941 invoked by uid 500); 13 Sep 2005 02:46:03 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 2928 invoked by uid 99); 13 Sep 2005 02:46:03 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 12 Sep 2005 19:46:03 -0700 Received: (qmail 22375 invoked by uid 65534); 13 Sep 2005 02:46:03 -0000 Message-ID: <20050913024603.22374.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r280464 - /apr/apr/branches/1.2.x/test/testdso.c Date: Tue, 13 Sep 2005 02:46:02 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: wrowe Date: Mon Sep 12 19:45:58 2005 New Revision: 280464 URL: http://svn.apache.org/viewcvs?rev=280464&view=rev Log: Backport: commit 280463 First; on Win32, the convention is .dll. Secondly, once we determine that it's not possible to invoke the dereferenced function, skip it. Modified: apr/apr/branches/1.2.x/test/testdso.c Modified: apr/apr/branches/1.2.x/test/testdso.c URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testdso.c?rev=280464&r1=280463&r2=280464&view=diff ============================================================================== --- apr/apr/branches/1.2.x/test/testdso.c (original) +++ apr/apr/branches/1.2.x/test/testdso.c Mon Sep 12 19:45:58 2005 @@ -30,8 +30,10 @@ #ifdef NETWARE # define MOD_NAME "mod_test.nlm" -#elif defined(BEOS) || defined(WIN32) +#elif defined(BEOS) # define MOD_NAME "mod_test.so" +#elif defined(WIN32) +# define MOD_NAME "mod_test.dll" #elif defined(DARWIN) # define MOD_NAME ".libs/mod_test.so" # define LIB_NAME ".libs/libmod_test.dylib" @@ -78,9 +80,11 @@ ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status); ABTS_PTR_NOTNULL(tc, func1); - function = (void (*)(char *))func1; - (*function)(teststr); - ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr); + if (!tc->failed) { + function = (void (*)(char *))func1; + (*function)(teststr); + ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr); + } apr_dso_unload(h); } @@ -101,9 +105,11 @@ ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status); ABTS_PTR_NOTNULL(tc, func1); - function = (int (*)(int))func1; - status = (*function)(5); - ABTS_INT_EQUAL(tc, 5, status); + if (!tc->failed) { + function = (int (*)(int))func1; + status = (*function)(5); + ABTS_INT_EQUAL(tc, 5, status); + } apr_dso_unload(h); } @@ -160,9 +166,11 @@ ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status); ABTS_PTR_NOTNULL(tc, func1); - function = (void (*)(char *))func1; - (*function)(teststr); - ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr); + if (!tc->failed) { + function = (void (*)(char *))func1; + (*function)(teststr); + ABTS_STR_EQUAL(tc, "Hello - I'm a DSO!\n", teststr); + } apr_dso_unload(h); } @@ -183,9 +191,11 @@ ABTS_ASSERT(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status); ABTS_PTR_NOTNULL(tc, func1); - function = (int (*)(int))func1; - status = (*function)(5); - ABTS_INT_EQUAL(tc, 5, status); + if (!tc->failed) { + function = (int (*)(int))func1; + status = (*function)(5); + ABTS_INT_EQUAL(tc, 5, status); + } apr_dso_unload(h); }