(This page was automatically generated by the tools in the opsboy project on 10:07:08 03-Nov-2020 GMT.)

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

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
973629fd 2020-11-01 14:30:12 GMT 1 57 78 8726 1150 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 70f88773

OpenSSL

OpenSSL 1.1.1h 22 Sep 2020

Compilation Errors

Unexpected Failures

File Name Details
pipe-stdout.t TEST 33: read process, aborted by uthread kill, with graceful shutdown - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
-stdout: ok
+stdout err: timeout
stderr err: closed
'

Expected Failures

File Name Details
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364 log body: 2020/11/01 16:06:46 [error] 13487\#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.364
log body: 2020/11/01 16:06:46 [error] 13487#0: *105 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768 log body: 2020/11/01 16:06:46 [error] 13487\#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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: 1604246806.768
log body: 2020/11/01 16:06:46 [error] 13487#0: *106 [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 TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t 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 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 0)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2020/11/01 16:06:51 [warn] 13614\#0: *27 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) '
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 1)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2020/11/01 16:06:51 [warn] 13614\#0: *28 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) '
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2020/11/01 16:06:54 [notice] 13604\#0: start worker processes log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *109 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *110 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *111 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *114 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *115 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *116 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *117 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2020/11/01 16:06:54 [notice] 13604#0: start worker processes
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *109 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *110 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *111 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *112 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *113 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *114 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *115 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *116 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *117 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/11/01 16:06:54 [info] 13732\#0: *118 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *119 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *120 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *121 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *122 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:54 [info] 13732\#0: *123 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:55 [info] 13732\#0: *124 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:55 [info] 13732\#0: *125 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:55 [info] 13732\#0: *126 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:55 [info] 13732\#0: *127 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *118 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *119 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *120 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *121 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *122 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:54 [info] 13732#0: *123 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:55 [info] 13732#0: *124 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:55 [info] 13732#0: *125 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:55 [info] 13732#0: *126 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:55 [info] 13732#0: *127 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 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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2020/11/01 16:06:57 [notice] 13604\#0: start worker processes log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *187 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *188 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *189 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *190 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *191 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *192 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *193 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *194 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *195 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2020/11/01 16:06:57 [notice] 13604#0: start worker processes
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *187 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *188 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *189 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *190 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *191 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *192 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *193 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *194 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *195 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/11/01 16:06:57 [info] 13824\#0: *196 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *197 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *198 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *199 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *200 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *201 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *202 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *203 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *204 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:06:57 [info] 13824\#0: *205 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *196 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *197 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *198 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *199 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *200 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *201 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *202 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *203 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *204 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:06:57 [info] 13824#0: *205 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 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 30: ringbuf sentinel bug1 - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
log lines: \#2
-AAA
+aaa
aaa
'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2020/11/01 16:07:01 [notice] 13604\#0: start worker processes log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *344 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *345 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *346 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *347 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *348 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *349 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *350 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *351 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *352 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *353 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *354 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *355 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *356 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *357 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *358 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *359 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *360 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *361 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/11/01 16:07:02 [info] 14004\#0: *362 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2020/11/01 16:07:01 [notice] 13604#0: start worker processes
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *344 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *345 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *346 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *347 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *348 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *349 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *350 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *351 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *352 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *353 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *354 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *355 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *356 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *357 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *358 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *359 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *360 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *361 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/11/01 16:07:02 [info] 14004#0: *362 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/11/01 16:07:02 [info] 14004\#0: *363 client 127.0.0.1 closed keepalive connection log level:4 log body:2020/11/01 16:07:02 [error] 14004\#0: *364 [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/11/01 16:07:02 [error] 14004\#0: *365 [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/11/01 16:07:02 [info] 14004#0: *363 client 127.0.0.1 closed keepalive connection
log level:4
log body:2020/11/01 16:07:02 [error] 14004#0: *364 [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/11/01 16:07:02 [error] 14004#0: *365 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #3
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t nginx: [emerg] invalid 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 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
'
process-type-hup.t TEST 1: sanity - pattern "init_worker_by_lua:6: process type: privileged" should match a line in error.log (req 0) Looks like you failed 1 test of 8.
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
request.t TEST 2: ngx.req.get_headers (raw) - pattern "(?^:\[TRACE\s+\d+ .*? -> \d+\])" should match a line in error.log (req 0)
request.t TEST 2: ngx.req.get_headers (raw) - pattern "(?^:\[TRACE\s+\d+ .*? -> \d+\])" should match a line in error.log (req 1)
request.t TEST 7: ngx.req.start_time() - response_body - response is expected (repeated req 0, req 0) got: "true\x{0a}>= 0.099: true\x{0a}< 0.11: false\x{0a}"
length: 34
expected: "true\x{0a}>= 0.099: true\x{0a}< 0.11: true\x{0a}"
length: 33
strings begin to differ at char 29 (line 3 column 9)
semaphore.t TEST 11: semaphore in access_by_lua (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 19: semaphore wait post in rewrite_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:31 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:31 [debug] 24094\#0: malloc: 0000000008456960:16
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 0000000008458520:4
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 00000000084B8760:16
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 0000000008A2B890:64
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 00000000084C95E0:16
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 0000000008DEEFF0:56
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 000000000853F4E0:16
2020/11/01 16:14:31 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:31 [debug] 24094\#0: malloc: 00000000085CCDF0:12
'
semaphore.t TEST 31: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:32 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:32 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:32 [debug] 24764\#0: *588 event timer add: 0: 1000:6314356
2020/11/01 16:14:32 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:32 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:32 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:32 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:32 [debug] 24764\#0: worker cycle
2020/11/01 16:14:32 [debug] 24764\#0: epoll timer: 1000
2020/11/01 16:14:32 [debug] 24854\#0: epoll: fd:6 ev:0001 d:000000000887DC10
'
semaphore.t TEST 15: semaphore in body_filter_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,3 +1,5 @@
+sem: timeout,
+sem: 6 times,
sem: 1,
sem: API disabled in the context of body_filter_by_lua*,
sem: 1,
'
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/11/01 16:14:35 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:35 [debug] 24944\#0: add to free queue head semaphore: 000000000A204858 epoch: 3mid_epoch: 2 cur_epoch: 3
2020/11/01 16:14:35 [debug] 24944\#0: in lua gc, semaphore 000000000A1522F8
2020/11/01 16:14:35 [debug] 24944\#0: add to free queue head semaphore: 000000000A1522F8 epoch: 2mid_epoch: 2 cur_epoch: 3
2020/11/01 16:14:35 [debug] 24944\#0: in lua gc, semaphore 000000000A23CB38
2020/11/01 16:14:35 [debug] 24944\#0: add to free queue head semaphore: 000000000A23CB38 epoch: 3mid_epoch: 2 cur_epoch: 3
2020/11/01 16:14:35 [debug] 24944\#0: in lua gc, semaphore 00000000086D9BD8
2020/11/01 16:14:35 [debug] 24944\#0: add to free queue tail semaphore: 00000000086D9BD8 epoch: 1mid_epoch: 2 cur_epoch: 3
2020/11/01 16:14:35 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:35 [debug] 24944\#0: in lua gc, semaphore 000000000A216228
'
semaphore.t TEST 8: semaphore in init_worker_by_lua (new and post) - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:36 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:36 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:36 [debug] 24764\#0: *588 event timer add: 0: 1000:6318356
2020/11/01 16:14:36 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:36 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:36 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:36 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:36 [debug] 24764\#0: worker cycle
2020/11/01 16:14:36 [debug] 24764\#0: epoll timer: 1000
2020/11/01 16:14:36 [notice] 24094\#0: signal 17 (SIGCHLD) received from 24974
'
semaphore.t TEST 4: basic semaphore in subrequest - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:37 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:37 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:37 [debug] 24764\#0: *588 event timer add: 0: 1000:6319356
2020/11/01 16:14:37 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:37 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:37 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:37 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:37 [debug] 24764\#0: worker cycle
2020/11/01 16:14:37 [debug] 24764\#0: epoll timer: 1000
2020/11/01 16:14:37 [debug] 25034\#0: epoll: fd:6 ev:0001 d:0000000009B11960
'
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/11/01 16:14:38 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:38 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:38 [debug] 24764\#0: *588 event timer add: 0: 1000:6320360
2020/11/01 16:14:38 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:38 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:38 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:38 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:38 [debug] 24764\#0: worker cycle
'
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 30: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:42 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:42 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:42 [debug] 24764\#0: *588 event timer add: 0: 1000:6324372
2020/11/01 16:14:42 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:42 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:42 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:42 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:42 [debug] 24764\#0: worker cycle
2020/11/01 16:14:42 [debug] 24764\#0: epoll timer: 1000
2020/11/01 16:14:42 [debug] 25184\#0: *955 http request line: "GET /ver HTTP/1.1"
'
semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:14:44 [error] 24764\#0: *588 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:14:44 [debug] 24764\#0: http lua semaphore wait: 000000000A33CA78, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:14:44 [debug] 24764\#0: *588 event timer add: 0: 1000:6326372
2020/11/01 16:14:44 [debug] 24764\#0: http lua semaphore wait yielding
2020/11/01 16:14:44 [debug] 24764\#0: *588 lua resume returned 1
2020/11/01 16:14:44 [debug] 24764\#0: *588 lua thread yielded
2020/11/01 16:14:44 [debug] 24764\#0: *588 lua run thread returned -2
2020/11/01 16:14:44 [debug] 24764\#0: worker cycle
2020/11/01 16:14:44 [debug] 24764\#0: epoll timer: 1000
2020/11/01 16:14:44 [debug] 24094\#0: malloc: 0000000008536BB0:48
'
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 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:20812 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:20816 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *333 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/11/01 16:18:34 [error] 30148\#0: *333 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *333 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *333 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/11/01 16:18:34 [error] 30148\#0: *333 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *333 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/11/01 16:18:34 [error] 30148\#0: *333 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/11/01 16:18:34 [error] 30148\#0: *333 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/11/01 16:18:34 [error] 30148\#0: *333 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *333 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/11/01 16:18:34 [error] 30148#0: *333 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *333 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *333 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/11/01 16:18:34 [error] 30148#0: *333 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *333 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/11/01 16:18:34 [error] 30148#0: *333 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/11/01 16:18:34 [error] 30148#0: *333 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/11/01 16:18:34 [error] 30148#0: *333 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *336 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/11/01 16:18:34 [error] 30148\#0: *336 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *336 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *336 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/11/01 16:18:34 [error] 30148\#0: *336 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/11/01 16:18:34 [warn] 30148\#0: *336 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/11/01 16:18:34 [error] 30148\#0: *336 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/11/01 16:18:34 [error] 30148\#0: *336 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/11/01 16:18:34 [error] 30148\#0: *336 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *336 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/11/01 16:18:34 [error] 30148#0: *336 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *336 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *336 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/11/01 16:18:34 [error] 30148#0: *336 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/11/01 16:18:34 [warn] 30148#0: *336 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/11/01 16:18:34 [error] 30148#0: *336 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/11/01 16:18:34 [error] 30148#0: *336 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/11/01 16:18:34 [error] 30148#0: *336 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 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 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/11/01 16:18:41 [notice] 30176\#0: start worker processes log level:4 log body:2020/11/01 16:18:41 [error] 30336\#0: *183 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/11/01 16:18:41 [notice] 30176#0: start worker processes
log level:4
log body:2020/11/01 16:18:41 [error] 30336#0: *183 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 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/11/01 16:18:45 [notice] 30176\#0: start worker processes log level:4 log body:2020/11/01 16:18:46 [error] 30487\#0: *333 stream [lua] content_by_lua(nginx.conf:75):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2020/11/01 16:18:45 [notice] 30176#0: start worker processes
log level:4
log body:2020/11/01 16:18:46 [error] 30487#0: *333 stream [lua] content_by_lua(nginx.conf:75):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
end
maybe log lines: #2
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
end
maybe log lines: #1
end
\z)'
stream/request.t TEST 1: ngx.req.start_time() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'
Looks like you failed 1 test of 12.
stream/semaphore.t TEST 22: semaphore wait time is zero - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:21:41 [error] 2023\#0: *769 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:21:41 [debug] 2023\#0: stream lua semaphore wait: 00000000098C74E8, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:21:41 [debug] 2023\#0: *769 event timer add: 0: 1000:6742925
2020/11/01 16:21:41 [debug] 2023\#0: stream lua semaphore wait yielding
2020/11/01 16:21:41 [debug] 2023\#0: *769 lua resume returned 1
2020/11/01 16:21:41 [debug] 2023\#0: *769 lua thread yielded
2020/11/01 16:21:41 [debug] 2023\#0: *769 lua run thread returned -2
2020/11/01 16:21:41 [debug] 2023\#0: worker cycle
'
stream/semaphore.t TEST 29: basic semaphore count (negative number) - pattern "[error]" should not match any line in error.log but matches line "2020/11/01 16:21:42 [error] 2023\#0: *769 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/11/01 16:21:42 [debug] 2083\#0: *857 malloc: 0000000008FF65A0:80
2020/11/01 16:21:42 [debug] 2083\#0: *857 malloc: 0000000008BE7A20:16
2020/11/01 16:21:42 [debug] 2083\#0: *857 malloc: 0000000009A5F8E0:1024
2020/11/01 16:21:42 [debug] 2083\#0: *857 malloc: 0000000008C5DD50:16
2020/11/01 16:21:42 [debug] 2083\#0: *857 recv: eof:0, avail:-1
2020/11/01 16:21:42 [debug] 2083\#0: *857 recv: fd:8 77 of 1024
2020/11/01 16:21:42 [debug] 2083\#0: *857 reusable connection: 0
2020/11/01 16:21:42 [debug] 2023\#0: stream lua semaphore wait: 00000000098C74E8, timeout: 1000, resources: 0, event posted: 0
2020/11/01 16:21:42 [debug] 2023\#0: *769 event timer add: 0: 1000:6743925
'
stream/time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'
time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'

Warnings

Go back to the index page.