Re: are perl-framework apache tests still used?

2003-02-07 Thread Cliff Woolley
On Fri, 7 Feb 2003, Stas Bekman wrote:

 I haven't seen any activity with maintaining tests in a while and I have a
 bunch of ssl tests failing. I remember Ryan working on a new test suite.
 What's the current status of things? Should Joe's new php tests be committed?

 These fail for me:

 ssl/basicauth.t31  33.33%  2
 ssl/http.t   255 65280 22 100.00%  1-2
 ssl/proxy.t  1695   2.96%  113-117
 ssl/varlookup.t   724   5.56%  38-39 52-53

Glad it's not just me.  :)  I'm not sure when they broke... there was a
big gap in there up until last week when I hadn't run the perl-framework
tests in a long time.  :-/

Anybody?

I'm CC:ing [EMAIL PROTECTED] on this to make sure it's on everyone's radar...
followups to test-dev, please.

--Cliff



Re: are perl-framework apache tests still used?

2003-02-07 Thread William A. Rowe, Jr.
AHHH... you are confusing apr/test (Ryan's ongoing efforts, even apart
from the apr group) which tests internal functions, with perl-testsuite,
which tests behavior of the server.

If Joe's tests work - commit them :-)

And the tests you cite... ssl/http.t is expected to fail today, mod_ssl once
provided HTTP/1.0 responses, irrespective of ass-backwards requests
(those that are pre HTTP/1.0, where the request is simply GET /foo with
no version tag), while it now provides an HTTP/0.9 response (no headers.)
Both behaviors are wrong, and the thorough solution isn't quite trivial, but
we expect to implement good behavior RSN (so we look at the request
and then emit the correct HTTP/1.0 or 0.9 response.)

The others concern me... -verbose feedback would be helpful.

Is this apache 2.0.45-dev or 2.1.0-dev?

Bill

At 10:34 PM 2/6/2003, Stas Bekman wrote:
I haven't seen any activity with maintaining tests in a while and I have a 
bunch of ssl tests failing. I remember Ryan working on a new test suite. 
What's the current status of things? Should Joe's new php tests be committed?

These fail for me:
ssl/basicauth.t31  33.33%  2
ssl/http.t   255 65280 22 100.00%  1-2
ssl/proxy.t  1695   2.96%  113-117
ssl/varlookup.t   724   5.56%  38-39 52-53
5 tests and 6 subtests skipped.


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org  http://ticketmaster.com




Re: are perl-framework apache tests still used?

2003-02-07 Thread Stas Bekman
William A. Rowe, Jr. wrote:
AHHH... you are confusing apr/test (Ryan's ongoing efforts, even apart
from the apr group) which tests internal functions, with perl-testsuite,
which tests behavior of the server.
If Joe's tests work - commit them :-)
I don't have php installed. Preferrably, someone who can test them first, will 
commit them. Otherwise I can commit without testing, though they need some 
cleanup (use hardcoded / path separator is not crossplatform)...

And the tests you cite... ssl/http.t is expected to fail today, mod_ssl once
provided HTTP/1.0 responses, irrespective of ass-backwards requests
(those that are pre HTTP/1.0, where the request is simply GET /foo with
no version tag), while it now provides an HTTP/0.9 response (no headers.)
Both behaviors are wrong, and the thorough solution isn't quite trivial, but
we expect to implement good behavior RSN (so we look at the request
and then emit the correct HTTP/1.0 or 0.9 response.)
The others concern me... -verbose feedback would be helpful.
Is this apache 2.0.45-dev or 2.1.0-dev?
2.1.0-dev from a few day ago. I will try again later with the latest cvs, but 
for now:

I've extracted the output of only failing sub-tests:
ssl/basicauth1..3
# testing : Getting /ssl-fakebasicauth/index.html with client_snakeoil cert
# expected: 200
# received: '401'
# Failed test 2 in ssl/basicauth.t at line 25
not ok 2

ssl/proxy1..169
# testing : using valid proxyssl client cert
# expected: 200
# received: '502'
# Failed test 113 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #113
# 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
line 47 is: ok $sub-();
not ok 113
# testing : using invalid proxyssl client cert
# expected: 403
# received: '502'
# Failed test 114 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #114
not ok 114
# testing : protected cgi script
# expected: 200
# received: '502'
# Failed test 115 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #115
not ok 115
# testing : X-Forwarded-Host header
# expected: 'localhost.localdomain:8537'
# Failed test 116 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #116
# received: undef
not ok 116
# testing : client subject common name
# Failed test 117 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #117
# expected: 'client_ok'
# received: undef
not ok 117

ssl/varlookup1..72
# testing : SSL_CLIENT_S_DN
# expected: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=client_ok/[EMAIL PROTECTED]'
# Failed test 38 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #38
# 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
line 47 is: ok $sub-();
# received: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=client_ok/[EMAIL PROTECTED]'
not ok 38
# testing : SSL_SERVER_S_DN
# expected: qr/(?-xism:^\/C=US\/ST=California\/L=San 
Francisco\/O=ASF\/OU=httpd-test\/([-\w]+)\/CN=localhost\/[EMAIL PROTECTED])/
# received: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/rsa-test/CN=localhost/[EMAIL PROTECTED]'
# Failed test 39 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #39
not ok 39


# testing : SSL_CLIENT_I_DN
# expected: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=ca/[EMAIL PROTECTED]'
# received: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=ca/[EMAIL PROTECTED]'
# Failed test 52 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #52
not ok 52
# testing : SSL_SERVER_I_DN
# expected: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=ca/[EMAIL PROTECTED]'
# Failed test 53 in 
/home/stas/apache.org/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm 
at line 47 fail #53
# received: '/C=US/ST=California/L=San 
Francisco/O=ASF/OU=httpd-test/CN=ca/[EMAIL PROTECTED]'
not ok 53


