On Thu, 20 May 2004, Geoffrey Young wrote: > a release candidate for mod_perl 1.99_14 is now available for testing. > > please grab the candidate from > > http://perl.apache.org/~geoff/mod_perl-1.99_14-dev.tar.gz > > and report back successes or failures. when reporting > failures, please see the bug reporting guidelines at > > http://perl.apache.org/bugs/ > > so your report can get the best attention possible. > > --Geoff
Hi Geoff, On Win32 (perl-5.8.3, ActivePerl 809 compatible), with Apache/2.0.49, there's a problem (often) in starting the tests, due to ThreadsPerChild being set too low (Steve, do you still find this?). This diff =================================================================== Index: Apache-Test/lib/Apache/TestConfig.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.222 diff -u -r1.222 TestConfig.pm --- Apache-Test/lib/Apache/TestConfig.pm 16 Apr 2004 20:29:23 -0000 1.222 +++ Apache-Test/lib/Apache/TestConfig.pm 20 May 2004 06:11:47 -0000 @@ -1878,7 +1878,7 @@ </IfDefine> <IfModule mpm_winnt.c> - ThreadsPerChild 20 + ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> =========================================================================== allows the tests to start for me. However, I then find some failures due to a problem we encountered before (occasionally) - on Win32, when comparing two file names, sometimes the DOS short path name is compared to the long path name. This doesn't arise for me all the time, as it seems to depend on where it's unpacked. In any case, a solution is to use t_catfile of Apache::TestUtil, rather than catfile of File::Spec, in a few places, as well as introduce an analagous t_canonpath - these two functions do what the File::Spec counterparts do, but for Win32 they convert the filename to a long path name, if relevant. ========================================================= Index: Apache-Test/lib/Apache/TestUtil.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestUtil.pm,v retrieving revision 1.38 diff -u -r1.38 TestUtil.pm --- Apache-Test/lib/Apache/TestUtil.pm 12 Apr 2004 19:53:42 -0000 1.38 +++ Apache-Test/lib/Apache/TestUtil.pm 20 May 2004 05:57:07 -0000 @@ -23,7 +23,7 @@ use Carp (); use Config; use File::Basename qw(dirname); -use File::Spec::Functions qw(catfile file_name_is_absolute); +use File::Spec::Functions qw(catfile canonpath file_name_is_absolute); use Symbol (); use Apache::Test (); @@ -41,7 +41,7 @@ ); @EXPORT_OK = qw(t_write_perl_script t_write_shell_script t_chown - t_catfile_apache t_catfile); + t_catfile_apache t_canonpath t_catfile); %CLEAN = (); @@ -340,6 +340,15 @@ # returns the long path name, if the file is absolute sub t_catfile { my $f = catfile(@_); + return $f unless file_name_is_absolute($f); + return Apache::TestConfig::WIN32 ? + Win32::GetLongPathName($f) : $f; +} + +# essentially File::Spec->canonpath, but on Win32 +# returns the long path name, if the file is absolute +sub t_canonpath { + my $f = canonpath(@_); return $f unless file_name_is_absolute($f); return Apache::TestConfig::WIN32 ? Win32::GetLongPathName($f) : $f; Index: t/response/TestCompat/apache.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache.pm,v retrieving revision 1.11 diff -u -r1.11 apache.pm --- t/response/TestCompat/apache.pm 5 Mar 2004 18:19:15 -0000 1.11 +++ t/response/TestCompat/apache.pm 20 May 2004 05:57:07 -0000 @@ -7,9 +7,9 @@ use strict; use warnings FATAL => 'all'; -use Apache::TestUtil; +use Apache::TestUtil qw(t_cmp t_canonpath t_catfile + t_server_log_error_is_expected); use Apache::Test; -use File::Spec::Functions qw(catfile canonpath); use Apache::compat (); use Apache::Constants qw(DIR_MAGIC_TYPE :common :response); @@ -64,28 +64,28 @@ 'Apache->httpd_conf'); $r->server->server_admin($admin); - ok t_cmp(canonpath($Apache::Server::CWD), - canonpath(Apache::Test::config()->{vars}->{serverroot}), + ok t_cmp(t_canonpath($Apache::Server::CWD), + t_canonpath(Apache::Test::config()->{vars}->{serverroot}), '$Apache::Server::CWD'); - ok t_cmp(canonpath($Apache::Server::CWD), - canonpath($r->server_root_relative), + ok t_cmp(t_canonpath($Apache::Server::CWD), + t_canonpath($r->server_root_relative), '$r->server_root_relative()'); - ok t_cmp(catfile($Apache::Server::CWD, 'conf'), - canonpath($r->server_root_relative('conf')), + ok t_cmp(t_catfile($Apache::Server::CWD, 'conf'), + t_canonpath($r->server_root_relative('conf')), "\$r->server_root_relative('conf')"); # Apache->server_root_relative { Apache::compat::override_mp2_api('Apache::server_root_relative'); - ok t_cmp(catfile($Apache::Server::CWD, 'conf'), - canonpath(Apache->server_root_relative('conf')), + ok t_cmp(t_catfile($Apache::Server::CWD, 'conf'), + t_canonpath(Apache->server_root_relative('conf')), "Apache->server_root_relative('conf')"); - ok t_cmp(canonpath($Apache::Server::CWD), - canonpath(Apache->server_root_relative), + ok t_cmp(t_canonpath($Apache::Server::CWD), + t_canonpath(Apache->server_root_relative), 'Apache->server_root_relative()'); Apache::compat::restore_mp2_api('Apache::server_root_relative'); Index: t/response/TestAPI/server_util.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/server_util.pm,v retrieving revision 1.14 diff -u -r1.14 server_util.pm --- t/response/TestAPI/server_util.pm 5 Mar 2004 18:19:15 -0000 1.14 +++ t/response/TestAPI/server_util.pm 20 May 2004 05:57:07 -0000 @@ -5,11 +5,11 @@ use Apache::Test; use Apache::TestUtil; -use File::Spec::Functions qw(canonpath catfile); use Apache::RequestRec (); use Apache::ServerUtil (); use Apache::Process (); +use Apache::TestUtil qw(t_catfile t_canonpath); use APR::Pool (); @@ -71,8 +71,8 @@ foreach my $p (keys %pools) { - ok t_cmp(catfile($serverroot, 'conf'), - canonpath(Apache::server_root_relative($pools{$p}, + ok t_cmp(t_catfile($serverroot, 'conf'), + t_canonpath(Apache::server_root_relative($pools{$p}, 'conf')), "Apache:::server_root_relative($p, 'conf')"); } @@ -80,8 +80,8 @@ # dig out the pool from valid objects foreach my $obj (keys %objects) { - ok t_cmp(catfile($serverroot, 'conf'), - canonpath($objects{$obj}->server_root_relative('conf')), + ok t_cmp(t_catfile($serverroot, 'conf'), + t_canonpath($objects{$obj}->server_root_relative('conf')), "$obj->server_root_relative('conf')"); } @@ -96,17 +96,17 @@ } # no file argument gives ServerRoot - ok t_cmp(canonpath($serverroot), - canonpath($r->server_root_relative), + ok t_cmp(t_canonpath($serverroot), + t_canonpath($r->server_root_relative), '$r->server_root_relative()'); - ok t_cmp(canonpath($serverroot), - canonpath(Apache::server_root_relative($r->pool)), + ok t_cmp(t_canonpath($serverroot), + t_canonpath(Apache::server_root_relative($r->pool)), 'Apache::server_root_relative($r->pool)'); # Apache::server_root is also the ServerRoot constant - ok t_cmp(canonpath(Apache::server_root), - canonpath($r->server_root_relative), + ok t_cmp(t_canonpath(Apache::server_root), + t_canonpath($r->server_root_relative), 'Apache::server_root'); { Index: t/response/TestAPI/server_const.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/server_const.pm,v retrieving revision 1.3 diff -u -r1.3 server_const.pm --- t/response/TestAPI/server_const.pm 5 Mar 2004 18:19:15 -0000 1.3 +++ t/response/TestAPI/server_const.pm 20 May 2004 05:57:07 -0000 @@ -9,6 +9,7 @@ use Apache::ServerUtil (); use Apache::Process (); +use Apache::TestUtil qw(t_canonpath); use APR::Pool (); @@ -28,8 +29,8 @@ # test Apache::Server constant subroutines - ok t_cmp(canonpath($root), - canonpath(Apache::server_root), + ok t_cmp(t_canonpath($root), + t_canonpath(Apache::server_root), 'Apache::server_root()'); Index: t/response/TestApache/conftree.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestApache/conftree.pm,v retrieving revision 1.10 diff -u -r1.10 conftree.pm --- t/response/TestApache/conftree.pm 29 Mar 2004 22:52:46 -0000 1.10 +++ t/response/TestApache/conftree.pm 20 May 2004 05:57:07 -0000 @@ -4,7 +4,7 @@ use warnings FATAL => 'all'; use Apache::Test; -use Apache::TestUtil; +use Apache::TestUtil qw(t_canonpath t_cmp); use Apache::TestConfig (); use Apache::Directive (); @@ -32,12 +32,13 @@ ok t_cmp("Off", $hostname_lookups); my $documentroot = $tree->lookup('DocumentRoot'); + my $vars_documentroot = t_canonpath($vars->{documentroot}); ok t_cmp('HASH' , ref($tree->as_hash()), 'as_hash'); - ok t_cmp(qq("$vars->{documentroot}"), $documentroot); + ok t_cmp(qq("$vars_documentroot"), t_canonpath($documentroot)); - ok t_cmp(qq("$vars->{documentroot}"), $tree->lookup("DocumentRoot")); + ok t_cmp(qq("$vars_documentroot"), t_canonpath($tree->lookup("DocumentRoot"))); #XXX: This test isn't so good, but its quite problematic to try #and _really_ compare $cfg and $tree... ===================================================================== -- best regards, randy -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html