(This page was automatically generated by the tools in the opsboy project on 03:17:25 31-May-2022 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
cf1aa0cb 2022-04-13 04:31:33 GMT 0 67 86 8948 462 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 70f88773

OpenSSL

OpenSSL 1.1.1n 15 Mar 2022

Compilation Errors

Unexpected Failures

(none)

Expected Failures

File Name Details
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: \#9
'
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 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 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2022/04/13 08:44:27 [notice] 23186\#23186: start worker processes log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *55 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *56 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *57 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *58 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *59 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *60 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *61 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *62 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *63 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2022/04/13 08:44:27 [notice] 23186#23186: start worker processes
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *55 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *56 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *57 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *58 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *59 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *60 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *61 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *62 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *63 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:2022/04/13 08:44:27 [info] 23257\#23257: *64 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *65 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *66 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *67 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *68 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *69 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *70 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *71 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *72 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:27 [info] 23257\#23257: *73 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *64 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *65 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *66 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *67 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *68 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *69 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *70 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *71 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *72 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:27 [info] 23257#23257: *73 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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2022/04/13 08:44:27 [notice] 23186\#23186: start worker processes log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *102 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *104 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *105 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *106 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *107 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *108 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *109 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *110 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *111 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2022/04/13 08:44:27 [notice] 23186#23186: start worker processes
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *102 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *104 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *105 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *106 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *107 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *108 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *109 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *110 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *111 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:2022/04/13 08:44:28 [info] 23319\#23319: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *114 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *115 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *116 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *117 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *118 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *119 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *120 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:28 [info] 23319\#23319: *121 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *112 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *113 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *114 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *115 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *116 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *117 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *118 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *119 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *120 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:28 [info] 23319#23319: *121 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t 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 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] content_by_lua(nginx.conf:102):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *25 [lua] content_by_lua(nginx.conf:102):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] content_by_lua(nginx.conf:102):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *25 [lua] content_by_lua(nginx.conf:102):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 90, 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+: --> 90, 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+: --> 100, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:30 [warn] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] content_by_lua(nginx.conf:102):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:30 [error] 23454\#23454: *26 [lua] content_by_lua(nginx.conf:102):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:30 [warn] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] content_by_lua(nginx.conf:102):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:30 [error] 23454#23454: *26 [lua] content_by_lua(nginx.conf:102):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 90, 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+: --> 90, 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+: --> 100, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, 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 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:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:31 [warn] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:31 [warn] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] content_by_lua(nginx.conf:104):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] content_by_lua(nginx.conf:104):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *97 [lua] content_by_lua(nginx.conf:104):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:31 [warn] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:31 [warn] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] access_by_lua(nginx.conf:70):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] content_by_lua(nginx.conf:104):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] content_by_lua(nginx.conf:104):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *97 [lua] content_by_lua(nginx.conf:104):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
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+: --> 90, 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+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 91, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
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:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:31 [warn] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:31 [warn] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] content_by_lua(nginx.conf:104):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] content_by_lua(nginx.conf:104):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:31 [error] 23544\#23544: *98 [lua] content_by_lua(nginx.conf:104):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:31 [warn] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:31 [warn] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] access_by_lua(nginx.conf:70):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] content_by_lua(nginx.conf:104):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] content_by_lua(nginx.conf:104):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:31 [error] 23544#23544: *98 [lua] content_by_lua(nginx.conf:104):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
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+: --> 90, 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+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 91, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, 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+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:33 [warn] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:33 [warn] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log lines: #25
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:33 [warn] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:33 [warn] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *242 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Alog lines: #26
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, 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+: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 100, 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+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:33 [warn] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2022/04/13 08:44:33 [warn] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2022/04/13 08:44:33 [error] 23726\#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log lines: #25
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:33 [warn] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2022/04/13 08:44:33 [warn] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2022/04/13 08:44:33 [error] 23726#23726: *243 [lua] access_by_lua(nginx.conf:70):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Alog lines: #26
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+: --> 88, 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+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 89, 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+: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
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+: --> 100, 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+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
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 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:2022/04/13 08:44:35 [notice] 23447\#23447: start worker processes log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *390 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *391 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *392 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *393 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *394 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *395 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *396 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *397 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *398 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *399 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *400 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *401 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *402 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *403 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *404 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *405 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *406 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *407 client 127.0.0.1 closed keepalive connection log level:7 log body:2022/04/13 08:44:35 [info] 23934\#23934: *408 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2022/04/13 08:44:35 [notice] 23447#23447: start worker processes
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *390 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *391 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *392 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *393 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *394 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *395 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *396 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *397 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *398 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *399 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *400 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *401 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *402 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *403 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *404 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *405 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *406 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *407 client 127.0.0.1 closed keepalive connection
log level:7
log body:2022/04/13 08:44:35 [info] 23934#23934: *408 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:2022/04/13 08:44:35 [info] 23934\#23934: *409 client 127.0.0.1 closed keepalive connection log level:4 log body:2022/04/13 08:44:35 [error] 23934\#23934: *410 [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:2022/04/13 08:44:35 [error] 23934\#23934: *411 [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:2022/04/13 08:44:35 [info] 23934#23934: *409 client 127.0.0.1 closed keepalive connection
log level:4
log body:2022/04/13 08:44:35 [error] 23934#23934: *410 [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:2022/04/13 08:44:35 [error] 23934#23934: *411 [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 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [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: 1649839475.701
log body: 2022/04/13 08:44:35 [error] 23962#23962: *434 [lua] content_by_lua(nginx.conf:84):8: **********31, 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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [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: 1649839475.75 log body: 2022/04/13 08:44:35 [error] 23962\#23962: *435 [lua] content_by_lua(nginx.conf:84):8: **********39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [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: 1649839475.75
log body: 2022/04/13 08:44:35 [error] 23962#23962: *435 [lua] content_by_lua(nginx.conf:84):8: **********39, 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")'
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 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:47:43 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:47:43 [debug] 2713\#2713: http lua semaphore wait: 00000000021B7598, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:47:43 [debug] 2713\#2713: *75 event timer add: 0: 1000:15439980
2022/04/13 08:47:43 [debug] 2713\#2713: http lua semaphore wait yielding
2022/04/13 08:47:43 [debug] 2713\#2713: *75 lua resume returned 1
2022/04/13 08:47:43 [debug] 2713\#2713: *75 lua thread yielded
2022/04/13 08:47:43 [debug] 2713\#2713: *75 lua run thread returned -2
2022/04/13 08:47:43 [debug] 2713\#2713: worker cycle
2022/04/13 08:47:43 [debug] 2713\#2713: epoll timer: 1000
2022/04/13 08:47:43 [debug] 2877\#2877: epoll: fd:6 ev:0001 d:0000000002136420
'
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 8: semaphore in init_worker_by_lua (new and post) - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:47:45 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000217E090:56
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D5D0:16
2022/04/13 08:47:45 [error] 2713\#2713: *75 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D5F0:11
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D610:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D630:64
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABE60:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021B19C0:1024
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABE80:16
'
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 "2022/04/13 08:47:45 [error] 2713\#2713: *75 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D5F0:11
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D610:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 000000000212D630:64
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABE60:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021B19C0:1024
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABE80:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABEA0:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABEC0:16
2022/04/13 08:47:45 [debug] 2617\#2617: malloc: 00000000021ABEE0:56
'
semaphore.t TEST 25: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:47:46 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2022/04/13 08:47:46 [debug] 2713\#2713: http lua semaphore wait: 00000000021B7598, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:47:46 [debug] 2713\#2713: *75 event timer add: 0: 1000:15442980
2022/04/13 08:47:46 [debug] 2713\#2713: http lua semaphore wait yielding
2022/04/13 08:47:46 [debug] 2713\#2713: *75 lua resume returned 1
2022/04/13 08:47:46 [debug] 2713\#2713: *75 lua thread yielded
2022/04/13 08:47:46 [debug] 2713\#2713: *75 lua run thread returned -2
2022/04/13 08:47:46 [debug] 2713\#2713: 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 "2022/04/13 08:47:47 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:47:47 [debug] 3203\#3203: *474 malloc: 00000000021A0380:120
2022/04/13 08:47:47 [debug] 3203\#3203: *474 malloc: 0000000002154290:16
2022/04/13 08:47:47 [debug] 3203\#3203: *474 lua body filter for user lua code, uri "/ver"
2022/04/13 08:47:47 [debug] 3203\#3203: *474 lua capture body filter, uri "/ver"
2022/04/13 08:47:47 [debug] 3203\#3203: *474 image filter
2022/04/13 08:47:47 [debug] 3203\#3203: *474 http postpone filter "/ver?" 00007FFC6ECFF960
2022/04/13 08:47:47 [debug] 3203\#3203: *474 write new buf t:0 f:0 0000000000000000, pos 00000000021728B0, size: 10 file: 0, size: 0
2022/04/13 08:47:47 [debug] 3203\#3203: *474 http write filter: l:1 f:0 s:10
2022/04/13 08:47:47 [debug] 2713\#2713: http lua semaphore wait: 00000000021B7598, timeout: 1000, resources: 0, event posted: 0
'
semaphore.t TEST 32: semaphore wait time is zero - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:47:48 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2022/04/13 08:47:48 [debug] 2713\#2713: http lua semaphore wait: 00000000021B7598, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:47:48 [debug] 2713\#2713: *75 event timer add: 0: 1000:15444980
2022/04/13 08:47:48 [debug] 2713\#2713: http lua semaphore wait yielding
2022/04/13 08:47:48 [debug] 2713\#2713: *75 lua resume returned 1
2022/04/13 08:47:48 [debug] 2713\#2713: *75 lua thread yielded
2022/04/13 08:47:48 [debug] 2713\#2713: *75 lua run thread returned -2
2022/04/13 08:47:48 [debug] 2713\#2713: worker cycle
'
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
+sem: timeout,
+sem: 6 times,
'
semaphore.t TEST 10: semaphore in rewrite_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
semaphore.t TEST 9: semaphore in set_by_lua (wait is not allowed) - grep_error_log_out (req 1) @@ -1,2 +1,3 @@
sem: 1,
sem: API disabled in the context of set_by_lua*,
+sem: timeout,
'
semaphore.t TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:47:55 [error] 2713\#2713: *75 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:47:55 [debug] 2713\#2713: http lua semaphore wait: 00000000021B7598, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:47:55 [debug] 2713\#2713: *75 event timer add: 0: 1000:15451982
2022/04/13 08:47:55 [debug] 2713\#2713: http lua semaphore wait yielding
2022/04/13 08:47:55 [debug] 2713\#2713: *75 lua resume returned 1
2022/04/13 08:47:55 [debug] 2713\#2713: *75 lua thread yielded
2022/04/13 08:47:55 [debug] 2713\#2713: *75 lua run thread returned -2
2022/04/13 08:47:55 [debug] 2713\#2713: worker cycle
2022/04/13 08:47:55 [debug] 2713\#2713: epoll timer: 1000
2022/04/13 08:47:55 [debug] 3762\#3762: timer delta: 11
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to get ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to get ttl: not found
'
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:2022/04/13 08:49:19 [notice] 8962\#8962: start worker processes log level:4 log body:2022/04/13 08:49:19 [error] 8975\#8975: *31 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:2022/04/13 08:49:19 [notice] 8962#8962: start worker processes
log level:4
log body:2022/04/13 08:49:19 [error] 8975#8975: *31 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 17: flood the capturing buffer (4k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:20 [warn] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):10: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:20 [warn] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #25
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:20 [warn] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):10: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:20 [warn] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *143 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #26
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+: --> 88, 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+: --> 89, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 17: flood the capturing buffer (4k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:20 [warn] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):10: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:20 [warn] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:20 [error] 9093\#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #25
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:20 [warn] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):10: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 89, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:20 [warn] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:20 [error] 9093#9093: *146 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #26
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+: --> 88, 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+: --> 89, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 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 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 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:56472 connected to
capture log line:2
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:1
$)'
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2022/04/13 08:49:22 [notice] 9168\#9168: start worker processes log level:4 log body:2022/04/13 08:49:22 [error] 9237\#9237: *87 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:2022/04/13 08:49:22 [notice] 9168#9168: start worker processes
log level:4
log body:2022/04/13 08:49:22 [error] 9237#9237: *87 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 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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *310 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:25 [warn] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:25 [error] 9473\#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:25 [warn] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:25 [error] 9473#9473: *313 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:4
'
expected: 'log lines:3
'
stream/errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *394 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *394 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2022/04/13 08:49:26 [warn] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2022/04/13 08:49:26 [error] 9570\#9570: *397 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2022/04/13 08:49:26 [warn] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2022/04/13 08:49:26 [error] 9570#9570: *397 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 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:2022/04/13 08:49:27 [warn] 9660\#9660: *478 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:2022/04/13 08:49:27 [error] 9660\#9660: *478 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:2022/04/13 08:49:27 [warn] 9660\#9660: *478 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:2022/04/13 08:49:27 [warn] 9660\#9660: *478 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:2022/04/13 08:49:27 [error] 9660\#9660: *478 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:2022/04/13 08:49:27 [warn] 9660\#9660: *478 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:2022/04/13 08:49:27 [error] 9660\#9660: *478 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:2022/04/13 08:49:27 [error] 9660\#9660: *478 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:2022/04/13 08:49:27 [error] 9660\#9660: *478 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:2022/04/13 08:49:27 [warn] 9660#9660: *478 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:2022/04/13 08:49:27 [error] 9660#9660: *478 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:2022/04/13 08:49:27 [warn] 9660#9660: *478 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:2022/04/13 08:49:27 [warn] 9660#9660: *478 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:2022/04/13 08:49:27 [error] 9660#9660: *478 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:2022/04/13 08:49:27 [warn] 9660#9660: *478 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:2022/04/13 08:49:27 [error] 9660#9660: *478 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:2022/04/13 08:49:27 [error] 9660#9660: *478 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:2022/04/13 08:49:27 [error] 9660#9660: *478 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:2022/04/13 08:49:27 [warn] 9660\#9660: *481 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:2022/04/13 08:49:27 [error] 9660\#9660: *481 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:2022/04/13 08:49:27 [warn] 9660\#9660: *481 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:2022/04/13 08:49:27 [warn] 9660\#9660: *481 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:2022/04/13 08:49:27 [error] 9660\#9660: *481 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:2022/04/13 08:49:27 [warn] 9660\#9660: *481 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:2022/04/13 08:49:27 [error] 9660\#9660: *481 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:2022/04/13 08:49:27 [error] 9660\#9660: *481 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:2022/04/13 08:49:27 [error] 9660\#9660: *481 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:2022/04/13 08:49:27 [warn] 9660#9660: *481 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:2022/04/13 08:49:27 [error] 9660#9660: *481 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:2022/04/13 08:49:27 [warn] 9660#9660: *481 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:2022/04/13 08:49:27 [warn] 9660#9660: *481 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:2022/04/13 08:49:27 [error] 9660#9660: *481 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:2022/04/13 08:49:27 [warn] 9660#9660: *481 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:2022/04/13 08:49:27 [error] 9660#9660: *481 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:2022/04/13 08:49:27 [error] 9660#9660: *481 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:2022/04/13 08:49:27 [error] 9660#9660: *481 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/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)
stream/process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:31 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:78):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
)'
stream/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)
stream/process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:31 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:78):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
)'
stream/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:50:26 [error] 13598\#13598: *296 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:50:26 [debug] 13598\#13598: stream lua semaphore wait: 00007F41A8000028, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:50:26 [debug] 13598\#13598: *296 event timer add: 0: 1000:15603088
2022/04/13 08:50:26 [debug] 13598\#13598: stream lua semaphore wait yielding
2022/04/13 08:50:26 [debug] 13598\#13598: *296 lua resume returned 1
2022/04/13 08:50:26 [debug] 13598\#13598: *296 lua thread yielded
2022/04/13 08:50:26 [debug] 13598\#13598: *296 lua run thread returned -2
2022/04/13 08:50:26 [debug] 13598\#13598: worker cycle
2022/04/13 08:50:26 [debug] 13598\#13598: epoll timer: 1000
2022/04/13 08:50:26 [debug] 13664\#13664: epoll: fd:7 ev:0001 d:000000000172B600
'
stream/semaphore.t TEST 7: semaphore in init_worker_by_lua (new and post) - pattern "[error]" should not match any line in error.log but matches line "2022/04/13 08:50:27 [error] 13598\#13598: *296 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:50:27 [debug] 13598\#13598: stream lua semaphore wait: 00007F41A8000028, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:50:27 [debug] 13598\#13598: *296 event timer add: 0: 1000:15604088
2022/04/13 08:50:27 [debug] 13598\#13598: stream lua semaphore wait yielding
2022/04/13 08:50:27 [debug] 13598\#13598: *296 lua resume returned 1
2022/04/13 08:50:27 [debug] 13598\#13598: *296 lua thread yielded
2022/04/13 08:50:27 [debug] 13598\#13598: *296 lua run thread returned -2
2022/04/13 08:50:27 [debug] 13598\#13598: worker cycle
2022/04/13 08:50:27 [debug] 13598\#13598: epoll timer: 1000
2022/04/13 08:50:27 [debug] 13269\#13269: child: 0 13754 e:0 t:0 d:0 r:1 j:1
'
stream/semaphore.t TEST 11: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,4 @@
sem: timeout,
sem: 1,
+sem: timeout,
+sem: 3 times,
'
stream/semaphore.t TEST 30: 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 "2022/04/13 08:50:30 [error] 13598\#13598: *296 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2022/04/13 08:50:30 [debug] 13598\#13598: stream lua semaphore wait: 00007F41A8000028, timeout: 1000, resources: 0, event posted: 0
2022/04/13 08:50:30 [debug] 13598\#13598: *296 event timer add: 0: 1000:15607088
2022/04/13 08:50:30 [debug] 13598\#13598: stream lua semaphore wait yielding
2022/04/13 08:50:30 [debug] 13598\#13598: *296 lua resume returned 1
2022/04/13 08:50:30 [debug] 13598\#13598: *296 lua thread yielded
2022/04/13 08:50:30 [debug] 13598\#13598: *296 lua run thread returned -2
2022/04/13 08:50:30 [debug] 13598\#13598: worker cycle
2022/04/13 08:50:30 [debug] 13598\#13598: epoll timer: 1000
2022/04/13 08:50:30 [debug] 13269\#13269: child: 0 13936 e:0 t:0 d:0 r:1 j:0
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
'

Warnings

Go back to the index page.