__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: are perl-framework apache tests still used?

2003-02-07 Thread Joe Orton
On Fri, Feb 07, 2003 at 03:34:55PM +1100, Stas Bekman wrote:
 I haven't seen any activity with maintaining tests in a while and I have a 
 bunch of ssl tests failing. I remember Ryan working on a new test suite. 
 What's the current status of things? Should Joe's new php tests be 
 committed?
 
 These fail for me:
 ssl/basicauth.t31  33.33%  2
 ssl/http.t   255 65280 22 100.00%  1-2
 ssl/proxy.t  1695   2.96%  113-117
 ssl/varlookup.t   724   5.56%  38-39 52-53
 5 tests and 6 subtests skipped.

The varlookup.t tests fail if you use OpenSSL 0.9.7, since it uses the
string emailAddress not Email for an e-mail attribute in a DN. I
hacked round this by just removing the e-mail attributes from the DN.

--- perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm.os0972003-01-28 
15:08:50.0 +
+++ perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm  2003-01-28 
15:11:52.0 +
@@ -44,7 +44,6 @@
 O  = 'ASF',
 OU = 'httpd-test',
 CN = '',
-Email = '[EMAIL PROTECTED]',
 },
 };
 
@@ -132,7 +131,7 @@
 
 my $string = ;
 
-for my $k (qw(C ST L O OU CN Email)) {
+for my $k (qw(C ST L O OU CN)) {
 next unless $dn-{$k};
 $string .= /$k=$dn-{$k};
 }
@@ -185,7 +184,6 @@
 O  = $dn-{O}
 OU = $dn-{OU}
 CN = $dn-{CN}
-emailAddress   = $dn-{Email}
 
 [ req_attributes ]
 challengePassword  = $pass


Re: are perl-framework apache tests still used?

2003-02-07 Thread Joe Orton
On Fri, Feb 07, 2003 at 06:04:29PM +1100, Stas Bekman wrote:
 William A. Rowe, Jr. wrote:
 AHHH... you are confusing apr/test (Ryan's ongoing efforts, even apart
 from the apr group) which tests internal functions, with perl-testsuite,
 which tests behavior of the server.
 
 If Joe's tests work - commit them :-)
 
 I don't have php installed. Preferrably, someone who can test them first, 
 will commit them. Otherwise I can commit without testing, though they need 
 some cleanup (use hardcoded / path separator is not crossplatform)...

OK - is there some easy way to make this portable? The only other places
I can find which use local files seem to be doing the same thing,
though: modules/cgi.t with $cgi_log and write_htaccess in modules/dir.t?

Regards,

joe


Re: are perl-framework apache tests still used?

2003-02-07 Thread Stas Bekman
Joe Orton wrote:
On Fri, Feb 07, 2003 at 03:34:55PM +1100, Stas Bekman wrote:
I haven't seen any activity with maintaining tests in a while and I have a 
bunch of ssl tests failing. I remember Ryan working on a new test suite. 
What's the current status of things? Should Joe's new php tests be 
committed?

These fail for me:
ssl/basicauth.t31  33.33%  2
ssl/http.t   255 65280 22 100.00%  1-2
ssl/proxy.t  1695   2.96%  113-117
ssl/varlookup.t   724   5.56%  38-39 52-53
5 tests and 6 subtests skipped.

The varlookup.t tests fail if you use OpenSSL 0.9.7, since it uses the
string emailAddress not Email for an e-mail attribute in a DN. I
hacked round this by just removing the e-mail attributes from the DN.
It's probably better to fix it, rather than remove tests. How about this:
Index: Apache-Test/lib/Apache/TestSSLCA.pm
===
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm,v
retrieving revision 1.12
diff -u -r1.12 TestSSLCA.pm
--- Apache-Test/lib/Apache/TestSSLCA.pm	3 Apr 2002 17:39:36 -	1.12
+++ Apache-Test/lib/Apache/TestSSLCA.pm	7 Feb 2003 23:09:11 -
@@ -21,6 +21,7 @@
 *import = \Exporter::import;

 my $openssl = $ENV{APACHE_TEST_OPENSSL_CMD} || 'openssl';
+my $version = version();
 my $CA = 'asf';
 my $Config; #global Apache::TestConfig object
@@ -36,6 +37,9 @@
 my $passin  = -passin pass:$pass;
 my $passout = -passout pass:$pass;
+# in 0.9.7 s/Email/emailAddress/ in DN
+my $email_field = $version lt 097 ? Email : emailAddress;
+
 my $ca_dn = {
 asf = {
 C  = 'US',
@@ -44,7 +48,7 @@
 O  = 'ASF',
 OU = 'httpd-test',
 CN = '',
-Email = '[EMAIL PROTECTED]',
+$email_field = '[EMAIL PROTECTED]',
 },
 };
@@ -132,7 +136,7 @@
 my $string = ;
-for my $k (qw(C ST L O OU CN Email)) {
+for my $k ((qw(C ST L O OU CN), $email_field)) {
 next unless $dn-{$k};
 $string .= /$k=$dn-{$k};
 }
@@ -185,7 +189,7 @@
 O  = $dn-{O}
 OU = $dn-{OU}
 CN = $dn-{CN}
-emailAddress   = $dn-{Email}
+emailAddress   = $dn-{$email_field}
 [ req_attributes ]
 challengePassword  = $pass
@@ -488,6 +492,15 @@
 return if -d $dir;
 mkdir $dir, 0755;
+}
+
+sub version {
+my $version = qx($openssl version);
+if ($version =~ /^OpenSSL (\S+) /) {
+($version = $1) =~ s/\.//g;
+return $version;
+}
+return 0;
 }
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com