(This page was automatically generated by the tools in the opsboy project on 18:49:45 05-Jul-2020 GMT.)

Detailed Test Report for lua-resty-core in linux x86_64 (hv)

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
bdcc16bb 2020-02-08 01:19:12 GMT 0 246 74 8326 985 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 0e646b54

OpenSSL

OpenSSL 1.1.1d 10 Sep 2019

Compilation Errors

Unexpected Failures

(none)

Expected Failures

File Name Details
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2020/02/08 09:34:17 [notice] 28546\#0: start worker processes log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *233 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *234 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *235 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *236 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *237 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *238 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *239 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *240 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *241 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2020/02/08 09:34:17 [notice] 28546#0: start worker processes
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *233 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *234 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *235 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *236 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *237 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *238 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *239 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *240 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *241 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *242 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *243 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *244 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *245 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *246 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *247 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *248 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *249 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *250 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:17 [info] 28807\#0: *251 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *242 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *243 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *244 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *245 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *246 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *247 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *248 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *249 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *250 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:17 [info] 28807#0: *251 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 30: ringbuf sentinel bug1 - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
log lines: \#2
-AAA
+aaa
aaa
'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2020/02/08 09:34:20 [notice] 28546\#0: start worker processes log level:7 log body:2020/02/08 09:34:20 [info] 28947\#0: *358 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:20 [info] 28947\#0: *359 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:20 [info] 28947\#0: *360 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:20 [info] 28947\#0: *361 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:20 [info] 28947\#0: *362 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *363 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *364 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *365 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *366 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *367 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *368 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *369 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *370 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *371 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *372 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *373 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *374 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *375 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *376 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2020/02/08 09:34:20 [notice] 28546#0: start worker processes
log level:7
log body:2020/02/08 09:34:20 [info] 28947#0: *358 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:20 [info] 28947#0: *359 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:20 [info] 28947#0: *360 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:20 [info] 28947#0: *361 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:20 [info] 28947#0: *362 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *363 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *364 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *365 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *366 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *367 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *368 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *369 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *370 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *371 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *372 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *373 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *374 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *375 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *376 client 127.0.0.1 closed keepalive connection
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#3 log level:7 log body:2020/02/08 09:34:21 [info] 28947\#0: *377 client 127.0.0.1 closed keepalive connection log level:4 log body:2020/02/08 09:34:21 [error] 28947\#0: *378 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2020/02/08 09:34:21 [error] 28947\#0: *379 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" end maybe log lines: \#3 end) 'maybe log lines: #3
log level:7
log body:2020/02/08 09:34:21 [info] 28947#0: *377 client 127.0.0.1 closed keepalive connection
log level:4
log body:2020/02/08 09:34:21 [error] 28947#0: *378 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2020/02/08 09:34:21 [error] 28947#0: *379 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #3
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
log lines: \#18
-log lines: \#8
+log lines: \#10
'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2020/02/08 09:34:25 [notice] 28974\#0: start worker processes log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *82 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *83 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *84 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *85 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *86 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *87 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *88 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *89 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *90 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2020/02/08 09:34:25 [notice] 28974#0: start worker processes
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *82 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *83 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *84 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *85 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *86 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *87 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *88 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *89 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *90 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *91 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *92 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *93 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *94 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *95 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *96 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *97 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *98 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *99 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/08 09:34:26 [info] 29067\#0: *100 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *91 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *92 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *93 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *94 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *95 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *96 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *97 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *98 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *99 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/08 09:34:26 [info] 29067#0: *100 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154468.874 log body: 2020/02/08 09:34:28 [error] 29181\#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154468.874
log body: 2020/02/08 09:34:28 [error] 29181#0: *202 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1581154469.205 log body: 2020/02/08 09:34:29 [error] 29181\#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1581154469.205
log body: 2020/02/08 09:34:29 [error] 29181#0: *203 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "failed to get OCSP responder: issuer certificate not next to leaf" should match a line in error.log (req 0)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 4: get OCSP responder (issuer cert not next to the leaf cert) - pattern "failed to get OCSP responder: issuer certificate not next to leaf" should match a line in error.log (req 1)
ocsp.t TEST 10: validate good OCSP response - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 10: validate good OCSP response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 10: validate good OCSP response - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 10: validate good OCSP response - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 10: validate good OCSP response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 10: validate good OCSP response - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 1)
ocsp.t TEST 17: no status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:35:39 [emerg] 30462\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:35:39 [notice] 30462\#0: start worker processes
2020/02/08 09:35:39 [debug] 30462\#0: channel 3:5
2020/02/08 09:35:39 [notice] 30462\#0: start worker process 30558
2020/02/08 09:35:39 [debug] 30462\#0: pass channel s:0 pid:30558 fd:3 to s:1 pid:30529 fd:4
2020/02/08 09:35:39 [debug] 30529\#0: epoll: fd:8 ev:0001 d:00000000097311A0
2020/02/08 09:35:39 [debug] 30529\#0: channel handler
2020/02/08 09:35:39 [debug] 30529\#0: channel: 32
2020/02/08 09:35:39 [debug] 30529\#0: channel command: 1
2020/02/08 09:35:39 [debug] 30529\#0: get channel s:0 pid:30558 fd:5
'
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "failed to validate OCSP response: certificate status "revoked" in the OCSP response" should match a line in error.log (req 0)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 15: fail to validate OCSP response - OCSP response returns revoked status - pattern "failed to validate OCSP response: certificate status "revoked" in the OCSP response" should match a line in error.log (req 1)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "failed to validate OCSP response: OCSP_basic_verify() failed" should match a line in error.log (req 0)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 14: fail to validate OCSP response - OCSP response signed by an unknown cert and the OCSP response does not contain the unknown cert - pattern "failed to validate OCSP response: OCSP_basic_verify() failed" should match a line in error.log (req 1)
ocsp.t TEST 8: create OCSP request (empty string cert chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 8: create OCSP request (empty string cert chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 8: create OCSP request (empty string cert chain) - pattern "failed to create OCSP request: d2i_X509_bio() failed" should match a line in error.log (req 0)
ocsp.t TEST 8: create OCSP request (empty string cert chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ocsp.t TEST 8: create OCSP request (empty string cert chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 8: create OCSP request (empty string cert chain) - pattern "failed to create OCSP request: d2i_X509_bio() failed" should match a line in error.log (req 1)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 13: validate OCSP response - OCSP response signed by an unknown cert and the OCSP response contains the unknown cert - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 12: validate good OCSP response - no certs in response - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 12: validate good OCSP response - no certs in response - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 12: validate good OCSP response - no certs in response - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 1)
ocsp.t TEST 16: good status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:35:47 [emerg] 30462\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:35:47 [notice] 30462\#0: start worker processes
2020/02/08 09:35:47 [debug] 30462\#0: channel 4:6
2020/02/08 09:35:47 [notice] 30462\#0: start worker process 30819
2020/02/08 09:35:47 [debug] 30462\#0: pass channel s:1 pid:30819 fd:4 to s:0 pid:30790 fd:3
2020/02/08 09:35:48 [debug] 30790\#0: epoll: fd:5 ev:0001 d:0000000008824720
2020/02/08 09:35:48 [debug] 30790\#0: channel handler
2020/02/08 09:35:48 [debug] 30790\#0: channel: 32
2020/02/08 09:35:48 [debug] 30790\#0: channel command: 1
2020/02/08 09:35:48 [debug] 30790\#0: get channel s:1 pid:30819 fd:6
'
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "failed to create OCSP request: no issuer certificate in chain" should match a line in error.log (req 0)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 9: create OCSP request (no issuer cert in the chain) - pattern "failed to create OCSP request: no issuer certificate in chain" should match a line in error.log (req 1)
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 1)
process-type-hup.t TEST 1: sanity - pattern "init_worker_by_lua:6: process type: privileged" should match a line in error.log (req 0) Looks like you failed 1 test of 8.
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
request.t TEST 7: ngx.req.start_time() - response_body - response is expected (repeated req 0, req 0) got: "true\x{0a}>= 0.099: true\x{0a}< 0.11: false\x{0a}"
length: 34
expected: "true\x{0a}>= 0.099: true\x{0a}< 0.11: true\x{0a}"
length: 33
strings begin to differ at char 29 (line 3 column 9)
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
+sem: timeout,
'
semaphore.t TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:04 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:04 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:04 [debug] 6557\#0: *342 event timer add: 0: 1000:30201980
2020/02/08 09:41:04 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:04 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:04 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:04 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:04 [debug] 6557\#0: worker cycle
2020/02/08 09:41:04 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:04 [debug] 6617\#0: http lua semaphore wait: 0000000009B1AEA8, timeout: 1000, resources: 0, event posted: 0
'
semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:05 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:05 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:05 [debug] 6557\#0: *342 event timer add: 0: 1000:30202980
2020/02/08 09:41:05 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:05 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:05 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:05 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:05 [debug] 6557\#0: worker cycle
2020/02/08 09:41:05 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:05 [debug] 6176\#0: malloc: 00000000089708A0:2048
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:06 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:06 [error] 6557\#0: *342 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/02/08 09:41:06 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:06 [debug] 6557\#0: *342 event timer add: 0: 1000:30203980
2020/02/08 09:41:06 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:06 [debug] 6557\#0: worker cycle
2020/02/08 09:41:06 [debug] 6557\#0: epoll timer: 1000
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:06 [error] 6557\#0: *342 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/02/08 09:41:06 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:06 [debug] 6557\#0: *342 event timer add: 0: 1000:30203980
2020/02/08 09:41:06 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:06 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:06 [debug] 6557\#0: worker cycle
2020/02/08 09:41:06 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:06 [debug] 6704\#0: epoll: fd:6 ev:0001 d:000000000897B480
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:07 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:07 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:07 [debug] 6557\#0: *342 event timer add: 0: 1000:30204980
2020/02/08 09:41:07 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:07 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:07 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:07 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:07 [debug] 6557\#0: worker cycle
2020/02/08 09:41:07 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:07 [debug] 6733\#0: epoll: fd:6 ev:0001 d:00000000084BBE50
'
semaphore.t TEST 9: semaphore in set_by_lua (wait is not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: 1,
sem: API disabled in the context of set_by_lua*,
+sem: timeout,
'
semaphore.t TEST 10: semaphore in rewrite_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:13 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:13 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:13 [debug] 6557\#0: *342 event timer add: 0: 1000:30210984
2020/02/08 09:41:13 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:13 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:13 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:13 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:13 [debug] 6557\#0: worker cycle
'
semaphore.t TEST 30: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:14 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:14 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:14 [debug] 6557\#0: *342 event timer add: 0: 1000:30211984
2020/02/08 09:41:14 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:14 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:14 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:14 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:14 [debug] 6557\#0: worker cycle
2020/02/08 09:41:14 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:14 [debug] 6994\#0: malloc: 0000000008573E50:24
'
semaphore.t TEST 31: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:15 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:15 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:15 [debug] 6557\#0: *342 event timer add: 0: 1000:30212984
2020/02/08 09:41:15 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:15 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:15 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:15 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:15 [debug] 6557\#0: worker cycle
2020/02/08 09:41:15 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:15 [debug] 7023\#0: epoll: fd:6 ev:0001 d:00000000090289F0
'
semaphore.t TEST 27: kill a light thread that is waiting on a semaphore (after post) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:16 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:16 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:16 [debug] 6557\#0: *342 event timer add: 0: 1000:30213988
2020/02/08 09:41:16 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:16 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:16 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:16 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:16 [debug] 6557\#0: worker cycle
2020/02/08 09:41:16 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:16 [debug] 7052\#0: timer delta: 64
'
semaphore.t TEST 4: basic semaphore in subrequest - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:17 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:17 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:17 [debug] 6557\#0: *342 event timer add: 0: 1000:30214992
2020/02/08 09:41:17 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:17 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:17 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:17 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:17 [debug] 6557\#0: worker cycle
2020/02/08 09:41:17 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:17 [debug] 7081\#0: epoll: fd:6 ev:0001 d:0000000009AC8530
'
semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:18 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:18 [error] 6557\#0: *342 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/02/08 09:41:18 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:18 [debug] 6557\#0: *342 event timer add: 0: 1000:30215992
2020/02/08 09:41:18 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:18 [debug] 6557\#0: worker cycle
2020/02/08 09:41:18 [debug] 6557\#0: epoll timer: 1000
'
semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:18 [error] 6557\#0: *342 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/02/08 09:41:18 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:18 [debug] 6557\#0: *342 event timer add: 0: 1000:30215992
2020/02/08 09:41:18 [debug] 6557\#0: http lua semaphore wait yielding
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua resume returned 1
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua thread yielded
2020/02/08 09:41:18 [debug] 6557\#0: *342 lua run thread returned -2
2020/02/08 09:41:18 [debug] 6557\#0: worker cycle
2020/02/08 09:41:18 [debug] 6557\#0: epoll timer: 1000
2020/02/08 09:41:18 [notice] 6176\#0: signal 17 (SIGCHLD) received from 7110
'
semaphore.t TEST 23: semaphore post in set_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:41:19 [error] 6557\#0: *342 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:41:19 [debug] 7168\#0: *896 recv: fd:4 0 of 1024
2020/02/08 09:41:19 [info] 7168\#0: *896 client 127.0.0.1 closed keepalive connection
2020/02/08 09:41:19 [debug] 7168\#0: *896 close http connection: 4
2020/02/08 09:41:19 [debug] 7168\#0: *896 event timer del: 4: 30283992
2020/02/08 09:41:19 [debug] 7168\#0: *896 reusable connection: 0
2020/02/08 09:41:19 [debug] 7168\#0: *896 free: 000000000894C950, unused: 0
2020/02/08 09:41:19 [debug] 6557\#0: http lua semaphore wait: 000000000A04D058, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:41:19 [debug] 7168\#0: *896 free: 0000000008EA0FF0, unused: 0
2020/02/08 09:41:19 [debug] 7168\#0: *896 free: 0000000008E70A60, unused: 0
'
semaphore.t TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to get ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to get ttl: not found
'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - grep_error_log_out (req 1) ''
doesn't match '(?^s:ssl_session_fetch_by_lua_block:4: session id: [a-fA-f\d]+)'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - grep_error_log_out (req 0) ''
doesn't match '(?^s:^ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+$)'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 4: attempt to resume a corrupted session - grep_error_log_out (req 1) ''
doesn't match '(?^s:^ssl_session_fetch_by_lua_block:4: session id: [a-fA-F\d]+
failed to resume session: failed to de-serialize session
ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+
$)'
ssl-session-fetch.t TEST 3: store new session, and resume it - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 3: store new session, and resume it - grep_error_log_out (req 0) ''
doesn't match '(?^s:ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+)'
ssl-session-fetch.t TEST 3: store new session, and resume it - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 3: store new session, and resume it - grep_error_log_out (req 1) ''
doesn't match '(?^s:ssl_session_fetch_by_lua_block:4: session id: [a-fA-F\d]+)'
ssl-session-fetch.t TEST 5: yield during doing handshake with client which uses low version OpenSSL - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:42:40 [emerg] 9217\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:42:40 [notice] 9217\#0: start worker processes
2020/02/08 09:42:40 [debug] 9217\#0: channel 3:5
2020/02/08 09:42:40 [notice] 9217\#0: start worker process 9313
2020/02/08 09:42:40 [debug] 9217\#0: pass channel s:0 pid:9313 fd:3 to s:1 pid:9284 fd:4
2020/02/08 09:42:40 [debug] 9284\#0: epoll: fd:8 ev:0001 d:0000000009423060
2020/02/08 09:42:40 [debug] 9284\#0: channel handler
2020/02/08 09:42:40 [debug] 9284\#0: channel: 32
2020/02/08 09:42:40 [debug] 9284\#0: channel command: 1
2020/02/08 09:42:40 [debug] 9284\#0: get channel s:0 pid:9313 fd:5
'
ssl-session-store.t TEST 2: get new session id serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 2: get new session id serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session id: [a-fA-f\d]+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 2: get new session id serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 2: get new session id serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session id: [a-fA-f\d]+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 1: get new session serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 1: get new session serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session size: \d+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 1: get new session serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 1: get new session serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session size: \d+)" should match a line in error.log (req 1)
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 0)
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:42:55 [crit] 9509\#0: *97 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) 2020/02/08 09:42:55 [debug] 9509\#0: *97 reusable connection: 0
2020/02/08 09:42:55 [debug] 9509\#0: *97 malloc: 00000000097769D0:24
2020/02/08 09:42:55 [debug] 9509\#0: *97 malloc: 0000000009776A30:16
2020/02/08 09:42:55 [debug] 9509\#0: *97 http cleanup add: 00000000097769D0
2020/02/08 09:42:55 [debug] 9509\#0: *97 lua tcp socket connect: -5
2020/02/08 09:42:55 [debug] 9509\#0: *97 lua tcp socket error retval handler
2020/02/08 09:42:55 [debug] 9509\#0: *97 lua finalize socket
2020/02/08 09:42:55 [debug] 9509\#0: *97 lua http cleanup free: 00000000097769D0
2020/02/08 09:42:55 [debug] 9509\#0: *97 malloc: 0000000009776B00:16
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 1)
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:42:55 [crit] 9509\#0: *99 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) 2020/02/08 09:42:55 [debug] 9509\#0: *99 reusable connection: 0
2020/02/08 09:42:55 [debug] 9509\#0: *99 malloc: 000000000977A490:24
2020/02/08 09:42:55 [debug] 9509\#0: *99 malloc: 000000000977A4F0:16
2020/02/08 09:42:55 [debug] 9509\#0: *99 http cleanup add: 000000000977A490
2020/02/08 09:42:55 [debug] 9509\#0: *99 lua tcp socket connect: -5
2020/02/08 09:42:55 [debug] 9509\#0: *99 lua tcp socket error retval handler
2020/02/08 09:42:55 [debug] 9509\#0: *99 lua finalize socket
2020/02/08 09:42:55 [debug] 9509\#0: *99 lua http cleanup free: 000000000977A490
2020/02/08 09:42:55 [debug] 9509\#0: *99 malloc: 000000000977A540:16
'
ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 14: ngx.semaphore in ssl_certificate_by_lua* - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:42:56 [emerg] 9442\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:42:56 [notice] 9442\#0: start worker processes
2020/02/08 09:42:56 [debug] 9442\#0: channel 4:6
2020/02/08 09:42:56 [notice] 9442\#0: start worker process 9567
2020/02/08 09:42:56 [debug] 9442\#0: pass channel s:1 pid:9567 fd:4 to s:0 pid:9538 fd:3
2020/02/08 09:42:56 [debug] 9538\#0: epoll: fd:5 ev:0001 d:000000000861EA10
2020/02/08 09:42:56 [debug] 9538\#0: channel handler
2020/02/08 09:42:56 [debug] 9538\#0: channel: 32
2020/02/08 09:42:56 [debug] 9538\#0: channel command: 1
2020/02/08 09:42:56 [debug] 9538\#0: get channel s:1 pid:9567 fd:6
'
ssl.t TEST 2: set DER cert and private key - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 2: set DER cert and private key - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 2: set DER cert and private key - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 2: set DER cert and private key - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 8: set DER cert chain - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 8: set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 8: set DER cert chain - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 8: set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:43:00 [emerg] 9442\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:43:00 [notice] 9442\#0: start worker processes
2020/02/08 09:43:00 [debug] 9442\#0: channel 4:6
2020/02/08 09:43:00 [notice] 9442\#0: start worker process 9683
2020/02/08 09:43:00 [debug] 9442\#0: pass channel s:1 pid:9683 fd:4 to s:0 pid:9654 fd:3
2020/02/08 09:43:00 [debug] 9654\#0: epoll: fd:5 ev:0001 d:000000000881BE90
2020/02/08 09:43:00 [debug] 9654\#0: channel handler
2020/02/08 09:43:00 [debug] 9654\#0: channel: 32
2020/02/08 09:43:00 [debug] 9654\#0: channel command: 1
2020/02/08 09:43:00 [debug] 9654\#0: get channel s:1 pid:9683 fd:6
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 11: tls version - TLSv1 - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:43:03 [emerg] 9442\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:43:03 [notice] 9442\#0: start worker processes
2020/02/08 09:43:03 [debug] 9442\#0: channel 3:5
2020/02/08 09:43:03 [notice] 9442\#0: start worker process 9770
2020/02/08 09:43:03 [debug] 9442\#0: pass channel s:0 pid:9770 fd:3 to s:1 pid:9741 fd:4
2020/02/08 09:43:03 [debug] 9741\#0: epoll: fd:6 ev:0001 d:00000000084A9600
2020/02/08 09:43:03 [debug] 9741\#0: channel handler
2020/02/08 09:43:03 [debug] 9741\#0: channel: 32
2020/02/08 09:43:03 [debug] 9741\#0: channel command: 1
2020/02/08 09:43:03 [debug] 9741\#0: get channel s:0 pid:9770 fd:5
'
ssl.t TEST 1: clear certs - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 1: clear certs - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 1: clear certs - pattern "sslv3 alert handshake failure" should match a line in error.log (req 0)
ssl.t TEST 1: clear certs - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 1: clear certs - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 1: clear certs - pattern "sslv3 alert handshake failure" should match a line in error.log (req 1)
ssl.t TEST 10: tls version - SSLv3 - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:43:08 [emerg] 9442\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:43:08 [notice] 9442\#0: start worker processes
2020/02/08 09:43:08 [debug] 9442\#0: channel 3:5
2020/02/08 09:43:08 [notice] 9442\#0: start worker process 9886
2020/02/08 09:43:08 [debug] 9442\#0: pass channel s:0 pid:9886 fd:3 to s:1 pid:9857 fd:4
2020/02/08 09:43:09 [debug] 9857\#0: epoll: fd:6 ev:0001 d:00000000097FEAE0
2020/02/08 09:43:09 [debug] 9857\#0: channel handler
2020/02/08 09:43:09 [debug] 9857\#0: channel: 32
2020/02/08 09:43:09 [debug] 9857\#0: channel command: 1
2020/02/08 09:43:09 [debug] 9857\#0: get channel s:0 pid:9886 fd:5
'
ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 15: read PEM key chain but set DER key chain - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 15: read PEM key chain but set DER key chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 0)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 1)
stream/errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
stream/errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:4
'
expected: 'log lines:3
'
stream/errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:3
'
expected: 'log lines:2
'
stream/errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#2 log level:6 log body:2020/02/08 09:44:21 [notice] 11061\#0: start worker processes log level:4 log body:2020/02/08 09:44:21 [error] 11360\#0: *333 stream [lua] content_by_lua(nginx.conf:75):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2020/02/08 09:44:21 [notice] 11061#0: start worker processes
log level:4
log body:2020/02/08 09:44:21 [error] 11360#0: *333 stream [lua] content_by_lua(nginx.conf:75):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
end
maybe log lines: #2
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
end
maybe log lines: #1
end
\z)'
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2020/02/08 09:44:22 [notice] 11061\#0: start worker processes log level:4 log body:2020/02/08 09:44:22 [error] 11389\#0: *363 stream [lua] content_by_lua(nginx.conf:67):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #2
log level:6
log body:2020/02/08 09:44:22 [notice] 11061#0: start worker processes
log level:4
log body:2020/02/08 09:44:22 [error] 11389#0: *363 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:9818 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:1
$)'
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 1) 'client 127.0.0.1:9822 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/semaphore.t TEST 29: basic semaphore count (negative number) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:46:59 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2020/02/08 09:46:59 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:46:59 [debug] 15188\#0: *618 event timer add: 0: 1000:30557189
2020/02/08 09:46:59 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:46:59 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:46:59 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:46:59 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:46:59 [debug] 15188\#0: worker cycle
2020/02/08 09:46:59 [debug] 15188\#0: epoll timer: 1000
2020/02/08 09:46:59 [debug] 15217\#0: epoll: fd:7 ev:0001 d:000000000983A9A0
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
'
stream/semaphore.t TEST 28: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:47:01 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:47:01 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/02/08 09:47:01 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:47:01 [debug] 15188\#0: *618 event timer add: 0: 1000:30559193
2020/02/08 09:47:01 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:47:01 [debug] 15188\#0: worker cycle
'
stream/semaphore.t TEST 28: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:47:01 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/02/08 09:47:01 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:47:01 [debug] 15188\#0: *618 event timer add: 0: 1000:30559193
2020/02/08 09:47:01 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:47:01 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:47:01 [debug] 15188\#0: worker cycle
'
stream/semaphore.t TEST 16: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:47:04 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:47:04 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/02/08 09:47:04 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:47:04 [debug] 15188\#0: *618 event timer add: 0: 1000:30562193
2020/02/08 09:47:04 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:47:04 [debug] 15188\#0: worker cycle
2020/02/08 09:47:04 [debug] 15188\#0: epoll timer: 1000
'
stream/semaphore.t TEST 16: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:47:04 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/02/08 09:47:04 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:47:04 [debug] 15188\#0: *618 event timer add: 0: 1000:30562193
2020/02/08 09:47:04 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:47:04 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:47:04 [debug] 15188\#0: worker cycle
2020/02/08 09:47:04 [debug] 15188\#0: epoll timer: 1000
2020/02/08 09:47:04 [debug] 15362\#0: *820 lua run thread returned 0
'
stream/semaphore.t TEST 7: semaphore in init_worker_by_lua (new and post) - pattern "[error]" should not match any line in error.log but matches line "2020/02/08 09:47:05 [error] 15188\#0: *618 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/08 09:47:05 [debug] 15188\#0: stream lua semaphore wait: 000000000A2A22D8, timeout: 1000, resources: 0, event posted: 0
2020/02/08 09:47:05 [debug] 15188\#0: *618 event timer add: 0: 1000:30563193
2020/02/08 09:47:05 [debug] 15188\#0: stream lua semaphore wait yielding
2020/02/08 09:47:05 [debug] 15188\#0: *618 lua resume returned 1
2020/02/08 09:47:05 [debug] 15188\#0: *618 lua thread yielded
2020/02/08 09:47:05 [debug] 15188\#0: *618 lua run thread returned -2
2020/02/08 09:47:05 [debug] 15188\#0: worker cycle
2020/02/08 09:47:05 [debug] 15188\#0: epoll timer: 1000
2020/02/08 09:47:05 [debug] 14597\#0: lua initialize the global Lua VM 000000000908F280
'
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "(?^:\[error\] .*? failed to parse pem key: PEM_read_bio_PrivateKey\(\) failed)" should match a line in error.log (req 0)
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:05 [crit] 16858\#0: *39 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 0) 2020/02/08 09:48:05 [debug] 16858\#0: *39 reusable connection: 0
2020/02/08 09:48:05 [debug] 16858\#0: *39 malloc: 0000000008FBA220:24
2020/02/08 09:48:05 [debug] 16858\#0: *39 malloc: 0000000008FBA280:16
2020/02/08 09:48:05 [debug] 16858\#0: *39 stream cleanup add: 0000000008FBA220
2020/02/08 09:48:05 [debug] 16858\#0: *39 stream lua tcp socket connect: -5
2020/02/08 09:48:05 [debug] 16858\#0: *39 stream lua tcp socket error retval handler
2020/02/08 09:48:05 [debug] 16858\#0: *39 stream lua finalize socket
2020/02/08 09:48:05 [debug] 16858\#0: *39 lua stream cleanup free: 0000000008FBA220
2020/02/08 09:48:05 [debug] 16858\#0: *39 malloc: 0000000008FBA350:16
'
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "(?^:\[error\] .*? failed to parse pem key: PEM_read_bio_PrivateKey\(\) failed)" should match a line in error.log (req 1)
stream/ssl.t TEST 19: parse PEM cert and key to cdata (bad priv key) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:05 [crit] 16858\#0: *43 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 1) 2020/02/08 09:48:05 [debug] 16858\#0: *43 reusable connection: 0
2020/02/08 09:48:05 [debug] 16858\#0: *43 malloc: 0000000008FC06D0:24
2020/02/08 09:48:05 [debug] 16858\#0: *43 malloc: 0000000008FC0730:16
2020/02/08 09:48:05 [debug] 16858\#0: *43 stream cleanup add: 0000000008FC06D0
2020/02/08 09:48:05 [debug] 16858\#0: *43 stream lua tcp socket connect: -5
2020/02/08 09:48:05 [debug] 16858\#0: *43 stream lua tcp socket error retval handler
2020/02/08 09:48:05 [debug] 16858\#0: *43 stream lua finalize socket
2020/02/08 09:48:05 [debug] 16858\#0: *43 lua stream cleanup free: 0000000008FC06D0
2020/02/08 09:48:05 [debug] 16858\#0: *43 malloc: 0000000008FC0780:16
'
stream/ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 2: set DER cert and private key - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 2: set DER cert and private key - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 2: set DER cert and private key - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 2: set DER cert and private key - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "read SNI name from Lua: test.com" should match a line in error.log (req 0)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "read SNI name from Lua: test.com" should match a line in error.log (req 1)
stream/ssl.t TEST 12: tls version - TLSv1.1 - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:48:07 [emerg] 16848\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:48:07 [notice] 16848\#0: start worker processes
2020/02/08 09:48:07 [debug] 16848\#0: channel 4:6
2020/02/08 09:48:07 [notice] 16848\#0: start worker process 16973
2020/02/08 09:48:07 [debug] 16848\#0: pass channel s:1 pid:16973 fd:4 to s:0 pid:16944 fd:3
2020/02/08 09:48:07 [debug] 16944\#0: epoll: fd:5 ev:0001 d:00000000085968C0
2020/02/08 09:48:07 [debug] 16944\#0: channel handler
2020/02/08 09:48:07 [debug] 16944\#0: channel: 32
2020/02/08 09:48:07 [debug] 16944\#0: channel command: 1
2020/02/08 09:48:07 [debug] 16944\#0: get channel s:1 pid:16973 fd:9
'
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 0)
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:14 [crit] 17089\#0: *311 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 0) 2020/02/08 09:48:14 [debug] 17089\#0: *311 reusable connection: 0
2020/02/08 09:48:14 [debug] 17089\#0: *311 malloc: 0000000009C73F50:24
2020/02/08 09:48:14 [debug] 17089\#0: *311 malloc: 0000000009C77A90:16
2020/02/08 09:48:14 [debug] 17089\#0: *311 stream cleanup add: 0000000009C73F50
2020/02/08 09:48:14 [debug] 17089\#0: *311 stream lua tcp socket connect: -5
2020/02/08 09:48:14 [debug] 17089\#0: *311 stream lua tcp socket error retval handler
2020/02/08 09:48:14 [debug] 17089\#0: *311 stream lua finalize socket
2020/02/08 09:48:14 [debug] 17089\#0: *311 lua stream cleanup free: 0000000009C73F50
2020/02/08 09:48:14 [debug] 17089\#0: *311 malloc: 0000000009C7E5B0:16
'
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 1)
stream/ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:14 [crit] 17089\#0: *315 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 1) 2020/02/08 09:48:14 [debug] 17089\#0: *315 reusable connection: 0
2020/02/08 09:48:14 [debug] 17089\#0: *315 malloc: 0000000009C7FFF0:24
2020/02/08 09:48:14 [debug] 17089\#0: *315 malloc: 0000000009BAE400:16
2020/02/08 09:48:14 [debug] 17089\#0: *315 stream cleanup add: 0000000009C7FFF0
2020/02/08 09:48:14 [debug] 17089\#0: *315 stream lua tcp socket connect: -5
2020/02/08 09:48:14 [debug] 17089\#0: *315 stream lua tcp socket error retval handler
2020/02/08 09:48:14 [debug] 17089\#0: *315 stream lua finalize socket
2020/02/08 09:48:14 [debug] 17089\#0: *315 lua stream cleanup free: 0000000009C7FFF0
2020/02/08 09:48:14 [debug] 17089\#0: *315 malloc: 0000000009BB10D0:16
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 16: parse PEM cert and key to cdata - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 16: parse PEM cert and key to cdata - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:48:15 [emerg] 16848\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:48:15 [notice] 16848\#0: start worker processes
2020/02/08 09:48:15 [debug] 16848\#0: channel 4:6
2020/02/08 09:48:15 [notice] 16848\#0: start worker process 17147
2020/02/08 09:48:15 [debug] 16848\#0: pass channel s:1 pid:17147 fd:4 to s:0 pid:17118 fd:3
2020/02/08 09:48:15 [debug] 17118\#0: epoll: fd:5 ev:0001 d:0000000008C1D510
2020/02/08 09:48:15 [debug] 17118\#0: channel handler
2020/02/08 09:48:15 [debug] 17118\#0: channel: 32
2020/02/08 09:48:15 [debug] 17118\#0: channel command: 1
2020/02/08 09:48:15 [debug] 17118\#0: get channel s:1 pid:17147 fd:6
'
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 0)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 5: read raw server addr via ssl.raw_server_addr() (unix domain socket) - pattern "(?^:Using unix socket file .*?nginx\.sock)" should match a line in error.log (req 1)
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 0)
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:24 [crit] 17329\#0: *585 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 0) 2020/02/08 09:48:24 [debug] 17329\#0: *585 reusable connection: 0
2020/02/08 09:48:24 [debug] 17329\#0: *585 malloc: 0000000009133140:24
2020/02/08 09:48:24 [debug] 17329\#0: *585 malloc: 0000000009158A30:16
2020/02/08 09:48:24 [debug] 17329\#0: *585 stream cleanup add: 0000000009133140
2020/02/08 09:48:24 [debug] 17329\#0: *585 stream lua tcp socket connect: -5
2020/02/08 09:48:24 [debug] 17329\#0: *585 stream lua tcp socket error retval handler
2020/02/08 09:48:24 [debug] 17329\#0: *585 stream lua finalize socket
2020/02/08 09:48:24 [debug] 17329\#0: *585 lua stream cleanup free: 0000000009133140
2020/02/08 09:48:24 [debug] 17329\#0: *585 malloc: 0000000009159530:16
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509\(\) failed)" should match a line in error.log (req 1)
stream/ssl.t TEST 18: parse PEM cert and key to cdata (bad cert 2 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2020/02/08 09:48:24 [crit] 17329\#0: *589 connect() to unix:/home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory), client: 127.0.0.1, server: 0.0.0.0:1985" (req 1) 2020/02/08 09:48:24 [debug] 17329\#0: *589 reusable connection: 0
2020/02/08 09:48:24 [debug] 17329\#0: *589 malloc: 0000000009576460:24
2020/02/08 09:48:24 [debug] 17329\#0: *589 malloc: 000000000962FC40:16
2020/02/08 09:48:24 [debug] 17329\#0: *589 stream cleanup add: 0000000009576460
2020/02/08 09:48:24 [debug] 17329\#0: *589 stream lua tcp socket connect: -5
2020/02/08 09:48:24 [debug] 17329\#0: *589 stream lua tcp socket error retval handler
2020/02/08 09:48:24 [debug] 17329\#0: *589 stream lua finalize socket
2020/02/08 09:48:24 [debug] 17329\#0: *589 lua stream cleanup free: 0000000009576460
2020/02/08 09:48:24 [debug] 17329\#0: *589 malloc: 0000000009670AC0:16
'
stream/ssl.t TEST 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2020/02/08 09:48:24 [emerg] 16848\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2020/02/08 09:48:24 [notice] 16848\#0: start worker processes
2020/02/08 09:48:24 [debug] 16848\#0: channel 3:5
2020/02/08 09:48:24 [notice] 16848\#0: start worker process 17358
2020/02/08 09:48:24 [debug] 16848\#0: pass channel s:0 pid:17358 fd:3 to s:1 pid:17329 fd:4
2020/02/08 09:48:24 [debug] 17329\#0: epoll: fd:6 ev:0001 d:000000000907E970
2020/02/08 09:48:24 [debug] 17329\#0: channel handler
2020/02/08 09:48:24 [debug] 17329\#0: channel: 32
2020/02/08 09:48:24 [debug] 17329\#0: channel command: 1
2020/02/08 09:48:24 [debug] 17329\#0: get channel s:0 pid:17358 fd:5
'
stream/time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'
Looks like you failed 1 test of 72.
time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'

Warnings

Go back to the index page.