Re: [QUESTION] Some tests fail on Debian

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Thursday, January 27, 2011 20:44:57 Alexander Aparzev wrote:
> using Apache/2.2.9 (itk MPM)

Just a guess, has anyone ever tested itk-MPM?

However, perhaps it's only a matter of bad timing. pnotes2.t is one of mine, I
think. It looks as follows:

for my $i (1..12) {
    t_client_log_warn_is_expected();
    t_start_error_log_watch;
    $u="$url?$i"; $ok=GET_BODY $u;
    select undef, undef, undef, 0.2;  # give it time to write the logfile
    ok t_cmp scalar(grep {
        /pnotes are destroyed after cleanup passed/;
    } t_finish_error_log_watch), 1, $u;
}

You see the 200ms pause? Maybe that's too short for itk.

Try the following:

# clean the log
>t/logs/error_log

# run the test
t/TEST -verbose t/modperl/pnotes2.t

# now check the log and see if it contains 12 lines of 'pnotes are ...'
((12==$(grep 'pnotes are destroyed after cleanup passed' t/logs/error_log | wc -l))) && echo ok

The reason for the test is a bug in a former mp2 version where the refcount of
the pnotes hash might become wrong:

$ svn log -r584380 t/response/TestModperl/pnotes2.pm 
------------------------------------------------------------------------
r584380 | gozer | 2007-10-13 08:48:14 +0200 (Sat, 13 Oct 2007) | 8 lines

Don't increase the refcnt of the pnotes HV* twice, we
will leak it.

Submitted-By: Torsten Foertsch <[email protected]>
Message-Id: <[email protected]>
Reviewed-By: gozer

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.