perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject svn commit: r410427 - /perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm
Date Wed, 31 May 2006 04:05:02 GMT
Author: randyk
Date: Tue May 30 21:05:02 2006
New Revision: 410427

URL: http://svn.apache.org/viewvc?rev=410427&view=rev
Log:
On Win32, there's a bug in the apr library supplied with Apache/2.2 that causes the FPROT_WREAD
and FPROT_WWRITE tests to fail. This is slated to be fixed after apr-1.2.7.

Modified:
    perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm

Modified: perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm?rev=410427&r1=410426&r2=410427&view=diff
==============================================================================
--- perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm (original)
+++ perl/modperl/trunk/t/lib/TestAPRlib/finfo.pm Tue May 30 21:05:02 2006
@@ -18,6 +18,7 @@
 use constant OSX   => Apache::TestConfig::OSX;
 
 use constant APACHE_2_0_49_PLUS => have_min_apache_version('2.0.49');
+use constant APACHE_2_2_PLUS    => have_min_apache_version('2.2.0');
 
 use APR::Const -compile => qw(SUCCESS FINFO_NORM FILETYPE_REG
                               FPROT_WREAD FPROT_WWRITE
@@ -145,14 +146,25 @@
 
         # match world bits
 
-        ok t_cmp($finfo->protection & APR::Const::FPROT_WREAD,
-                 $stat->{protection} & S_IROTH,
-                 '$finfo->protection() & APR::Const::FPROT_WREAD');
-
-        ok t_cmp($finfo->protection & APR::Const::FPROT_WWRITE,
-                 $stat->{protection} & S_IWOTH,
-                 '$finfo->protection() & APR::Const::FPROT_WWRITE');
-
+        # on Win32, there's a bug in the apr library supplied
+        # with Apache/2.2 that causes the following two tests
+        # to fail. This is slated to be fixed after apr-1.2.7.
+        if (WIN32 and APACHE_2_2_PLUS) {
+            skip "broken apr stat on Win32", 0;
+        }
+        else {
+            ok t_cmp($finfo->protection & APR::Const::FPROT_WREAD,
+                     $stat->{protection} & S_IROTH,
+                     '$finfo->protection() & APR::Const::FPROT_WREAD');
+	}
+        if (WIN32 and APACHE_2_2_PLUS) {
+            skip "broken apr stat on Win32", 0;
+        }
+        else {
+            ok t_cmp($finfo->protection & APR::Const::FPROT_WWRITE,
+                     $stat->{protection} & S_IWOTH,
+                     '$finfo->protection() & APR::Const::FPROT_WWRITE');
+	}
         if (WIN32) {
             skip "different file semantics", 0;
         }



Mime
View raw message