httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject [PATCH] ssl tests for mod_apreq.so
Date Sun, 13 Jun 2004 03:12:30 GMT

To get this patch to work, you first need to copy the 
perl-framework/t/conf/ssl directory from httpd-dist into 
env/t/conf.  This patch will just run big_request.t and 
request.t over both http and https (assuming you have Net::SSL
and mod_ssl).  My results are here

Failed Test     Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/big_request.t               42    7  16.67%  36-42
Failed 1/4 test scripts, 75.00% okay. 7/106 subtests failed, 93.40% okay.

These failures are surely due to the missing apr_bucket_setaside()
calls discussed earlier on this list.  I'd like to get some ssl
tests committed before attacking the bug, so please scrutinize
this patch.

Thanks!

Index: env/Makefile.am
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/Makefile.am,v
retrieving revision 1.20
diff -u -r1.20 Makefile.am
--- Makefile.am 10 Jun 2004 20:51:33 -0000      1.20
+++ Makefile.am 13 Jun 2004 02:59:39 -0000
@@ -52,7 +52,7 @@

 test_clean : cmodules_clean
        -MAKE=$(MAKE) @PERL@ t/TEST -clean
-       -rm -rf t/htdocs t/logs t/modules t/TEST t/cgi-bin/test_cgi t/cgi-bin/.libs t/conf/extra.conf
+       -rm -rf t/htdocs t/logs t/modules t/TEST t/cgi-bin/test_cgi t/cgi-bin/.libs t/conf/extra.conf
t/conf/ssl/ca t/conf/ssl/httpd-passphrase.pl

 cmodules_clean:
        -cd c-modules && $(MAKE) clean
cvs server: Diffing c-modules
cvs server: Diffing c-modules/apreq_access_test
cvs server: Diffing c-modules/apreq_big_request_test
cvs server: Diffing c-modules/apreq_cookie_test
cvs server: Diffing c-modules/apreq_output_filter_test
cvs server: Diffing c-modules/apreq_redirect_test
cvs server: Diffing c-modules/apreq_request_test
cvs server: Diffing t
Index: env/t/big_request.t
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/t/big_request.t,v
retrieving revision 1.1
diff -u -r1.1 big_request.t
--- t/big_request.t     16 Oct 2003 15:44:57 -0000      1.1
+++ t/big_request.t     13 Jun 2004 02:59:39 -0000
@@ -14,9 +14,15 @@
 my @big_key_num = (5, 15, 25);
 my @big_keys    = ('a'..'z');

-plan tests => @key_len * @key_num + @big_key_len * @big_key_num;
+my $num_tests = @key_len * @key_num + @big_key_len * @big_key_num;
+$num_tests *= 2 if Apache::Test::have_ssl();
+plan tests => $num_tests, Apache::Test::have_ssl();

 my $location = "/apreq_big_request_test";
+my $scheme = 'http';
+
+START_TESTS:
+Apache::TestRequest::scheme($scheme);

 # GET
 for my $key_len (@key_len) {
@@ -60,4 +66,9 @@
                  "POST big data");
     }

+}
+
+if (Apache::Test::have_ssl() and $scheme ne 'https') {
+    $scheme = 'https';
+    goto START_TESTS;
 }
Index: env/t/request.t
===================================================================
RCS file: /home/cvs/httpd-apreq-2/env/t/request.t,v
retrieving revision 1.8
diff -u -r1.8 request.t
--- t/request.t 11 Jun 2004 17:43:07 -0000      1.8
+++ t/request.t 13 Jun 2004 02:59:39 -0000
@@ -5,7 +5,13 @@
 use Apache::TestUtil;
 use Apache::TestRequest qw(GET_BODY UPLOAD_BODY POST_BODY GET_RC);

-plan tests => 14, have_lwp;
+my $num_tests = 14;
+$num_tests *= 2 if Apache::Test::have_ssl();
+plan tests => $num_tests, have_lwp;
+my $scheme = "http";
+
+START_TESTS:
+Apache::TestRequest::scheme($scheme);

 foreach my $location ('/apreq_request_test', '/apreq_access_test') {

@@ -75,3 +81,8 @@
      filter_content POST_BODY("/index.html?test=14", content =>
      "post+data=foo;more=$filler;test=output+filter+POST"),
      "output filter POST");
+
+if (Apache::Test::have_ssl() and $scheme ne 'https') {
+    $scheme = 'https';
+    goto START_TESTS;
+}



-- 
Joe Schaefer


Mime
View raw message