You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Gary Benson <gb...@redhat.com> on 2001/08/09 18:08:51 UTC
perl-framework/t/php/func5.t failure
Hi all,
Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
don't know if it is just my setup or what. Anyway, the patch below makes
the test use the same variable that is used during generation of
t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
Even now I have it correctly finding the logfile, it still doesn't work --
PHP just isn't logging the entry it is expecting to find. Has anybody else
had this problem?
Gary
[ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
Index: perl-framework/t/php/func5.t
===================================================================
RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
retrieving revision 1.2
diff -u -r1.2 func5.t
--- t/php/func5.t 2001/07/30 19:50:45 1.2
+++ t/php/func5.t 2001/08/09 15:59:06
@@ -5,6 +5,7 @@
use Apache::TestRequest;
use Apache::TestConfig;
use ExtModules::TestEnv;
+use File::Spec::Functions qw(catfile);
plan tests => 2, \&ExtModules::TestEnv::has_php4;
@@ -23,7 +24,7 @@
## this is kind of lame and may not work...i dont know how php is
## SUPPPOSED to work in this situation...
-my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
+my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
open(ERROR_LOG, $error_log);
my @log = <ERROR_LOG>;
$result = pop @log;
Re: perl-framework/t/php/func5.t failure
Posted by Gary Benson <gb...@redhat.com>.
Thanks.
On Thu, 9 Aug 2001, john sachs wrote:
> ah.
> i see where this is going.
> i will make the fix.
> -j
>
> On Thu, Aug 09, 2001 at 06:06:41PM +0100, Gary Benson wrote:
> +
> + What does "httpd -V | grep DEFAULT_ERRORLOG" say in your setup?
> +
> + On Thu, 9 Aug 2001, john sachs wrote:
> +
> + > the test finds my error log ok...
> + >
> + > On Thu, Aug 09, 2001 at 05:39:20PM +0100, Gary Benson wrote:
> + > +
> + > + Does the test itself work correctly for you, though? I have to have my
> + > + patched version for it to be able to find the error_log.
> + > +
> + > + Gary
> + > +
> + > + On Thu, 9 Aug 2001, john sachs wrote:
> + > +
> + > + [snip]
> + > + > that text was getting dumped into the error_log with the build of
> + > + > PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils
> + > + > down to i dont really know what the expected behavior is for this
> + > + > testcase. if anyone does know, id love to have that info.
> + > + > -j
> + > + >
> + > + > On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
> + > + > +
> + > + > + Hi all,
> + > + > +
> + > + > + Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
> + > + > + don't know if it is just my setup or what. Anyway, the patch below makes
> + > + > + the test use the same variable that is used during generation of
> + > + > + t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
> + > + > +
> + > + > + Even now I have it correctly finding the logfile, it still doesn't work --
> + > + > + PHP just isn't logging the entry it is expecting to find. Has anybody else
> + > + > + had this problem?
> + > + > +
> + > + > + Gary
> + > + > +
> + > + > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> + > + > +
> + > + > +
> + > + > + Index: perl-framework/t/php/func5.t
> + > + > + ===================================================================
> + > + > + RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
> + > + > + retrieving revision 1.2
> + > + > + diff -u -r1.2 func5.t
> + > + > + --- t/php/func5.t 2001/07/30 19:50:45 1.2
> + > + > + +++ t/php/func5.t 2001/08/09 15:59:06
> + > + > + @@ -5,6 +5,7 @@
> + > + > + use Apache::TestRequest;
> + > + > + use Apache::TestConfig;
> + > + > + use ExtModules::TestEnv;
> + > + > + +use File::Spec::Functions qw(catfile);
> + > + > +
> + > + > + plan tests => 2, \&ExtModules::TestEnv::has_php4;
> + > + > +
> + > + > + @@ -23,7 +24,7 @@
> + > + > + ## this is kind of lame and may not work...i dont know how php is
> + > + > + ## SUPPPOSED to work in this situation...
> + > + > +
> + > + > + -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
> + > + > + +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
> + > + > + open(ERROR_LOG, $error_log);
> + > + > + my @log = <ERROR_LOG>;
> + > + > + $result = pop @log;
> + > + > +
> + > + > +
> + > + > +
> + > + >
> + > +
> + > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> + > +
> + > +
> + > +
> + >
> +
> + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> +
>
[ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
Re: perl-framework/t/php/func5.t failure
Posted by john sachs <js...@covalent.net>.
ah.
i see where this is going.
i will make the fix.
-j
On Thu, Aug 09, 2001 at 06:06:41PM +0100, Gary Benson wrote:
+
+ What does "httpd -V | grep DEFAULT_ERRORLOG" say in your setup?
+
+ On Thu, 9 Aug 2001, john sachs wrote:
+
+ > the test finds my error log ok...
+ >
+ > On Thu, Aug 09, 2001 at 05:39:20PM +0100, Gary Benson wrote:
+ > +
+ > + Does the test itself work correctly for you, though? I have to have my
+ > + patched version for it to be able to find the error_log.
+ > +
+ > + Gary
+ > +
+ > + On Thu, 9 Aug 2001, john sachs wrote:
+ > +
+ > + [snip]
+ > + > that text was getting dumped into the error_log with the build of
+ > + > PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils
+ > + > down to i dont really know what the expected behavior is for this
+ > + > testcase. if anyone does know, id love to have that info.
+ > + > -j
+ > + >
+ > + > On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
+ > + > +
+ > + > + Hi all,
+ > + > +
+ > + > + Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
+ > + > + don't know if it is just my setup or what. Anyway, the patch below makes
+ > + > + the test use the same variable that is used during generation of
+ > + > + t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
+ > + > +
+ > + > + Even now I have it correctly finding the logfile, it still doesn't work --
+ > + > + PHP just isn't logging the entry it is expecting to find. Has anybody else
+ > + > + had this problem?
+ > + > +
+ > + > + Gary
+ > + > +
+ > + > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+ > + > +
+ > + > +
+ > + > + Index: perl-framework/t/php/func5.t
+ > + > + ===================================================================
+ > + > + RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
+ > + > + retrieving revision 1.2
+ > + > + diff -u -r1.2 func5.t
+ > + > + --- t/php/func5.t 2001/07/30 19:50:45 1.2
+ > + > + +++ t/php/func5.t 2001/08/09 15:59:06
+ > + > + @@ -5,6 +5,7 @@
+ > + > + use Apache::TestRequest;
+ > + > + use Apache::TestConfig;
+ > + > + use ExtModules::TestEnv;
+ > + > + +use File::Spec::Functions qw(catfile);
+ > + > +
+ > + > + plan tests => 2, \&ExtModules::TestEnv::has_php4;
+ > + > +
+ > + > + @@ -23,7 +24,7 @@
+ > + > + ## this is kind of lame and may not work...i dont know how php is
+ > + > + ## SUPPPOSED to work in this situation...
+ > + > +
+ > + > + -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
+ > + > + +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
+ > + > + open(ERROR_LOG, $error_log);
+ > + > + my @log = <ERROR_LOG>;
+ > + > + $result = pop @log;
+ > + > +
+ > + > +
+ > + > +
+ > + >
+ > +
+ > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+ > +
+ > +
+ > +
+ >
+
+ [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+
Re: perl-framework/t/php/func5.t failure
Posted by Gary Benson <gb...@redhat.com>.
What does "httpd -V | grep DEFAULT_ERRORLOG" say in your setup?
On Thu, 9 Aug 2001, john sachs wrote:
> the test finds my error log ok...
>
> On Thu, Aug 09, 2001 at 05:39:20PM +0100, Gary Benson wrote:
> +
> + Does the test itself work correctly for you, though? I have to have my
> + patched version for it to be able to find the error_log.
> +
> + Gary
> +
> + On Thu, 9 Aug 2001, john sachs wrote:
> +
> + [snip]
> + > that text was getting dumped into the error_log with the build of
> + > PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils
> + > down to i dont really know what the expected behavior is for this
> + > testcase. if anyone does know, id love to have that info.
> + > -j
> + >
> + > On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
> + > +
> + > + Hi all,
> + > +
> + > + Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
> + > + don't know if it is just my setup or what. Anyway, the patch below makes
> + > + the test use the same variable that is used during generation of
> + > + t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
> + > +
> + > + Even now I have it correctly finding the logfile, it still doesn't work --
> + > + PHP just isn't logging the entry it is expecting to find. Has anybody else
> + > + had this problem?
> + > +
> + > + Gary
> + > +
> + > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> + > +
> + > +
> + > + Index: perl-framework/t/php/func5.t
> + > + ===================================================================
> + > + RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
> + > + retrieving revision 1.2
> + > + diff -u -r1.2 func5.t
> + > + --- t/php/func5.t 2001/07/30 19:50:45 1.2
> + > + +++ t/php/func5.t 2001/08/09 15:59:06
> + > + @@ -5,6 +5,7 @@
> + > + use Apache::TestRequest;
> + > + use Apache::TestConfig;
> + > + use ExtModules::TestEnv;
> + > + +use File::Spec::Functions qw(catfile);
> + > +
> + > + plan tests => 2, \&ExtModules::TestEnv::has_php4;
> + > +
> + > + @@ -23,7 +24,7 @@
> + > + ## this is kind of lame and may not work...i dont know how php is
> + > + ## SUPPPOSED to work in this situation...
> + > +
> + > + -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
> + > + +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
> + > + open(ERROR_LOG, $error_log);
> + > + my @log = <ERROR_LOG>;
> + > + $result = pop @log;
> + > +
> + > +
> + > +
> + >
> +
> + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> +
> +
> +
>
[ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
Re: perl-framework/t/php/func5.t failure
Posted by john sachs <js...@covalent.net>.
the test finds my error log ok...
On Thu, Aug 09, 2001 at 05:39:20PM +0100, Gary Benson wrote:
+
+ Does the test itself work correctly for you, though? I have to have my
+ patched version for it to be able to find the error_log.
+
+ Gary
+
+ On Thu, 9 Aug 2001, john sachs wrote:
+
+ [snip]
+ > that text was getting dumped into the error_log with the build of
+ > PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils
+ > down to i dont really know what the expected behavior is for this
+ > testcase. if anyone does know, id love to have that info.
+ > -j
+ >
+ > On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
+ > +
+ > + Hi all,
+ > +
+ > + Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
+ > + don't know if it is just my setup or what. Anyway, the patch below makes
+ > + the test use the same variable that is used during generation of
+ > + t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
+ > +
+ > + Even now I have it correctly finding the logfile, it still doesn't work --
+ > + PHP just isn't logging the entry it is expecting to find. Has anybody else
+ > + had this problem?
+ > +
+ > + Gary
+ > +
+ > + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+ > +
+ > +
+ > + Index: perl-framework/t/php/func5.t
+ > + ===================================================================
+ > + RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
+ > + retrieving revision 1.2
+ > + diff -u -r1.2 func5.t
+ > + --- t/php/func5.t 2001/07/30 19:50:45 1.2
+ > + +++ t/php/func5.t 2001/08/09 15:59:06
+ > + @@ -5,6 +5,7 @@
+ > + use Apache::TestRequest;
+ > + use Apache::TestConfig;
+ > + use ExtModules::TestEnv;
+ > + +use File::Spec::Functions qw(catfile);
+ > +
+ > + plan tests => 2, \&ExtModules::TestEnv::has_php4;
+ > +
+ > + @@ -23,7 +24,7 @@
+ > + ## this is kind of lame and may not work...i dont know how php is
+ > + ## SUPPPOSED to work in this situation...
+ > +
+ > + -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
+ > + +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
+ > + open(ERROR_LOG, $error_log);
+ > + my @log = <ERROR_LOG>;
+ > + $result = pop @log;
+ > +
+ > +
+ > +
+ >
+
+ [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+
+
+
Re: perl-framework/t/php/func5.t failure
Posted by Gary Benson <gb...@redhat.com>.
Does the test itself work correctly for you, though? I have to have my
patched version for it to be able to find the error_log.
Gary
On Thu, 9 Aug 2001, john sachs wrote:
[snip]
> that text was getting dumped into the error_log with the build of
> PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils
> down to i dont really know what the expected behavior is for this
> testcase. if anyone does know, id love to have that info.
> -j
>
> On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
> +
> + Hi all,
> +
> + Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
> + don't know if it is just my setup or what. Anyway, the patch below makes
> + the test use the same variable that is used during generation of
> + t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
> +
> + Even now I have it correctly finding the logfile, it still doesn't work --
> + PHP just isn't logging the entry it is expecting to find. Has anybody else
> + had this problem?
> +
> + Gary
> +
> + [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
> +
> +
> + Index: perl-framework/t/php/func5.t
> + ===================================================================
> + RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
> + retrieving revision 1.2
> + diff -u -r1.2 func5.t
> + --- t/php/func5.t 2001/07/30 19:50:45 1.2
> + +++ t/php/func5.t 2001/08/09 15:59:06
> + @@ -5,6 +5,7 @@
> + use Apache::TestRequest;
> + use Apache::TestConfig;
> + use ExtModules::TestEnv;
> + +use File::Spec::Functions qw(catfile);
> +
> + plan tests => 2, \&ExtModules::TestEnv::has_php4;
> +
> + @@ -23,7 +24,7 @@
> + ## this is kind of lame and may not work...i dont know how php is
> + ## SUPPPOSED to work in this situation...
> +
> + -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
> + +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
> + open(ERROR_LOG, $error_log);
> + my @log = <ERROR_LOG>;
> + $result = pop @log;
> +
> +
> +
>
[ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
Re: perl-framework/t/php/func5.t failure
Posted by john sachs <js...@covalent.net>.
yeah,
i had a build of php that worked that way, but i also had one that didnt. i dont really know how php is supposed to work in this situation. (thats the reason for the comment in the code...heh)
this is supposed to be testing the register_shutdown_function(). the way the test is set up, you request a .php that registers a function called foo() which looks like this:
function foo()
{
print "foo() has been called.\n";
}
that text was getting dumped into the error_log with the build of PHP/4.0.4pl1 i had. but apparently that may not be correct. it boils down to i dont really know what the expected behavior is for this testcase. if anyone does know, id love to have that info.
-j
On Thu, Aug 09, 2001 at 05:08:51PM +0100, Gary Benson wrote:
+
+ Hi all,
+
+ Test 2 of 2 in t/php/func5.t does not correctly locate the logfile -- I
+ don't know if it is just my setup or what. Anyway, the patch below makes
+ the test use the same variable that is used during generation of
+ t/conf/httpd.conf in Apache-Test/lib/Apache/TestConfig.pm.
+
+ Even now I have it correctly finding the logfile, it still doesn't work --
+ PHP just isn't logging the entry it is expecting to find. Has anybody else
+ had this problem?
+
+ Gary
+
+ [ Gary Benson, Red Hat Europe ][ gbenson@redhat.com ][ GnuPG 60E8793A ]
+
+
+ Index: perl-framework/t/php/func5.t
+ ===================================================================
+ RCS file: /home/cvspublic/httpd-test/perl-framework/t/php/func5.t,v
+ retrieving revision 1.2
+ diff -u -r1.2 func5.t
+ --- t/php/func5.t 2001/07/30 19:50:45 1.2
+ +++ t/php/func5.t 2001/08/09 15:59:06
+ @@ -5,6 +5,7 @@
+ use Apache::TestRequest;
+ use Apache::TestConfig;
+ use ExtModules::TestEnv;
+ +use File::Spec::Functions qw(catfile);
+
+ plan tests => 2, \&ExtModules::TestEnv::has_php4;
+
+ @@ -23,7 +24,7 @@
+ ## this is kind of lame and may not work...i dont know how php is
+ ## SUPPPOSED to work in this situation...
+
+ -my $error_log = $env->{httpd_defines}->{DEFAULT_ERRORLOG};
+ +my $error_log = catfile $env->{vars}->{t_logs}, "error_log";
+ open(ERROR_LOG, $error_log);
+ my @log = <ERROR_LOG>;
+ $result = pop @log;
+
+
+