perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject can't deal with ithreads, need Test::More
Date Sat, 26 Mar 2005 17:19:51 GMT
As we start adding tests running in ithreads, we no longer can use, which can't deal with the test counter. when several threads 
print 'ok 1' we get:

ok 136
Test output counter mismatch [test 277]

since in each thread,'s counter has a different value.

Test::More has it right (via Test::Builder). So one possibility is for mp2 
test suite to switch to Test::More. The problems with that approach is:

1) syntax of ok and skip aren't 100% compatible between Test::More and 
Test (but we can deal with that by adjusting our tests where needed).

Prototype mismatch: sub Apache::Test::ok ($;$$) vs ($;$) at 
/home/stas/ line 75
Prototype mismatch: sub Apache::Test::skip ($;$$$) vs none at 
/home/stas/ line 75

2) Test::More relies on Test::Builder, I see that some important fixes due 
to which we have to switch to T-M require Test-Builder 0.47 (Aug 2002), 
but looking up the changes list, it seems that many more ithreads related 
bugs were fixed in the very recent versions. So it's possible that we need 
at least 0.51 Nov 2004). That means that the test suite now will require a 
prerequisite which most people won't have, making the source build out of 
box w/o fetching some requirements impossible. And skipping those tests 
would suck, since we really need those threads things to be tested.

Another possibility is to try to hack and possible override 
things, but it's not a good idea, since it will make things too fragile if internals change later on.

A related issue: A-T's -withtestmore breaks the importing mechanism. It's 
no longer possible to load A-T w/o importing all the symbols, i.e.:

use Apache::Test (-withtestmore);

forces the import of all. It probably should be moved to Apache::TestMore 

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message