apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@apache.org>
Subject Re: cvs commit: apr/test testatomic.c
Date Sun, 29 Dec 2002 23:28:23 GMT
At 05:03 PM 12/29/2002, rbb@apache.org wrote:

>On 29 Dec 2002 wrowe@apache.org wrote:
>
>> wrowe       2002/12/29 14:45:12
>>
>>   Modified:    test     testatomic.c
>>   Log:
>>     No pthread_setconcurrency here on Darwin.
>>
>>   Revision  Changes    Path
>>   1.22      +1 -1      apr/test/testatomic.c
>>
>>   Index: testatomic.c
>>   ===================================================================
>>   RCS file: /home/cvs/apr/test/testatomic.c,v
>>   retrieving revision 1.21
>>   retrieving revision 1.22
>>   diff -u -r1.21 -r1.22
>>   --- testatomic.c    6 Dec 2002 17:19:17 -0000       1.21
>>   +++ testatomic.c    29 Dec 2002 22:45:12 -0000      1.22
>>   @@ -265,7 +265,7 @@
>>        }
>>
>>        printf("APR Atomic Test\n===============\n\n");
>>   -#if !(defined WIN32) && !(defined NETWARE) && !(defined __MVS__)
>>   +#if !(defined WIN32) && !(defined NETWARE) && !(defined __MVS__)
&& !(defined DARWIN)
>>        pthread_setconcurrency(8);
>>    #endif
>>        printf("%-60s", "Initializing the context");
>
>This highlights another problem with our test suite.  We can't have
>platform checks in our tests.  Having these checks completely invalidates
>the usefulness of APR.  These kinds of checks are the biggest reason that
>I haven't migrated testatomic to the new suite.  I haven't had the time to
>figure out exactly what is going on yet.

How is this a problem in the test suite?  We are attempting to use a platform
specific facility.  Look at the undefined getcwd() calls scattered throughout
because the author didn't #include the right platform-includes?

I suspect we will need to use the internal apr_private.h includes to resolve
the configuration.  You are trying to look into APR using platform-specific
facilities.  Unless apr will test apr, that problem will always exist.  We all
agree that non-apr platform calls (posix, win32 api, or whatever) should
validate apr calls, because we should never trust ourselves enough to
use our own results to validate our behavior.

I think, therefore I am; ergo, I am, therefore I think.

This handmade desk organizer given by my brother is definitely
not thinking about much.  Doesn't even complain that my desk 
is still disorganized :-)

Don't fret about per-platform choices in the test suite, it's a natural
byproduct of really validating the results from apr_fn() families.

Bill


Mime
View raw message