(This page was automatically generated by the tools in the opsboy project on 15:08:04 28-Dec-2023 GMT.)

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

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
630f8fab 2019-05-08 17:40:00 GMT 0 222 73 8140 408 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.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/05/08 20:41:04 [notice] 28739\#0: start worker processes log level:4 log body:2019/05/08 20:41:04 [error] 28740\#0: *1 [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: \#2 end) 'maybe log lines: #2
log level:6
log body:2019/05/08 20:41:04 [notice] 28739#0: start worker processes
log level:4
log body:2019/05/08 20:41:04 [error] 28740#0: *1 [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: #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+).*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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2019/05/08 20:41:04 [notice] 28739\#0: start worker processes log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *53 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *54 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *55 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *56 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *57 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *58 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:04 [info] 28799\#0: *59 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *60 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *61 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2019/05/08 20:41:04 [notice] 28739#0: start worker processes
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *53 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *54 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *55 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *56 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *57 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *58 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:04 [info] 28799#0: *59 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *60 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *61 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *62 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *63 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *64 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *65 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *66 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *67 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *68 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *69 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *70 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:05 [info] 28799\#0: *71 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *62 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *63 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *64 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *65 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *66 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *67 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *68 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *69 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *70 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:05 [info] 28799#0: *71 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 nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 30: ringbuf sentinel bug1 - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
log lines: \#2
-AAA
+aaa
aaa
'
errlog.t 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 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2019/05/08 20:41:09 [notice] 29055\#0: start worker processes log level:7 log body:2019/05/08 20:41:09 [info] 29196\#0: *125 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:09 [info] 29196\#0: *126 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:09 [info] 29196\#0: *127 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:09 [info] 29196\#0: *128 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:09 [info] 29196\#0: *129 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *130 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *131 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *132 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *133 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2019/05/08 20:41:09 [notice] 29055#0: start worker processes
log level:7
log body:2019/05/08 20:41:09 [info] 29196#0: *125 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:09 [info] 29196#0: *126 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:09 [info] 29196#0: *127 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:09 [info] 29196#0: *128 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:09 [info] 29196#0: *129 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *130 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *131 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *132 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *133 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *134 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *135 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *136 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *137 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *138 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *139 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *140 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *141 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *142 client 127.0.0.1 closed keepalive connection log level:7 log body:2019/05/08 20:41:10 [info] 29196\#0: *143 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *134 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *135 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *136 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *137 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *138 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *139 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *140 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *141 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *142 client 127.0.0.1 closed keepalive connection
log level:7
log body:2019/05/08 20:41:10 [info] 29196#0: *143 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 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
log lines: \#18
-log lines: \#8
+log lines: \#10
'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [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: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [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: 1557348072.908 log body: 2019/05/08 20:41:12 [error] 29412\#0: *337 [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: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [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: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [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: 1557348072.908
log body: 2019/05/08 20:41:12 [error] 29412#0: *337 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [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: 1557348072.956 log body: 2019/05/08 20:41:12 [error] 29412\#0: *338 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [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: 1557348072.956
log body: 2019/05/08 20:41:12 [error] 29412#0: *338 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
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 10: validate good OCSP response - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 10: validate good OCSP response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 10: validate good OCSP response - pattern "OCSP response validation ok" should match a line in error.log (req 0)
ocsp.t TEST 10: validate good OCSP response - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 10: validate good OCSP response - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 10: validate good OCSP response - pattern "OCSP response validation ok" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 0)
ocsp.t TEST 6: create OCSP request (good) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 6: create OCSP request (good) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 6: create OCSP request (good) - pattern "OCSP request created with length 68" should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 0)
ocsp.t TEST 5: get OCSP responder (truncated) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "OCSP url found: http:/," should match a line in error.log (req 1)
ocsp.t TEST 5: get OCSP responder (truncated) - pattern "still get an error: truncated" should match a line in error.log (req 1)
ocsp.t TEST 16: good status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:41:39 [emerg] 30304\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:41:39 [notice] 30304\#0: start worker processes
2019/05/08 20:41:39 [debug] 30304\#0: channel 4:6
2019/05/08 20:41:39 [notice] 30304\#0: start worker process 30418
2019/05/08 20:41:39 [debug] 30304\#0: pass channel s:1 pid:30418 fd:4 to s:0 pid:30392 fd:3
2019/05/08 20:41:39 [debug] 30392\#0: epoll: fd:5 ev:0001 d:000000000221CEF0
2019/05/08 20:41:39 [debug] 30392\#0: channel handler
2019/05/08 20:41:39 [debug] 30392\#0: channel: 32
2019/05/08 20:41:39 [debug] 30392\#0: channel command: 1
2019/05/08 20:41:39 [debug] 30392\#0: get channel s:1 pid:30418 fd:8
'
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 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 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)
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 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 0)
ocsp.t TEST 7: create OCSP request (buffer too small) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 7: create OCSP request (buffer too small) - pattern "failed to create OCSP request: output buffer too small: 68 > 67" should match a line in error.log (req 1)
ocsp.t TEST 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 17: no status req from client - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:41:44 [emerg] 30304\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:41:44 [notice] 30304\#0: start worker processes
2019/05/08 20:41:44 [debug] 30304\#0: channel 3:5
2019/05/08 20:41:44 [notice] 30304\#0: start worker process 30676
2019/05/08 20:41:44 [debug] 30304\#0: pass channel s:0 pid:30676 fd:3 to s:1 pid:30648 fd:4
2019/05/08 20:41:44 [debug] 30648\#0: epoll: fd:6 ev:0001 d:000000000225C670
2019/05/08 20:41:44 [debug] 30648\#0: channel handler
2019/05/08 20:41:44 [debug] 30648\#0: channel: 32
2019/05/08 20:41:44 [debug] 30648\#0: channel command: 1
2019/05/08 20:41:44 [debug] 30648\#0: get channel s:0 pid:30676 fd:5
'
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 0)
ocsp.t TEST 1: get OCSP responder (good case) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
'
ocsp.t TEST 1: get OCSP responder (good case) - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ocsp.t TEST 1: get OCSP responder (good case) - pattern "OCSP url found: http://127.0.0.1:8888/ocsp?foo=1," should match a line in error.log (req 1)
process-type-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
)'
semaphore.t TEST 21: semaphore post in header_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:43:57 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:43:57 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:43:57 [debug] 5610\#0: *104 event timer add: 0: 1000:11106095
2019/05/08 20:43:57 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:43:57 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:43:57 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:43:57 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:43:57 [debug] 5610\#0: worker cycle
2019/05/08 20:43:57 [debug] 5610\#0: epoll timer: 1000
2019/05/08 20:43:57 [notice] 5493\#0: signal 1 (SIGHUP) received from 5694, reconfiguring
'
semaphore.t TEST 12: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
+sem: timeout,
'
semaphore.t TEST 9: semaphore in set_by_lua (wait is not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: 6 times,
sem: 1,
sem: API disabled in the context of set_by_lua*,
'
semaphore.t TEST 30: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:01 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:01 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:01 [debug] 5610\#0: *104 event timer add: 0: 1000:11110095
2019/05/08 20:44:01 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:01 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:01 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:01 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:01 [debug] 5610\#0: worker cycle
2019/05/08 20:44:01 [debug] 5610\#0: epoll timer: 1000
2019/05/08 20:44:01 [debug] 5942\#0: epoll: fd:6 ev:0001 d:000000000261F760
'
semaphore.t TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:02 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2019/05/08 20:44:02 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:02 [debug] 5610\#0: *104 event timer add: 0: 1000:11111095
2019/05/08 20:44:02 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:02 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:02 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:02 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:02 [debug] 5610\#0: worker cycle
'
semaphore.t TEST 4: basic semaphore in subrequest - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:03 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:03 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:03 [debug] 5610\#0: *104 event timer add: 0: 1000:11112095
2019/05/08 20:44:03 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:03 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:03 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:03 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:03 [debug] 5610\#0: worker cycle
'
semaphore.t TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 40: bugfix: semaphore instance can't be garbage collected when someone is waiting on it - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:05 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:05 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:05 [debug] 5610\#0: *104 event timer add: 0: 1000:11114095
2019/05/08 20:44:05 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:05 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:05 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:05 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:05 [debug] 5610\#0: worker cycle
2019/05/08 20:44:05 [debug] 5610\#0: epoll timer: 1000
2019/05/08 20:44:05 [notice] 5493\#0: signal 1 (SIGHUP) received from 6212, reconfiguring
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:06 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:06 [error] 5610\#0: *104 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2019/05/08 20:44:06 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:06 [debug] 5610\#0: *104 event timer add: 0: 1000:11115095
2019/05/08 20:44:06 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:06 [debug] 5610\#0: worker cycle
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:06 [error] 5610\#0: *104 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2019/05/08 20:44:06 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:06 [debug] 5610\#0: *104 event timer add: 0: 1000:11115095
2019/05/08 20:44:06 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:06 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:06 [debug] 5610\#0: worker cycle
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:08 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:08 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:08 [debug] 5610\#0: *104 event timer add: 0: 1000:11117095
2019/05/08 20:44:08 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:08 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:08 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:08 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:08 [debug] 5610\#0: worker cycle
2019/05/08 20:44:08 [debug] 5610\#0: epoll timer: 1000
2019/05/08 20:44:08 [debug] 6402\#0: epoll: fd:6 ev:0001 d:00000000026299C0
'
semaphore.t TEST 28: kill a thread that is waiting on another thread that is waiting on semaphore - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:09 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:09 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:09 [debug] 5610\#0: *104 event timer add: 0: 1000:11118095
2019/05/08 20:44:09 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:09 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:09 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:09 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:09 [debug] 5610\#0: worker cycle
2019/05/08 20:44:09 [debug] 5610\#0: epoll timer: 1000
2019/05/08 20:44:09 [debug] 6483\#0: timer delta: 88
'
semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:44:10 [error] 5610\#0: *104 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2019/05/08 20:44:10 [debug] 5610\#0: http lua semaphore wait: 00007F3282E0E028, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:44:10 [debug] 5610\#0: *104 event timer add: 0: 1000:11119095
2019/05/08 20:44:10 [debug] 5610\#0: http lua semaphore wait yielding
2019/05/08 20:44:10 [debug] 5610\#0: *104 lua resume returned 1
2019/05/08 20:44:10 [debug] 5610\#0: *104 lua thread yielded
2019/05/08 20:44:10 [debug] 5610\#0: *104 lua run thread returned -2
2019/05/08 20:44:10 [debug] 5610\#0: worker cycle
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to get ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to get ttl: not found
'
ssl-session-fetch.t TEST 3: store new session, and resume it - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 3: store new session, and resume it - grep_error_log_out (req 0) ''
doesn't match '(?^s:ssl_session_store_by_lua_block:5: session id: [a-fA-F\d]+)'
ssl-session-fetch.t TEST 3: store new session, and resume it - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 3: store new session, and resume it - grep_error_log_out (req 1) ''
doesn't match '(?^s:ssl_session_fetch_by_lua_block:4: session id: [a-fA-F\d]+)'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-fetch.t TEST 1: get resume session id serialized - grep_error_log_out (req 1) ''
doesn't match '(?^s:ssl_session_fetch_by_lua_block:4: session id: [a-fA-f\d]+)'
ssl-session-fetch.t TEST 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/05/08 20:44:45 [emerg] 8448\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:44:45 [notice] 8448\#0: start worker processes
2019/05/08 20:44:45 [debug] 8448\#0: channel 4:6
2019/05/08 20:44:45 [notice] 8448\#0: start worker process 8507
2019/05/08 20:44:45 [debug] 8448\#0: pass channel s:1 pid:8507 fd:4 to s:0 pid:8481 fd:3
2019/05/08 20:44:45 [debug] 8481\#0: epoll: fd:5 ev:0001 d:0000000001011C90
2019/05/08 20:44:45 [debug] 8481\#0: channel handler
2019/05/08 20:44:45 [debug] 8481\#0: channel: 32
2019/05/08 20:44:45 [debug] 8481\#0: channel command: 1
2019/05/08 20:44:45 [debug] 8481\#0: get channel s:1 pid:8507 fd:8
'
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-store.t TEST 2: get new session id serialized - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 2: get new session id serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session id: [a-fA-f\d]+)" should match a line in error.log (req 0)
ssl-session-store.t TEST 2: get new session id serialized - response_body - response is expected (repeated req 1, req 0) @@ -1,3 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-close: 1 nil
'
ssl-session-store.t TEST 2: get new session id serialized - pattern "(?^s:ssl_session_store_by_lua_block:4: session id: [a-fA-f\d]+)" should match a line in error.log (req 1)
ssl-session-store.t TEST 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.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/05/08 20:44:49 [crit] 8731\#0: *93 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/05/08 20:44:49 [debug] 8731\#0: *93 reusable connection: 0
2019/05/08 20:44:49 [debug] 8731\#0: *93 malloc: 00000000008A1DC0:24
2019/05/08 20:44:49 [debug] 8731\#0: *93 malloc: 00000000008A1DE0:16
2019/05/08 20:44:49 [debug] 8731\#0: *93 http cleanup add: 00000000008A1DC0
2019/05/08 20:44:49 [debug] 8731\#0: *93 lua tcp socket connect: -5
2019/05/08 20:44:49 [debug] 8731\#0: *93 lua tcp socket error retval handler
2019/05/08 20:44:49 [debug] 8731\#0: *93 lua finalize socket
2019/05/08 20:44:49 [debug] 8731\#0: *93 lua http cleanup free: 00000000008A1DC0
2019/05/08 20:44:49 [debug] 8731\#0: *93 malloc: 00000000008A1E00: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/05/08 20:44:49 [crit] 8731\#0: *95 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/05/08 20:44:49 [debug] 8731\#0: *95 reusable connection: 0
2019/05/08 20:44:49 [debug] 8731\#0: *95 malloc: 00000000008A1DC0:24
2019/05/08 20:44:49 [debug] 8731\#0: *95 malloc: 00000000008A1DE0:16
2019/05/08 20:44:49 [debug] 8731\#0: *95 http cleanup add: 00000000008A1DC0
2019/05/08 20:44:49 [debug] 8731\#0: *95 lua tcp socket connect: -5
2019/05/08 20:44:49 [debug] 8731\#0: *95 lua tcp socket error retval handler
2019/05/08 20:44:49 [debug] 8731\#0: *95 lua finalize socket
2019/05/08 20:44:49 [debug] 8731\#0: *95 lua http cleanup free: 00000000008A1DC0
2019/05/08 20:44:49 [debug] 8731\#0: *95 malloc: 00000000008A1E00:16
'
ssl.t TEST 10: tls version - SSLv3 - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:44:49 [emerg] 8669\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:44:49 [notice] 8669\#0: start worker processes
2019/05/08 20:44:49 [debug] 8669\#0: channel 3:5
2019/05/08 20:44:49 [notice] 8669\#0: start worker process 8758
2019/05/08 20:44:49 [debug] 8669\#0: pass channel s:0 pid:8758 fd:3 to s:1 pid:8731 fd:4
2019/05/08 20:44:49 [debug] 8731\#0: epoll: fd:6 ev:0001 d:0000000000846790
2019/05/08 20:44:49 [debug] 8731\#0: channel handler
2019/05/08 20:44:49 [debug] 8731\#0: channel: 32
2019/05/08 20:44:49 [debug] 8731\#0: channel command: 1
2019/05/08 20:44:49 [debug] 8731\#0: get channel s:0 pid:8758 fd:5
'
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)
ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:44:51 [emerg] 8669\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:44:51 [notice] 8669\#0: start worker processes
2019/05/08 20:44:51 [debug] 8669\#0: channel 4:6
2019/05/08 20:44:51 [notice] 8669\#0: start worker process 8897
2019/05/08 20:44:51 [debug] 8669\#0: pass channel s:1 pid:8897 fd:4 to s:0 pid:8868 fd:3
2019/05/08 20:44:51 [debug] 8868\#0: epoll: fd:5 ev:0001 d:000000000088E380
2019/05/08 20:44:51 [debug] 8868\#0: channel handler
2019/05/08 20:44:51 [debug] 8868\#0: channel: 32
2019/05/08 20:44:51 [debug] 8868\#0: channel command: 1
2019/05/08 20:44:51 [debug] 8868\#0: get channel s:1 pid:8897 fd:6
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 0)
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/05/08 20:44:53 [crit] 8954\#0: *333 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/05/08 20:44:53 [debug] 8954\#0: *333 reusable connection: 0
2019/05/08 20:44:53 [debug] 8954\#0: *333 malloc: 0000000000876670:24
2019/05/08 20:44:53 [debug] 8954\#0: *333 malloc: 00000000008A7F90:16
2019/05/08 20:44:53 [debug] 8954\#0: *333 http cleanup add: 0000000000876670
2019/05/08 20:44:53 [debug] 8954\#0: *333 lua tcp socket connect: -5
2019/05/08 20:44:53 [debug] 8954\#0: *333 lua tcp socket error retval handler
2019/05/08 20:44:53 [debug] 8954\#0: *333 lua finalize socket
2019/05/08 20:44:53 [debug] 8954\#0: *333 lua http cleanup free: 0000000000876670
2019/05/08 20:44:53 [debug] 8954\#0: *333 malloc: 00000000008B5490:16
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1 @@
-connected: 1
+failed to connect: no such file or directory
-failed to do SSL handshake: handshake failed
'
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "(?^:\[error\] .*? failed to parse pem cert: PEM_read_bio_X509_AUX\(\) failed)" should match a line in error.log (req 1)
ssl.t TEST 17: parse PEM cert and key to cdata (bad cert 0 in the chain) - pattern "[crit]" should not match any line in error.log but matches line "2019/05/08 20:44:53 [crit] 8954\#0: *335 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/05/08 20:44:53 [debug] 8954\#0: *335 reusable connection: 0
2019/05/08 20:44:53 [debug] 8954\#0: *335 malloc: 00000000008A7F90:24
2019/05/08 20:44:53 [debug] 8954\#0: *335 malloc: 0000000000876670:16
2019/05/08 20:44:53 [debug] 8954\#0: *335 http cleanup add: 00000000008A7F90
2019/05/08 20:44:53 [debug] 8954\#0: *335 lua tcp socket connect: -5
2019/05/08 20:44:53 [debug] 8954\#0: *335 lua tcp socket error retval handler
2019/05/08 20:44:53 [debug] 8954\#0: *335 lua finalize socket
2019/05/08 20:44:53 [debug] 8954\#0: *335 lua http cleanup free: 00000000008A7F90
2019/05/08 20:44:53 [debug] 8954\#0: *335 malloc: 00000000008B6910:16
'
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/05/08 20:44:53 [emerg] 8669\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:44:53 [notice] 8669\#0: start worker processes
2019/05/08 20:44:53 [debug] 8669\#0: channel 3:5
2019/05/08 20:44:53 [notice] 8669\#0: start worker process 8982
2019/05/08 20:44:53 [debug] 8669\#0: pass channel s:0 pid:8982 fd:3 to s:1 pid:8954 fd:4
2019/05/08 20:44:53 [debug] 8954\#0: epoll: fd:6 ev:0001 d:00000000008CE960
2019/05/08 20:44:53 [debug] 8954\#0: channel handler
2019/05/08 20:44:53 [debug] 8954\#0: channel: 32
2019/05/08 20:44:53 [debug] 8954\#0: channel command: 1
2019/05/08 20:44:53 [debug] 8954\#0: get channel s:0 pid:8982 fd:5
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 0, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
ssl.t TEST 9: read PEM cert chain but set DER cert chain - response_body - response is expected (repeated req 1, req 0) @@ -1,11 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-sent http request: 56 bytes.
-received: HTTP/1.1 201 Created
-received: Server: nginx
-received: Content-Type: text/plain
-received: Content-Length: 4
-received: Connection: close
-received:
-received: foo
-close: 1 nil
'
ssl.t TEST 9: read PEM cert chain but set DER cert chain - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
ssl.t TEST 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 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)
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:4 log body:2019/05/08 20:45:12 [error] 9982\#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 84, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:12 [warn] 9982\#0: *31 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/05/08 20:45:12 [error] 9982\#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2019/05/08 20:45:12 [error] 9982\#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:12 [warn] 9982\#0: *31 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/05/08 20:45:12 [error] 9982\#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:12 [error] 9982\#0: *31 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/05/08 20:45:12 [error] 9982\#0: *31 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/05/08 20:45:12 [error] 9982\#0: *31 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:4
log body:2019/05/08 20:45:12 [error] 9982#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 84, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:12 [warn] 9982#0: *31 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/05/08 20:45:12 [error] 9982#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2019/05/08 20:45:12 [error] 9982#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:12 [warn] 9982#0: *31 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/05/08 20:45:12 [error] 9982#0: *31 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:12 [error] 9982#0: *31 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/05/08 20:45:12 [error] 9982#0: *31 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/05/08 20:45:12 [error] 9982#0: *31 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 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/05/08 20:45:14 [notice] 9976\#0: start worker processes log level:4 log body:2019/05/08 20:45:14 [error] 10117\#0: *171 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/05/08 20:45:14 [notice] 9976#0: start worker processes
log level:4
log body:2019/05/08 20:45:14 [error] 10117#0: *171 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 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:43644 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:43648 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2019/05/08 20:45:15 [notice] 9976\#0: start worker processes log level:4 log body:2019/05/08 20:45:16 [error] 10252\#0: *311 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/05/08 20:45:15 [notice] 9976#0: start worker processes
log level:4
log body:2019/05/08 20:45:16 [error] 10252#0: *311 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 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 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *422 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *422 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, 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+: --> 100, 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+: howdy, something new!, 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+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:17 [warn] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:17 [error] 10360\#0: *425 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:17 [warn] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:17 [error] 10360#0: *425 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, 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+: --> 100, 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+: howdy, something new!, 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+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *590 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
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+
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+: --> 99, 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+: --> 100, 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+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2019/05/08 20:45:19 [warn] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2019/05/08 20:45:19 [error] 10523\#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2019/05/08 20:45:19 [warn] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2019/05/08 20:45:19 [error] 10523#0: *593 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
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+
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+: --> 99, 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+: --> 100, 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+: --> 100, 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 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 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/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2019/05/08 20:46:24 [error] 14308\#0: *615 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2019/05/08 20:46:24 [debug] 14308\#0: stream lua semaphore wait: 0000000001E8ECF8, timeout: 1000, resources: 0, event posted: 0
2019/05/08 20:46:24 [debug] 14308\#0: *615 event timer add: 0: 1000:11253033
2019/05/08 20:46:24 [debug] 14308\#0: stream lua semaphore wait yielding
2019/05/08 20:46:24 [debug] 14308\#0: *615 lua resume returned 1
2019/05/08 20:46:24 [debug] 14308\#0: *615 lua thread yielded
2019/05/08 20:46:24 [debug] 14308\#0: *615 lua run thread returned -2
2019/05/08 20:46:24 [debug] 14308\#0: worker cycle
'
Looks like you failed 1 test of 184.
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 4: read SNI name via ssl.server_name() when no SNI name specified - 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 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)
stream/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,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 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)
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/05/08 20:46:54 [crit] 16031\#0: *98 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/05/08 20:46:54 [debug] 16031\#0: *98 reusable connection: 0
2019/05/08 20:46:54 [debug] 16031\#0: *98 malloc: 0000000001E101B0:24
2019/05/08 20:46:54 [debug] 16031\#0: *98 malloc: 0000000001E17E10:16
2019/05/08 20:46:54 [debug] 16031\#0: *98 stream cleanup add: 0000000001E101B0
2019/05/08 20:46:54 [debug] 16031\#0: *98 stream lua tcp socket connect: -5
2019/05/08 20:46:54 [debug] 16031\#0: *98 stream lua tcp socket error retval handler
2019/05/08 20:46:54 [debug] 16031\#0: *98 stream lua finalize socket
2019/05/08 20:46:54 [debug] 16031\#0: *98 lua stream cleanup free: 0000000001E101B0
2019/05/08 20:46:54 [debug] 16031\#0: *98 malloc: 0000000001E17E30: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/05/08 20:46:54 [crit] 16031\#0: *102 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/05/08 20:46:54 [debug] 16031\#0: *102 reusable connection: 0
2019/05/08 20:46:54 [debug] 16031\#0: *102 malloc: 0000000001E17DF0:24
2019/05/08 20:46:54 [debug] 16031\#0: *102 malloc: 0000000001E101D0:16
2019/05/08 20:46:54 [debug] 16031\#0: *102 stream cleanup add: 0000000001E17DF0
2019/05/08 20:46:54 [debug] 16031\#0: *102 stream lua tcp socket connect: -5
2019/05/08 20:46:54 [debug] 16031\#0: *102 stream lua tcp socket error retval handler
2019/05/08 20:46:54 [debug] 16031\#0: *102 stream lua finalize socket
2019/05/08 20:46:54 [debug] 16031\#0: *102 lua stream cleanup free: 0000000001E17DF0
2019/05/08 20:46:54 [debug] 16031\#0: *102 malloc: 0000000001E101F0:16
'
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - response_body - response is expected (repeated req 0, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 0)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "read SNI name from Lua: test.com" should match a line in error.log (req 0)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - response_body - response is expected (repeated req 1, req 0) @@ -1,4 +1 @@
-connected: 1
+failed to connect: no such file or directory
-ssl handshake: userdata
-received: it works!
-close: 1 nil
'
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "lua ssl server name: "test.com"" should match a line in error.log (req 1)
stream/ssl.t TEST 3: read SNI name via ssl.server_name() - pattern "read SNI name from Lua: test.com" should match a line in error.log (req 1)
stream/ssl.t TEST 14: ngx.semaphore in ssl_certificate_by_lua* - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:46:54 [emerg] 15970\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:46:54 [notice] 15970\#0: start worker processes
2019/05/08 20:46:54 [debug] 15970\#0: channel 4:6
2019/05/08 20:46:54 [notice] 15970\#0: start worker process 16085
2019/05/08 20:46:54 [debug] 15970\#0: pass channel s:1 pid:16085 fd:4 to s:0 pid:16058 fd:3
2019/05/08 20:46:54 [debug] 16058\#0: epoll: fd:5 ev:0001 d:0000000001E074A0
2019/05/08 20:46:54 [debug] 16058\#0: channel handler
2019/05/08 20:46:54 [debug] 16058\#0: channel: 32
2019/05/08 20:46:54 [debug] 16058\#0: channel command: 1
2019/05/08 20:46:54 [debug] 16058\#0: get channel s:1 pid:16085 fd:9
'
stream/ssl.t TEST 10: tls version - SSLv3 - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:46:57 [emerg] 15970\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:46:57 [notice] 15970\#0: start worker processes
2019/05/08 20:46:57 [debug] 15970\#0: channel 3:5
2019/05/08 20:46:57 [notice] 15970\#0: start worker process 16177
2019/05/08 20:46:57 [debug] 15970\#0: pass channel s:0 pid:16177 fd:3 to s:1 pid:16146 fd:4
2019/05/08 20:46:57 [debug] 16146\#0: epoll: fd:6 ev:0001 d:0000000001E4FFD0
2019/05/08 20:46:57 [debug] 16146\#0: channel handler
2019/05/08 20:46:57 [debug] 16146\#0: channel: 32
2019/05/08 20:46:57 [debug] 16146\#0: channel command: 1
2019/05/08 20:46:57 [debug] 16146\#0: get channel s:0 pid:16177 fd:5
'
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/05/08 20:46:58 [crit] 16233\#0: *345 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/05/08 20:46:58 [debug] 16233\#0: *345 reusable connection: 0
2019/05/08 20:46:58 [debug] 16233\#0: *345 malloc: 0000000001DB86E0:24
2019/05/08 20:46:58 [debug] 16233\#0: *345 malloc: 0000000001DEC5A0:16
2019/05/08 20:46:58 [debug] 16233\#0: *345 stream cleanup add: 0000000001DB86E0
2019/05/08 20:46:58 [debug] 16233\#0: *345 stream lua tcp socket connect: -5
2019/05/08 20:46:58 [debug] 16233\#0: *345 stream lua tcp socket error retval handler
2019/05/08 20:46:58 [debug] 16233\#0: *345 stream lua finalize socket
2019/05/08 20:46:58 [debug] 16233\#0: *345 lua stream cleanup free: 0000000001DB86E0
2019/05/08 20:46:58 [debug] 16233\#0: *345 malloc: 0000000001DEC5C0: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/05/08 20:46:58 [crit] 16233\#0: *349 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/05/08 20:46:58 [debug] 16233\#0: *349 reusable connection: 0
2019/05/08 20:46:58 [debug] 16233\#0: *349 malloc: 0000000001E18750:24
2019/05/08 20:46:58 [debug] 16233\#0: *349 malloc: 0000000001DE6F70:16
2019/05/08 20:46:58 [debug] 16233\#0: *349 stream cleanup add: 0000000001E18750
2019/05/08 20:46:58 [debug] 16233\#0: *349 stream lua tcp socket connect: -5
2019/05/08 20:46:58 [debug] 16233\#0: *349 stream lua tcp socket error retval handler
2019/05/08 20:46:58 [debug] 16233\#0: *349 stream lua finalize socket
2019/05/08 20:46:58 [debug] 16233\#0: *349 lua stream cleanup free: 0000000001E18750
2019/05/08 20:46:58 [debug] 16233\#0: *349 malloc: 0000000001DE6F90:16
'
stream/ssl.t TEST 13: tls version - TLSv1.2 - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:47:00 [emerg] 15970\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:47:00 [notice] 15970\#0: start worker processes
2019/05/08 20:47:00 [debug] 15970\#0: channel 4:6
2019/05/08 20:47:00 [notice] 15970\#0: start worker process 16326
2019/05/08 20:47:00 [debug] 15970\#0: pass channel s:1 pid:16326 fd:4 to s:0 pid:16296 fd:3
2019/05/08 20:47:00 [debug] 16296\#0: epoll: fd:5 ev:0001 d:0000000001E51C20
2019/05/08 20:47:00 [debug] 16296\#0: channel handler
2019/05/08 20:47:00 [debug] 16296\#0: channel: 32
2019/05/08 20:47:00 [debug] 16296\#0: channel command: 1
2019/05/08 20:47:00 [debug] 16296\#0: get channel s:1 pid:16326 fd:6
'
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 20: read client addr via ssl.raw_client_addr() - pattern "[emerg]" should not match any line in error.log but matches line "2019/05/08 20:47:03 [emerg] 15970\#0: unlink() /home/ec2-user/git/lua-resty-core/t/servroot/html/nginx.sock failed (2: No such file or directory)" (req 0) 2019/05/08 20:47:03 [notice] 15970\#0: start worker processes
2019/05/08 20:47:03 [debug] 15970\#0: channel 3:5
2019/05/08 20:47:03 [notice] 15970\#0: start worker process 16536
2019/05/08 20:47:03 [debug] 15970\#0: pass channel s:0 pid:16536 fd:3 to s:1 pid:16507 fd:4
2019/05/08 20:47:03 [debug] 16507\#0: epoll: fd:6 ev:0001 d:0000000001E50B90
2019/05/08 20:47:03 [debug] 16507\#0: channel handler
2019/05/08 20:47:03 [debug] 16507\#0: channel: 32
2019/05/08 20:47:03 [debug] 16507\#0: channel command: 1
2019/05/08 20:47:03 [debug] 16507\#0: get channel s:0 pid:16536 fd:5
'

Warnings

Go back to the index page.