On 17 Jan 2012, at 11:07 PM, Stefan Fritsch wrote: > The diff to a PASS run starts with: > > # posted content (length 1024) to bogus-perl.pl > # got return code of: 500, expecting: 500 > ok 52 > -# checking that log size (5115) is greater than 4516 > +# verifying log did not increase in size... > ok 53 > -# verifying that logged content is 256 characters > -ok 54 > # verifying log is greater than 8192 bytes. > -ok 55 > +ok 54 > > It's certainly a bug in the test that the number of "ok"s differs in > different code paths. Can you try if the attached diff gives better > debug output with -v? > > <cgi.t.diff>
With the patch, it looks like this:
t/modules/cgi.t ..
1..58
# Running under perl version 5.014002 for linux
# Current time local: Wed Jan 18 05:24:18 2012
# Current time GMT: Wed Jan 18 05:24:18 2012
# Using Test.pm version 1.25_02
# Using Apache/Test.pm version 1.37
# testing : return code for acceptpathinfodefault.sh
# expected: 200
# received: 200
ok 1
# testing : body for acceptpathinfodefault.sh
# expected:
# received:
ok 2
# testing : return code for acceptpathinfodefault.sh/foo
# expected: 200
# received: 200
ok 3
# testing : body for acceptpathinfodefault.sh/foo
# expected: /foo
# received: /foo
ok 4
# testing : return code for acceptpathinfooff.sh
# expected: 200
# received: 200
ok 5
# testing : body for acceptpathinfooff.sh
# expected:
# received:
ok 6
# testing : return code for acceptpathinfooff.sh/foo
# expected: 404
# received: 404
ok 7
# no body test for this one
ok 8
# testing : return code for acceptpathinfoon.sh
# expected: 200
# received: 200
ok 9
# testing : body for acceptpathinfoon.sh
# expected:
# received:
ok 10
# testing : return code for acceptpathinfoon.sh/foo
# expected: 200
# received: 200
ok 11
# testing : body for acceptpathinfoon.sh/foo
# expected: /foo
# received: /foo
ok 12
# testing : return code for bogus-perl.pl
# expected: 500
# received: 500
ok 13
# cgi log created ok.
ok 14
# testing : return code for bogus-sh.sh
# expected: 500
# received: 500
ok 15
# checking that log size (1244) is bigger than it used to be (978)
ok 16
# testing : return code for nph-stderr.pl
# expected: 200
# received: 200
ok 17
# testing : body for nph-stderr.pl
# expected: this is nph-stdout
# received: this is nph-stdout
ok 18
# testing : return code for nph-test.pl
# expected: 200
# received: 200
ok 19
# testing : body for nph-test.pl
# expected: ok
# received: ok
ok 20
# testing : return code for perl.pl
# expected: 200
# received: 200
ok 21
# testing : body for perl.pl
# expected: perl cgi
# received: perl cgi
ok 22
# testing : return code for sh.sh
# expected: 200
# received: 200
ok 23
# testing : body for sh.sh
# expected: sh cgi
# received: sh cgi
ok 24
# testing : return code for stderr1.pl
# expected: 200
# received: 200
ok 25
# testing : body for stderr1.pl
# expected: this is stdout
# received: this is stdout
ok 26
# testing : return code for stderr2.pl
# expected: 200
# received: 200
ok 27
# testing : body for stderr2.pl
# expected: this is also stdout
# received: this is also stdout
ok 28
# testing : return code for stderr3.pl
# expected: 200
# received: 200
ok 29
# testing : body for stderr3.pl
# expected: this is more stdout
# received: this is more stdout
ok 30
# posted content (length 10) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 31
# checking that log size (2090) is greater than 1244
ok 32
# verifying that logged content is 10 characters
ok 33
# posted content (length 99) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 34
# checking that log size (3025) is greater than 2090
ok 35
# verifying that logged content is 99 characters
ok 36
# posted content (length 250) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 37
# checking that log size (4112) is greater than 3025
ok 38
# verifying that logged content is 250 characters
ok 39
# posted content (length 255) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 40
# checking that log size (5204) is greater than 4112
ok 41
# verifying that logged content is 255 characters
ok 42
# posted content (length 256) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 43
# checking that log size (6297) is greater than 5204
ok 44
# verifying that logged content is 256 characters
ok 45
# posted content (length 257) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 46
# checking that log size (7390) is greater than 6297
ok 47
# verifying that logged content is 256 characters
ok 48
# posted content (length 258) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 49
# checking that log size (8483) is greater than 7390
ok 50
# verifying that logged content is 256 characters
ok 51
# posted content (length 1024) to bogus-perl.pl
# got return code of: 500, expecting: 500
ok 52
# verifying log did not increase in size...
ok 53
# verifying that logged content is 256 characters
# no log line found with 256 '8' characters
# log is:
'# %% [Wed Jan 18 05:24:26 2012] GET /modules/cgi/acceptpathinfooff.sh/foo
HTTP/1.1
%% 404 /home/minfrin/httpd-test/t/htdocs/modules/cgi/acceptpathinfooff.sh
%error
AH01266: AcceptPathInfo off disallows user's path
%% [Wed Jan 18 05:24:27 2012] GET /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:27 2012] GET /modules/cgi/bogus-sh.sh HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-sh.sh
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
%response
sh cgi
%% [Wed Jan 18 05:24:34 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 10
Content-Type: application/x-www-form-urlencoded
1111111111
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:34 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 99
Content-Type: application/x-www-form-urlencoded
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:34 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 250
Content-Type: application/x-www-form-urlencoded
3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:35 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 255
Content-Type: application/x-www-form-urlencoded
444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:35 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 256
Content-Type: application/x-www-form-urlencoded
5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:35 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 257
Content-Type: application/x-www-form-urlencoded
6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
%% [Wed Jan 18 05:24:36 2012] POST /modules/cgi/bogus-perl.pl HTTP/1.1
%% 500 /home/minfrin/httpd-test/t/htdocs/modules/cgi/bogus-perl.pl
%request
TE: deflate,gzip;q=0.3
Connection: TE, close
Host: localhost.localdomain:8529
User-Agent: libwww-perl/6.03
Content-Length: 258
Content-Type: application/x-www-form-urlencoded
7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777
%response
perl cgi r.uri = "/modules/lua/hello.lua"
return apache2.DECLINED
end
return apache2.DECLINED
end
function translate_name2(r)
r:debug("translate_name2: " .. r.uri)
local query = r:parseargs()
if (query.ok) then
r:debug("will return OK")
end
if query.translateme then
r.uri = "/modules/lua/hello2.lua"
if query.ok then
r.filename= r.document_root .. r.uri
return apache2.OK
end
end
return apache2.DECLINED
end
'
not ok 54
# Failed test 54 in t/modules/cgi.t at line 222
# verifying log is greater than 8192 bytes.
ok 55
# verifying log did not grow after making bogus request.
ok 56
# verifying log did not grow after making another bogus request.
ok 57
# checking that HEAD /modules/cgi/perl.pl returns 200.
ok 58
Failed 1/58 subtests
Test Summary Report
-------------------
t/modules/cgi.t (Wstat: 0 Tests: 58 Failed: 1)
Failed test: 54
Files=1, Tests=58, 23 wallclock secs ( 0.40 usr 0.34 sys + 3.03 cusr 5.41
csys = 9.18 CPU)
Result: FAIL
Failed 1/1 test programs. 1/58 subtests failed.
Regards,
Graham
--
smime.p7s
Description: S/MIME cryptographic signature
