Randy Kobes wrote:

>On Fri, 12 Dec 2003, Steve Hay wrote:
>
>  
>
>>I've just run the mp2 testsuite using the latest CVS version and got one
>>test failure:
>>
>>=====
>> >perl t/TEST -verbose apr/finfo.t
>>[...]
>># Running under perl version 5.008002 for MSWin32
>># Current time local: Fri Dec 12 17:36:14 2003
>># Current time GMT:   Fri Dec 12 17:36:14 2003
>># Using Test.pm version 1.24
>>[...]
>># testing : $r->finfo->atime()
>># expected: 1071249888
>># received: 1071250580
>>not ok 10
>>[...]
>>FAILED test 10
>>        Failed 1/17 tests, 94.12% okay (less 6 skipped tests: 10 okay,
>>58.82%)
>>Failed Test Stat Wstat Total Fail  Failed  List of Failed
>>-------------------------------------------------------------------------------
>>apr/finfo.t               17    1   5.88%  10
>>6 subtests skipped.
>>=====
>>
>>Nothing relevant appears in the error log.
>>
>>Versions: WinXP, MSVC6, perl-5.8.2, apache-2.0.48, mod_perl-cvs
>>    
>>
>
>I've just tried it too, with the latest mp2 cvs, and don't
>see this failure ... Does it still fail? The only difference
>between my system and yours is I'm using the perl-5.8.1
>sources of ActivePerl build 807 - could this make a
>difference?
>  
>
I just retested with the cvs version that I grabbed last Friday and 
found that it worked, but only once: thereafter it fails again!

More testing shows that if I "touch" the file that it is stat()'ing 
(t/htdocs/index.html) to give it file times of >1 hour ago then the 
offending test works, but any repeat tests immediately after that fail 
again:

C:\Temp\modperl-2.0>\cygwin\bin\touch 12151545 t/htdocs/index.html
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[OK]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
...
C:\Temp\modperl-2.0>\cygwin\bin\touch 12151545 t/htdocs/index.html
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[OK]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
C:\Temp\modperl-2.0>perl t/TEST -verbose apr/finfo.t
[Fails test 10]
...

Bizarre!  Do you observe this behaviour?  If not, then I'll give 
ActivePerl 807 a try myself.

I get the same thing happening with the latest cvs which I've just 
grabbed (with your patch for modperl_mgv.c).

An obvious "fix" is to utime() the file in question to set the file 
times to >1 hour ago:

=====
--- t/response/TestAPR/finfo.pm.orig    2003-12-01 19:16:51.000000000 +0000
+++ t/response/TestAPR/finfo.pm    2003-12-15 16:52:38.000161500 +0000
@@ -42,6 +42,10 @@
 
     my $file = Apache->server_root_relative(catfile qw(htdocs index.html));
 
+    # make the file times >1 hour ago so that the tests work on Win32 (!)
+    my $then = time - (61 * 60);
+    utime $then, $then, $file;
+
     # stat tests
     {
         # populate the finfo struct first
=====

This works for me, but it's very strange.  I wonder what the real 
problem is?

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender immediately.  The 
unauthorized use, disclosure, copying or alteration of this message is strictly 
forbidden.  Note that any views or opinions presented in this email are solely those 
of the author and do not necessarily represent those of Radan Computational Ltd.  The 
recipient(s) of this message should check it and any attached files for viruses: Radan 
Computational will accept no liability for any damage caused by any virus transmitted 
by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to