(This page was automatically generated by the tools in the opsboy project on 05:23:53 23-Feb-2019 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
a11accbb 2019-02-19 19:37:32 GMT 0 226 71 8021 780 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 0e646b5

OpenSSL

OpenSSL 1.1.0j 20 Nov 2018

Compilation Errors

Unexpected Failures

(none)

Expected Failures

File Name Details
errlog-raw-log.t nginx: [error] hello world from init_by_lua
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
'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2019/02/19 21:54:42 [notice] 22224\#0: start worker processes log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *52 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *53 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *54 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *55 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *56 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *57 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *58 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *59 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *60 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2019/02/19 21:54:42 [notice] 22224#0: start worker processes
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *52 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *53 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *54 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *55 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *56 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *57 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *58 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *59 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *60 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: \#3 log level:7 log body:2019/02/19 21:54:43 [info] 22289\#0: *61 client 127.0.0.1 closed keepalive connection log level:4 log body:2019/02/19 21:54:43 [error] 22289\#0: *62 [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:2019/02/19 21:54:43 [error] 22289\#0: *63 [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 lines: #3
log level:7
log body:2019/02/19 21:54:43 [info] 22289#0: *61 client 127.0.0.1 closed keepalive connection
log level:4
log body:2019/02/19 21:54:43 [error] 22289#0: *62 [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:2019/02/19 21:54:43 [error] 22289#0: *63 [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"
'
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 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 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 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
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
'
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:2019/02/19 21:54:50 [notice] 22385\#0: start worker processes log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *38 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *39 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *40 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *41 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *42 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *43 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *44 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *45 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *46 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2019/02/19 21:54:51 [info] 22431\#0: *47 client 127.0.0.1 closed keepalive connection log level:4 log body:2019/02/19 21:54:51 [error] 22431\#0: *48 [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: #10
log level:6
log body:2019/02/19 21:54:50 [notice] 22385#0: start worker processes
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *38 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *39 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *40 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *41 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *42 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *43 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *44 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *45 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *46 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2019/02/19 21:54:51 [info] 22431#0: *47 client 127.0.0.1 closed keepalive connection
log level:4
log body:2019/02/19 21:54:51 [error] 22431#0: *48 [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
'
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 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:1
'
expected: 'log lines:0
'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2019/02/19 21:54:54 [notice] 22385\#0: start worker processes log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *144 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *145 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *146 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *147 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *148 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *149 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *150 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *151 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/02/19 21:54:54 [info] 22557\#0: *152 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2019/02/19 21:54:54 [notice] 22385#0: start worker processes
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *144 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *145 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *146 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *147 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *148 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *149 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *150 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *151 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/02/19 21:54:54 [info] 22557#0: *152 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 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 0)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2019/02/19 21:54:57 [warn] 22629\#0: *214 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) '
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 1)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2019/02/19 21:54:57 [warn] 22629\#0: *215 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) '
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317 log body: 2019/02/19 21:54:59 [error] 22683\#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [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: 1550613299.317
log body: 2019/02/19 21:54:59 [error] 22683#0: *259 [lua] content_by_lua(nginx.conf:84):8: **********37, 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")'
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 2: get OCSP responder (not found) - 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 2: get OCSP responder (not found) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 2: get OCSP responder (not found) - pattern "OCSP responder not found" should match a line in error.log (req 0)
ocsp.t TEST 2: get OCSP responder (not found) - 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 2: get OCSP responder (not found) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 2: get OCSP responder (not found) - pattern "OCSP responder not found" should match a line in error.log (req 1)
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 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 17: no status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 21:55:47 [emerg] 23250\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 21:55:47 [notice] 23250\#0: start worker processes
2019/02/19 21:55:47 [debug] 23250\#0: channel 3:5
2019/02/19 21:55:47 [notice] 23250\#0: start worker process 23347
2019/02/19 21:55:47 [debug] 23250\#0: pass channel s:0 pid:23347 fd:3 to s:1 pid:23329 fd:4
2019/02/19 21:55:47 [debug] 23329\#0: epoll: fd:8 ev:0001 d:0000000008496CD0
2019/02/19 21:55:47 [debug] 23329\#0: channel handler
2019/02/19 21:55:47 [debug] 23329\#0: channel: 32
2019/02/19 21:55:47 [debug] 23329\#0: channel command: 1
2019/02/19 21:55:47 [debug] 23329\#0: get channel s:0 pid:23347 fd:5
'
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 3: get OCSP responder (no issuer cert at all) - 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 3: get OCSP responder (no issuer cert at all) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 3: get OCSP responder (no issuer cert at all) - pattern "failed to get OCSP responder: no issuer certificate in chain" should match a line in error.log (req 0)
ocsp.t TEST 3: get OCSP responder (no issuer cert at all) - 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 3: get OCSP responder (no issuer cert at all) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 3: get OCSP responder (no issuer cert at all) - pattern "failed to get OCSP responder: no issuer certificate in chain" 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 16: good status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 21:55:51 [emerg] 23250\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 21:55:51 [debug] 23419\#0: epoll: fd:7 ev:0001 d:0000000008FDF3A0
2019/02/19 21:55:51 [debug] 23419\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097AEA60:48
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097AEAD0:16
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097AEB20:16
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097B4A70:80
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097B4B00:16
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097B4B50:15
2019/02/19 21:55:51 [debug] 23419\#0: malloc: 00000000097B4BA0:16
'
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 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 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 11: fail to validate OCSP response - no issuer 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 11: fail to validate OCSP response - no issuer cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "failed to validate OCSP response: no issuer certificate in chain" should match a line in error.log (req 0)
ocsp.t TEST 11: fail to validate OCSP response - no issuer 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 11: fail to validate OCSP response - no issuer cert - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 11: fail to validate OCSP response - no issuer cert - pattern "failed to validate OCSP response: no issuer certificate in chain" 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)
process-type-hup.t TEST 1: sanity - pattern "init_worker_by_lua:6: process type: privileged" should match a line in error.log (req 1)
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 39: basic semaphore count (negative number) - pattern "[error]" should not match any line in error.log but matches line "2019/02/19 22:00:17 [error] 28788\#0: *528 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/19 22:00:17 [debug] 28788\#0: http lua semaphore wait: 0000000009E6B128, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:00:17 [debug] 28788\#0: *528 event timer add: 0: 1000:8618882
2019/02/19 22:00:17 [debug] 28788\#0: http lua semaphore wait yielding
2019/02/19 22:00:17 [debug] 28788\#0: *528 lua resume returned 1
2019/02/19 22:00:17 [debug] 28788\#0: *528 lua thread yielded
2019/02/19 22:00:17 [debug] 28788\#0: *528 lua run thread returned -2
2019/02/19 22:00:17 [debug] 28788\#0: worker cycle
2019/02/19 22:00:17 [debug] 28788\#0: epoll timer: 1000
2019/02/19 22:00:17 [debug] 28824\#0: epoll: fd:6 ev:0001 d:0000000009338950
'
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
'
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
'
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 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 "2019/02/19 22:01:24 [emerg] 30091\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:01:24 [debug] 30099\#0: epoll: fd:7 ev:0001 d:0000000008BC7330
2019/02/19 22:01:24 [debug] 30099\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF6210:48
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF6280:16
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF62D0:16
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF6320:80
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF63B0:16
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF6400:15
2019/02/19 22:01:24 [debug] 30099\#0: malloc: 0000000008BF6450:16
'
ssl-session-fetch.t TEST 6: store new session, and resume it, avoid memory leak when calling repeatly - 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 6: store new session, and resume it, avoid memory leak when calling repeatly - 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 2: attempt to fetch new session in lua_ctx during resumption. - 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 2: attempt to fetch new session in lua_ctx during resumption. - 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 2: attempt to fetch new session in lua_ctx during resumption. - grep_error_log_out (req 1) got: ''
expected: 'get session error: bad session in lua context
'
ssl-session-store.t TEST 3: store the session via timer to memcached - 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 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:32: session id: [a-fA-f\d]+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:34: session size: \d+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:received memc reply: STORED)" should match a line in error.log (req 0)
ssl-session-store.t TEST 3: store the session via timer to memcached - 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 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:32: session id: [a-fA-f\d]+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:ssl_session_store_by_lua_block:34: session size: \d+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 3: store the session via timer to memcached - pattern "(?^s:received memc reply: STORED)" 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 11: tls version - TLSv1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:01:38 [emerg] 30239\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:01:38 [debug] 30285\#0: epoll: fd:7 ev:0001 d:000000000936A250
2019/02/19 22:01:38 [debug] 30285\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959D870:48
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959D8E0:16
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959D930:16
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959D980:80
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959DA10:16
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959DA60:15
2019/02/19 22:01:38 [debug] 30285\#0: malloc: 000000000959DAB0: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 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:01:42 [emerg] 30239\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:01:42 [notice] 30239\#0: start worker processes
2019/02/19 22:01:42 [debug] 30239\#0: channel 3:5
2019/02/19 22:01:42 [notice] 30239\#0: start worker process 30374
2019/02/19 22:01:42 [debug] 30239\#0: pass channel s:0 pid:30374 fd:3 to s:1 pid:30356 fd:4
2019/02/19 22:01:42 [debug] 30356\#0: epoll: fd:6 ev:0001 d:00000000084669C0
2019/02/19 22:01:42 [debug] 30356\#0: channel handler
2019/02/19 22:01:42 [debug] 30356\#0: channel: 32
2019/02/19 22:01:42 [debug] 30356\#0: channel command: 1
2019/02/19 22:01:42 [debug] 30356\#0: get channel s:0 pid:30374 fd:5
'
ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - 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 4: read SNI name via ssl.server_name() when no SNI name specified - pattern "read SNI name from Lua: nil, type: nil" should match a line in error.log (req 0)
ssl.t TEST 4: read SNI name via ssl.server_name() when no SNI name specified - 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 4: read SNI name via ssl.server_name() when no SNI name specified - pattern "read SNI name from Lua: nil, type: nil" should match a line in error.log (req 1)
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
'
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)
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 "2019/02/19 22:01:45 [crit] 30428\#0: *224 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) 2019/02/19 22:01:45 [debug] 30428\#0: *224 reusable connection: 0
2019/02/19 22:01:45 [debug] 30428\#0: *224 malloc: 00000000093EE430:24
2019/02/19 22:01:45 [debug] 30428\#0: *224 malloc: 00000000093EE490:16
2019/02/19 22:01:45 [debug] 30428\#0: *224 http cleanup add: 00000000093EE430
2019/02/19 22:01:45 [debug] 30428\#0: *224 lua tcp socket connect: -5
2019/02/19 22:01:45 [debug] 30428\#0: *224 lua tcp socket error retval handler
2019/02/19 22:01:45 [debug] 30428\#0: *224 lua finalize socket
2019/02/19 22:01:45 [debug] 30428\#0: *224 lua http cleanup free: 00000000093EE430
2019/02/19 22:01:45 [debug] 30428\#0: *224 malloc: 00000000093EE560:16
'
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
'
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)
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 "2019/02/19 22:01:45 [crit] 30428\#0: *226 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) 2019/02/19 22:01:45 [debug] 30428\#0: *226 reusable connection: 0
2019/02/19 22:01:45 [debug] 30428\#0: *226 malloc: 0000000009797630:24
2019/02/19 22:01:45 [debug] 30428\#0: *226 malloc: 0000000009797690:16
2019/02/19 22:01:45 [debug] 30428\#0: *226 http cleanup add: 0000000009797630
2019/02/19 22:01:45 [debug] 30428\#0: *226 lua tcp socket connect: -5
2019/02/19 22:01:45 [debug] 30428\#0: *226 lua tcp socket error retval handler
2019/02/19 22:01:45 [debug] 30428\#0: *226 lua finalize socket
2019/02/19 22:01:45 [debug] 30428\#0: *226 lua http cleanup free: 0000000009797630
2019/02/19 22:01:45 [debug] 30428\#0: *226 malloc: 00000000097976E0:16
'
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 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
'
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)
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 "2019/02/19 22:01:46 [crit] 30464\#0: *258 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) 2019/02/19 22:01:46 [debug] 30464\#0: *258 reusable connection: 0
2019/02/19 22:01:46 [debug] 30464\#0: *258 malloc: 0000000008C84610:24
2019/02/19 22:01:46 [debug] 30464\#0: *258 malloc: 0000000008706CE0:16
2019/02/19 22:01:46 [debug] 30464\#0: *258 http cleanup add: 0000000008C84610
2019/02/19 22:01:46 [debug] 30464\#0: *258 lua tcp socket connect: -5
2019/02/19 22:01:46 [debug] 30464\#0: *258 lua tcp socket error retval handler
2019/02/19 22:01:46 [debug] 30464\#0: *258 lua finalize socket
2019/02/19 22:01:46 [debug] 30464\#0: *258 lua http cleanup free: 0000000008C84610
2019/02/19 22:01:46 [debug] 30464\#0: *258 malloc: 0000000008740160:16
'
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
'
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)
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 "2019/02/19 22:01:47 [crit] 30464\#0: *260 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) 2019/02/19 22:01:47 [debug] 30464\#0: *260 reusable connection: 0
2019/02/19 22:01:47 [debug] 30464\#0: *260 malloc: 000000000873F920:24
2019/02/19 22:01:47 [debug] 30464\#0: *260 malloc: 00000000087329E0:16
2019/02/19 22:01:47 [debug] 30464\#0: *260 http cleanup add: 000000000873F920
2019/02/19 22:01:47 [debug] 30464\#0: *260 lua tcp socket connect: -5
2019/02/19 22:01:47 [debug] 30464\#0: *260 lua tcp socket error retval handler
2019/02/19 22:01:47 [debug] 30464\#0: *260 lua finalize socket
2019/02/19 22:01:47 [debug] 30464\#0: *260 lua http cleanup free: 000000000873F920
2019/02/19 22:01:47 [debug] 30464\#0: *260 malloc: 000000000873F980:16
'
ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:01:47 [emerg] 30239\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 00000000086B6220:16
2019/02/19 22:01:47 [debug] 30464\#0: *262 http set discard body
2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 0000000008737A30:80
2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 00000000086BC3B0:16
2019/02/19 22:01:47 [debug] 30464\#0: *262 headers more header filter, uri "/ver"
2019/02/19 22:01:47 [debug] 30464\#0: *262 lua capture header filter, uri "/ver"
2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 0000000008737AC0:80
2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 000000000875C230:16
2019/02/19 22:01:47 [debug] 30464\#0: *262 malloc: 000000000875C280:176
'
ssl.t TEST 14: ngx.semaphore in ssl_certificate_by_lua* - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:01:50 [emerg] 30239\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:01:50 [debug] 30526\#0: *323 rewrite phase: 1
2019/02/19 22:01:50 [debug] 30526\#0: *323 rewrite phase: 2
2019/02/19 22:01:50 [debug] 30526\#0: *323 test location: "/ver"
2019/02/19 22:01:50 [debug] 30526\#0: *323 using configuration "=/ver"
2019/02/19 22:01:50 [debug] 30526\#0: *323 http cl:-1 max:1048576
2019/02/19 22:01:50 [debug] 30526\#0: *323 rewrite phase: 4
2019/02/19 22:01:50 [debug] 30526\#0: *323 rewrite phase: 5
2019/02/19 22:01:50 [debug] 30526\#0: *323 malloc: 0000000009062520:88
2019/02/19 22:01:50 [debug] 30526\#0: *323 malloc: 0000000009072930:16
'
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-raw-log.t nginx: [error] hello world from init_by_lua
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 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:5250 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:5254 connected to
capture log line:4
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
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 TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2019/02/19 22:02:39 [notice] 31328\#0: start worker processes log level:4 log body:2019/02/19 22:02:39 [error] 31354\#0: *41 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:2019/02/19 22:02:39 [notice] 31328#0: start worker processes
log level:4
log body:2019/02/19 22:02:39 [error] 31354#0: *41 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 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 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:2019/02/19 22:02:45 [notice] 31371\#0: start worker processes log level:4 log body:2019/02/19 22:02:45 [error] 31451\#0: *98 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:2019/02/19 22:02:45 [notice] 31371#0: start worker processes
log level:4
log body:2019/02/19 22:02:45 [error] 31451#0: *98 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 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 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2019/02/19 22:02:47 [warn] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:47 [error] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/02/19 22:02:47 [warn] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2019/02/19 22:02:47 [warn] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:47 [error] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/02/19 22:02:47 [warn] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:47 [error] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:47 [error] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:47 [error] 31523\#0: *174 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2019/02/19 22:02:47 [warn] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:47 [error] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/02/19 22:02:47 [warn] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2019/02/19 22:02:47 [warn] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:47 [error] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/02/19 22:02:47 [warn] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:47 [error] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:47 [error] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:47 [error] 31523#0: *174 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
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+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2019/02/19 22:02:48 [warn] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:48 [error] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/02/19 22:02:48 [warn] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2019/02/19 22:02:48 [warn] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:48 [error] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/02/19 22:02:48 [warn] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:48 [error] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:48 [error] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/02/19 22:02:48 [error] 31523\#0: *177 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2019/02/19 22:02:48 [warn] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:48 [error] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/02/19 22:02:48 [warn] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2019/02/19 22:02:48 [warn] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:48 [error] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/02/19 22:02:48 [warn] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:48 [error] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:48 [error] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/02/19 22:02:48 [error] 31523#0: *177 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
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+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
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+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/semaphore.t TEST 11: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
stream/semaphore.t TEST 22: semaphore wait time is zero - pattern "[error]" should not match any line in error.log but matches line "2019/02/19 22:04:48 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085FB3F0:16
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085FB440:648
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085FB710:16
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085ECC00:672
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085ECEE0:16
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085ECF30:40
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085ECFA0:16
2019/02/19 22:04:48 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:48 [debug] 991\#0: malloc: 00000000085ECFF0:288
'
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 "2019/02/19 22:04:49 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/19 22:04:49 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2019/02/19 22:04:49 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:49 [debug] 1144\#0: *164 event timer add: 0: 1000:8890573
2019/02/19 22:04:49 [debug] 1144\#0: stream lua semaphore wait yielding
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua resume returned 1
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua thread yielded
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua run thread returned -2
2019/02/19 22:04:49 [debug] 1144\#0: worker cycle
'
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 "2019/02/19 22:04:49 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2019/02/19 22:04:49 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:49 [debug] 1144\#0: *164 event timer add: 0: 1000:8890573
2019/02/19 22:04:49 [debug] 1144\#0: stream lua semaphore wait yielding
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua resume returned 1
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua thread yielded
2019/02/19 22:04:49 [debug] 1144\#0: *164 lua run thread returned -2
2019/02/19 22:04:49 [debug] 1144\#0: worker cycle
'
stream/semaphore.t TEST 15: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2019/02/19 22:04:50 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/19 22:04:50 [debug] 1315\#0: *344 tcp_nodelay
2019/02/19 22:04:50 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:50 [debug] 1144\#0: *164 event timer add: 0: 1000:8891573
2019/02/19 22:04:50 [debug] 1144\#0: stream lua semaphore wait yielding
2019/02/19 22:04:50 [debug] 1144\#0: *164 lua resume returned 1
2019/02/19 22:04:50 [debug] 1144\#0: *164 lua thread yielded
2019/02/19 22:04:50 [debug] 1144\#0: *164 lua run thread returned -2
2019/02/19 22:04:50 [debug] 1144\#0: worker cycle
2019/02/19 22:04:50 [debug] 1144\#0: epoll timer: 1000
'
stream/semaphore.t TEST 8: semaphore in preread_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: timeout while prereading client data,
sem: 1 while prereading client data,
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/02/19 22:04:52 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/02/19 22:04:52 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2019/02/19 22:04:52 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:52 [debug] 1144\#0: *164 event timer add: 0: 1000:8893573
2019/02/19 22:04:52 [debug] 1144\#0: stream lua semaphore wait yielding
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua resume returned 1
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua thread yielded
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua run thread returned -2
2019/02/19 22:04:52 [debug] 1144\#0: worker cycle
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/02/19 22:04:52 [error] 1144\#0: *164 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2019/02/19 22:04:52 [debug] 1144\#0: stream lua semaphore wait: 00000000092A7E78, timeout: 1000, resources: 0, event posted: 0
2019/02/19 22:04:52 [debug] 1144\#0: *164 event timer add: 0: 1000:8893573
2019/02/19 22:04:52 [debug] 1144\#0: stream lua semaphore wait yielding
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua resume returned 1
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua thread yielded
2019/02/19 22:04:52 [debug] 1144\#0: *164 lua run thread returned -2
2019/02/19 22:04:52 [debug] 1144\#0: worker cycle
'
stream/semaphore.t TEST 9: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
+sem: timeout,
'
stream/shdict.t TEST 2: get an nonexistent key - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
-value type: nil
+value type: number
-value: nil
+value: 3.1415926
-flags: nil
+flags: 78
'
stream/shdict.t TEST 2: get an nonexistent key - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1,3 @@
-value type: nil
+value type: number
-value: nil
+value: 3.1415926
-flags: nil
+flags: 78
'
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 "2019/02/19 22:05:45 [crit] 2447\#0: *28 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) 2019/02/19 22:05:45 [debug] 2447\#0: *28 reusable connection: 0
2019/02/19 22:05:45 [debug] 2447\#0: *28 malloc: 0000000008BAF8C0:24
2019/02/19 22:05:45 [debug] 2447\#0: *28 malloc: 0000000008C6CE80:16
2019/02/19 22:05:45 [debug] 2447\#0: *28 stream cleanup add: 0000000008BAF8C0
2019/02/19 22:05:45 [debug] 2447\#0: *28 stream lua tcp socket connect: -5
2019/02/19 22:05:45 [debug] 2447\#0: *28 stream lua tcp socket error retval handler
2019/02/19 22:05:45 [debug] 2447\#0: *28 stream lua finalize socket
2019/02/19 22:05:45 [debug] 2447\#0: *28 lua stream cleanup free: 0000000008BAF8C0
2019/02/19 22:05:45 [debug] 2447\#0: *28 malloc: 0000000008C6CED0: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 "2019/02/19 22:05:45 [crit] 2447\#0: *32 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) 2019/02/19 22:05:45 [debug] 2447\#0: *32 reusable connection: 0
2019/02/19 22:05:45 [debug] 2447\#0: *32 malloc: 0000000008BB3A20:24
2019/02/19 22:05:45 [debug] 2447\#0: *32 malloc: 0000000008C6F1C0:16
2019/02/19 22:05:45 [debug] 2447\#0: *32 stream cleanup add: 0000000008BB3A20
2019/02/19 22:05:45 [debug] 2447\#0: *32 stream lua tcp socket connect: -5
2019/02/19 22:05:45 [debug] 2447\#0: *32 stream lua tcp socket error retval handler
2019/02/19 22:05:45 [debug] 2447\#0: *32 stream lua finalize socket
2019/02/19 22:05:45 [debug] 2447\#0: *32 lua stream cleanup free: 0000000008BB3A20
2019/02/19 22:05:45 [debug] 2447\#0: *32 malloc: 0000000008BB3A80: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 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 "2019/02/19 22:05:45 [crit] 2465\#0: *49 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) 2019/02/19 22:05:45 [debug] 2465\#0: *49 reusable connection: 0
2019/02/19 22:05:45 [debug] 2465\#0: *49 malloc: 0000000008F96510:24
2019/02/19 22:05:45 [debug] 2465\#0: *49 malloc: 000000000906CE80:16
2019/02/19 22:05:45 [debug] 2465\#0: *49 stream cleanup add: 0000000008F96510
2019/02/19 22:05:45 [debug] 2465\#0: *49 stream lua tcp socket connect: -5
2019/02/19 22:05:45 [debug] 2465\#0: *49 stream lua tcp socket error retval handler
2019/02/19 22:05:45 [debug] 2465\#0: *49 stream lua finalize socket
2019/02/19 22:05:45 [debug] 2465\#0: *49 lua stream cleanup free: 0000000008F96510
2019/02/19 22:05:45 [debug] 2465\#0: *49 malloc: 000000000906CED0: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 "2019/02/19 22:05:45 [crit] 2465\#0: *53 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) 2019/02/19 22:05:45 [debug] 2465\#0: *53 reusable connection: 0
2019/02/19 22:05:45 [debug] 2465\#0: *53 malloc: 0000000008F9A670:24
2019/02/19 22:05:45 [debug] 2465\#0: *53 malloc: 000000000906F1C0:16
2019/02/19 22:05:45 [debug] 2465\#0: *53 stream cleanup add: 0000000008F9A670
2019/02/19 22:05:45 [debug] 2465\#0: *53 stream lua tcp socket connect: -5
2019/02/19 22:05:45 [debug] 2465\#0: *53 stream lua tcp socket error retval handler
2019/02/19 22:05:45 [debug] 2465\#0: *53 stream lua finalize socket
2019/02/19 22:05:45 [debug] 2465\#0: *53 lua stream cleanup free: 0000000008F9A670
2019/02/19 22:05:45 [debug] 2465\#0: *53 malloc: 0000000008F9A6D0: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 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 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:05:47 [emerg] 2439\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:05:47 [debug] 2500\#0: epoll: fd:8 ev:0001 d:00000000097C9F20
2019/02/19 22:05:47 [debug] 2500\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFDA0:48
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFE10:16
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFE60:16
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFEB0:80
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFF40:16
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFF90:15
2019/02/19 22:05:47 [debug] 2500\#0: malloc: 00000000097FFFE0:16
'
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 11: tls version - TLSv1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:05:49 [emerg] 2439\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:05:49 [notice] 2439\#0: start worker processes
2019/02/19 22:05:49 [debug] 2439\#0: channel 3:5
2019/02/19 22:05:49 [debug] 2555\#0: epoll: fd:8 ev:0001 d:0000000008499730
2019/02/19 22:05:49 [debug] 2555\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 22:05:49 [debug] 2555\#0: malloc: 000000000846B430:48
2019/02/19 22:05:49 [debug] 2555\#0: malloc: 000000000846B4A0:16
2019/02/19 22:05:49 [debug] 2555\#0: malloc: 000000000846B4F0:16
2019/02/19 22:05:49 [debug] 2555\#0: malloc: 000000000846B540:80
2019/02/19 22:05:49 [debug] 2555\#0: malloc: 000000000846B5D0:16
'
stream/ssl.t TEST 12: tls version - TLSv1.1 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:05:53 [emerg] 2439\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:05:53 [notice] 2439\#0: start worker processes
2019/02/19 22:05:53 [debug] 2439\#0: channel 4:6
2019/02/19 22:05:53 [debug] 2614\#0: epoll: fd:8 ev:0001 d:0000000008FB5540
2019/02/19 22:05:53 [debug] 2614\#0: accept on 0.0.0.0:1984, ready: 0
2019/02/19 22:05:53 [debug] 2614\#0: malloc: 000000000937D530:48
2019/02/19 22:05:53 [debug] 2614\#0: malloc: 00000000094CC930:16
2019/02/19 22:05:53 [debug] 2614\#0: malloc: 00000000094D4A30:16
2019/02/19 22:05:53 [debug] 2614\#0: malloc: 000000000937DF00:80
2019/02/19 22:05:53 [debug] 2614\#0: malloc: 00000000094D65F0:16
'
stream/ssl.t TEST 10: tls version - SSLv3 - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:05:55 [emerg] 2439\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:05:55 [notice] 2439\#0: start worker processes
2019/02/19 22:05:55 [debug] 2439\#0: channel 4:6
2019/02/19 22:05:55 [notice] 2439\#0: start worker process 2668
2019/02/19 22:05:55 [debug] 2439\#0: pass channel s:1 pid:2668 fd:4 to s:0 pid:2650 fd:3
2019/02/19 22:05:56 [debug] 2650\#0: epoll: fd:5 ev:0001 d:00000000086D4120
2019/02/19 22:05:56 [debug] 2650\#0: channel handler
2019/02/19 22:05:56 [debug] 2650\#0: channel: 32
2019/02/19 22:05:56 [debug] 2650\#0: channel command: 1
2019/02/19 22:05:56 [debug] 2650\#0: get channel s:1 pid:2668 fd:6
'
stream/ssl.t TEST 8: 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 8: set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 8: 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 8: set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 15: read PEM key chain but set DER key 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 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)
stream/ssl.t TEST 15: read PEM key chain but set DER key 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 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)
stream/ssl.t TEST 14: ngx.semaphore in ssl_certificate_by_lua* - pattern "[emerg]" should not match any line in error.log but matches line "2019/02/19 22:06:01 [emerg] 2439\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/02/19 22:06:01 [notice] 2439\#0: start worker processes
2019/02/19 22:06:01 [debug] 2439\#0: channel 3:5
2019/02/19 22:06:01 [notice] 2439\#0: start worker process 2766
2019/02/19 22:06:01 [debug] 2439\#0: pass channel s:0 pid:2766 fd:3 to s:1 pid:2748 fd:4
2019/02/19 22:06:01 [debug] 2748\#0: epoll: fd:6 ev:0001 d:0000000008BA3DA0
2019/02/19 22:06:01 [debug] 2748\#0: channel handler
2019/02/19 22:06:01 [debug] 2748\#0: channel: 32
2019/02/19 22:06:01 [debug] 2748\#0: channel command: 1
2019/02/19 22:06:01 [debug] 2748\#0: get channel s:0 pid:2766 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
'
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 144.

Warnings

Go back to the index page.