httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1652644 - in /httpd/test/framework/trunk/t: conf/extra.conf.in modules/cgi.t
Date Sat, 17 Jan 2015 17:17:45 GMT
Author: rjung
Date: Sat Jan 17 17:17:45 2015
New Revision: 1652644

URL: http://svn.apache.org/r1652644
Log:
Adjust ScriptLogLength depending on whether we
use mod_cgi or mod_cgid.

Needed for t/modules/cgi.t because after
r1651085 mod_cgi and mod_cgid behave differently
with respect to STDERR handling and ScriptLog.

Modified:
    httpd/test/framework/trunk/t/conf/extra.conf.in
    httpd/test/framework/trunk/t/modules/cgi.t

Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=1652644&r1=1652643&r2=1652644&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Sat Jan 17 17:17:45 2015
@@ -289,7 +289,12 @@
     AddHandler cgi-script .sh
     AddHandler cgi-script .pl
     ScriptLog @SERVERROOT@/logs/mod_cgi.log
-    ScriptLogLength 40960
+    <IfModule mod_cgi.c>
+        ScriptLogLength 40960
+    </IfModule>
+    <IfModule !mod_cgi.c>
+        ScriptLogLength 8192
+    </IfModule>
     ScriptLogBuffer 256
 
     <Directory @SERVERROOT@/htdocs/modules/cgi>

Modified: httpd/test/framework/trunk/t/modules/cgi.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/cgi.t?rev=1652644&r1=1652643&r2=1652644&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/cgi.t (original)
+++ httpd/test/framework/trunk/t/modules/cgi.t Sat Jan 17 17:17:45 2015
@@ -9,6 +9,11 @@ use File::stat;
 my $have_apache_2 = have_apache 2;
 my $have_apache_2050 = have_min_apache_version "2.0.50";
 
+my $script_log_length = 8192;
+if (have_module 'mod_cgi') {
+    $script_log_length = 40960;
+}
+
 ## mod_cgi test
 ##
 ## extra.conf.in:
@@ -16,7 +21,12 @@ my $have_apache_2050 = have_min_apache_v
 ## AddHandler cgi-script .sh
 ## AddHandler cgi-script .pl
 ## ScriptLog logs/mod_cgi.log
-## ScriptLogLength 40960
+## <IfModule mod_cgi.c>
+##     ScriptLogLength 40960
+## </IfModule mod_cgi>
+## <IfModule !mod_cgi.c>
+##     ScriptLogLength 8192
+## </IfModule mod_cgi>
 ## ScriptLogBuffer 256
 ## <Directory @SERVERROOT@/htdocs/modules/cgi>
 ## Options +ExecCGI
@@ -187,9 +197,9 @@ foreach my $length (@post_content) {
 
     if (-e $cgi_log) {
         ## cgi log should be bigger.
-        ## as long as it's under ScriptLogLength (40960)
+        ## as long as it's under ScriptLogLength
         $stat = stat($cgi_log);
-        if ($log_size < 40960) {
+        if ($log_size < $script_log_length) {
             print "# checking that log size ($$stat[7]) is greater than $log_size\n";
             ok ($$stat[7] > $log_size);
         } else {
@@ -230,7 +240,7 @@ foreach my $length (@post_content) {
 
 ## make sure cgi log does not 
 ## keep logging after it is bigger
-## than ScriptLogLength (40960)
+## than ScriptLogLength
 for (my $i=1 ; $i<=20 ; $i++) {
 
     ## get out if log does not exist ##
@@ -243,12 +253,12 @@ for (my $i=1 ; $i<=20 ; $i++) {
     ## when log goes over max size stop making requests
     $stat = stat($cgi_log);
     $log_size = $$stat[7];
-    last if ($log_size > 40960);
+    last if ($log_size > $script_log_length);
 
 }
-## make sure its over (or equal) 40960
-print "# verifying log is greater than 40960 bytes.\n";
-ok ($log_size >= 40960);
+## make sure its over (or equal) our ScriptLogLength
+print "# verifying log is greater than $script_log_length bytes.\n";
+ok ($log_size >= $script_log_length);
 
 ## make sure it does not grow now.
 GET_RC "$path/bogus1k.pl";



Mime
View raw message