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

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

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
bdcc16bb 2020-02-28 00:52:46 GMT 0 51 74 8325 413 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 0e646b54

OpenSSL

OpenSSL 1.1.1d 10 Sep 2019

Compilation Errors

Unexpected Failures

(none)

Expected Failures

File Name Details
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054 log body: 2020/02/28 02:32:42 [error] 20286\#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.054
log body: 2020/02/28 02:32:42 [error] 20286#0: *73 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102 log body: 2020/02/28 02:32:42 [error] 20286\#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [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: 1582857162.102
log body: 2020/02/28 02:32:42 [error] 20286#0: *74 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
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 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 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 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2020/02/28 02:32:45 [notice] 20412\#0: start worker processes log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *125 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *126 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *127 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *128 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *129 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *130 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *131 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *132 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *133 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *134 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *135 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *136 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *137 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *138 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *139 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *140 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *141 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *142 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *143 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2020/02/28 02:32:45 [notice] 20412#0: start worker processes
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *125 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *126 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *127 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *128 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *129 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *130 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *131 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *132 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *133 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *134 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *135 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *136 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *137 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *138 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *139 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *140 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *141 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *142 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *143 client 127.0.0.1 closed keepalive connection
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#3 log level:7 log body:2020/02/28 02:32:45 [info] 20559\#0: *144 client 127.0.0.1 closed keepalive connection log level:4 log body:2020/02/28 02:32:45 [error] 20559\#0: *145 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2020/02/28 02:32:45 [error] 20559\#0: *146 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" end maybe log lines: \#3 end) 'maybe log lines: #3
log level:7
log body:2020/02/28 02:32:45 [info] 20559#0: *144 client 127.0.0.1 closed keepalive connection
log level:4
log body:2020/02/28 02:32:45 [error] 20559#0: *145 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2020/02/28 02:32:45 [error] 20559#0: *146 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #3
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 30: ringbuf sentinel bug1 - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
log lines: \#2
-AAA
+aaa
aaa
'
errlog.t TEST 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 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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2020/02/28 02:32:49 [notice] 20412\#0: start worker processes log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *388 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *389 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *390 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *391 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *392 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *393 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *394 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *395 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *396 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2020/02/28 02:32:49 [notice] 20412#0: start worker processes
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *388 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *389 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *390 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *391 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *392 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *393 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *394 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *395 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *396 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *397 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *398 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *399 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *400 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *401 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *402 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *403 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *404 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *405 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:49 [info] 20868\#0: *406 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *397 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *398 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *399 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *400 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *401 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *402 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *403 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *404 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *405 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:49 [info] 20868#0: *406 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 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2020/02/28 02:32:49 [notice] 20412\#0: start worker processes log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *436 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *437 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *438 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *439 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *440 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *441 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *442 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *443 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *444 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2020/02/28 02:32:49 [notice] 20412#0: start worker processes
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *436 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *437 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *438 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *439 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *440 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *441 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *442 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *443 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *444 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *445 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *446 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *447 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *448 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *449 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *450 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *451 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *452 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *453 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/02/28 02:32:50 [info] 20924\#0: *454 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *445 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *446 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *447 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *448 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *449 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *450 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *451 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *452 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *453 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/02/28 02:32:50 [info] 20924#0: *454 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)'
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 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 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
'
semaphore.t TEST 38: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:47 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2020/02/28 02:35:47 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:47 [debug] 30672\#0: *252 event timer add: 0: 1000:6306655
2020/02/28 02:35:47 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:47 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:47 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:47 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:47 [debug] 30672\#0: worker cycle
'
semaphore.t TEST 27: kill a light thread that is waiting on a semaphore (after post) - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:48 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:35:48 [error] 30672\#0: *252 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/02/28 02:35:48 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:48 [debug] 30672\#0: *252 event timer add: 0: 1000:6307655
2020/02/28 02:35:48 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:48 [debug] 30672\#0: worker cycle
2020/02/28 02:35:48 [debug] 30672\#0: epoll timer: 1000
'
semaphore.t TEST 27: kill a light thread that is waiting on a semaphore (after post) - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:48 [error] 30672\#0: *252 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/02/28 02:35:48 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:48 [debug] 30672\#0: *252 event timer add: 0: 1000:6307655
2020/02/28 02:35:48 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:48 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:48 [debug] 30672\#0: worker cycle
2020/02/28 02:35:48 [debug] 30672\#0: epoll timer: 1000
2020/02/28 02:35:48 [debug] 30899\#0: timer delta: 12
'
semaphore.t TEST 11: semaphore in access_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
semaphore.t TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:50 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:35:50 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:50 [debug] 30672\#0: *252 event timer add: 0: 1000:6309655
2020/02/28 02:35:50 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:50 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:50 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:50 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:50 [debug] 30672\#0: worker cycle
2020/02/28 02:35:50 [debug] 30672\#0: epoll timer: 1000
2020/02/28 02:35:50 [debug] 31039\#0: epoll: fd:6 ev:0001 d:00000000018C46E0
'
semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:52 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:35:52 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:52 [debug] 30672\#0: *252 event timer add: 0: 1000:6311655
2020/02/28 02:35:52 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:52 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:52 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:52 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:52 [debug] 30672\#0: worker cycle
'
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 "2020/02/28 02:35:53 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2020/02/28 02:35:53 [debug] 31263\#0: *788 malloc: 0000000001877B20:16
2020/02/28 02:35:53 [debug] 31263\#0: *788 write new buf t:1 f:0 0000000001887990, pos 0000000001887990, size: 161 file: 0, size: 0
2020/02/28 02:35:53 [debug] 31263\#0: *788 http write filter: l:0 f:0 s:161
2020/02/28 02:35:53 [debug] 31263\#0: *788 http write filter limit 0
2020/02/28 02:35:53 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:53 [debug] 30672\#0: *252 event timer add: 0: 1000:6312655
2020/02/28 02:35:53 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:53 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:53 [debug] 30672\#0: *252 lua thread yielded
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:54 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:35:54 [error] 30672\#0: *252 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/02/28 02:35:54 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:54 [debug] 30672\#0: *252 event timer add: 0: 1000:6313655
2020/02/28 02:35:54 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:54 [debug] 30672\#0: worker cycle
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:54 [error] 30672\#0: *252 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/02/28 02:35:54 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:54 [debug] 30672\#0: *252 event timer add: 0: 1000:6313655
2020/02/28 02:35:54 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:54 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:54 [debug] 30672\#0: worker cycle
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:35:55 [error] 30672\#0: *252 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:35:55 [debug] 30672\#0: http lua semaphore wait: 00007F140FC50028, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:35:55 [debug] 30672\#0: *252 event timer add: 0: 1000:6314655
2020/02/28 02:35:55 [debug] 30672\#0: http lua semaphore wait yielding
2020/02/28 02:35:55 [debug] 30672\#0: *252 lua resume returned 1
2020/02/28 02:35:55 [debug] 30672\#0: *252 lua thread yielded
2020/02/28 02:35:55 [debug] 30672\#0: *252 lua run thread returned -2
2020/02/28 02:35:55 [debug] 30672\#0: worker cycle
2020/02/28 02:35:55 [debug] 30672\#0: epoll timer: 1000
2020/02/28 02:35:55 [debug] 31431\#0: epoll: fd:6 ev:0001 d:00000000018C2900
'
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
'
stream/errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:3
'
expected: 'log lines:2
'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [warn] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [warn] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712\#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [warn] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [warn] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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:2020/02/28 02:37:01 [error] 2712#0: *88 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 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 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2020/02/28 02:37:03 [notice] 2649\#0: start worker processes log level:4 log body:2020/02/28 02:37:03 [error] 2881\#0: *256 stream [lua] content_by_lua(nginx.conf:67):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #2
log level:6
log body:2020/02/28 02:37:03 [notice] 2649#0: start worker processes
log level:4
log body:2020/02/28 02:37:03 [error] 2881#0: *256 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:45298 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:45302 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#2 log level:6 log body:2020/02/28 02:37:05 [notice] 3005\#0: start worker processes log level:4 log body:2020/02/28 02:37:05 [error] 3006\#0: *3 stream [lua] content_by_lua(nginx.conf:75):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2020/02/28 02:37:05 [notice] 3005#0: start worker processes
log level:4
log body:2020/02/28 02:37:05 [error] 3006#0: *3 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 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/semaphore.t TEST 11: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
stream/semaphore.t TEST 9: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
stream/semaphore.t TEST 20: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:38:05 [error] 6634\#0: *180 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:38:05 [error] 6634\#0: *180 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/02/28 02:38:05 [debug] 6634\#0: stream lua semaphore wait: 00000000027DA438, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:38:05 [debug] 6634\#0: *180 event timer add: 0: 1000:6443948
2020/02/28 02:38:05 [debug] 6634\#0: stream lua semaphore wait yielding
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua resume returned 1
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua thread yielded
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua run thread returned -2
2020/02/28 02:38:05 [debug] 6634\#0: worker cycle
2020/02/28 02:38:05 [debug] 6634\#0: epoll timer: 1000
'
stream/semaphore.t TEST 20: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:38:05 [error] 6634\#0: *180 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/02/28 02:38:05 [debug] 6634\#0: stream lua semaphore wait: 00000000027DA438, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:38:05 [debug] 6634\#0: *180 event timer add: 0: 1000:6443948
2020/02/28 02:38:05 [debug] 6634\#0: stream lua semaphore wait yielding
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua resume returned 1
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua thread yielded
2020/02/28 02:38:05 [debug] 6634\#0: *180 lua run thread returned -2
2020/02/28 02:38:05 [debug] 6634\#0: worker cycle
2020/02/28 02:38:05 [debug] 6634\#0: epoll timer: 1000
2020/02/28 02:38:05 [debug] 6455\#0: child: 0 6830 e:0 t:0 d:0 r:1 j:1
'
stream/semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/02/28 02:38:07 [error] 6634\#0: *180 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/02/28 02:38:07 [debug] 6634\#0: stream lua semaphore wait: 00000000027DA438, timeout: 1000, resources: 0, event posted: 0
2020/02/28 02:38:07 [debug] 6634\#0: *180 event timer add: 0: 1000:6445948
2020/02/28 02:38:07 [debug] 6634\#0: stream lua semaphore wait yielding
2020/02/28 02:38:07 [debug] 6634\#0: *180 lua resume returned 1
2020/02/28 02:38:07 [debug] 6634\#0: *180 lua thread yielded
2020/02/28 02:38:07 [debug] 6634\#0: *180 lua run thread returned -2
2020/02/28 02:38:07 [debug] 6634\#0: worker cycle
2020/02/28 02:38:07 [debug] 6634\#0: epoll timer: 1000
2020/02/28 02:38:07 [debug] 6970\#0: epoll: fd:7 ev:0001 d:00000000027DC220
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,4 @@
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
+sem: timeout,
+sem: 3 times,
'

Warnings

Go back to the index page.