(This page was automatically generated by the tools in the opsboy project on 04:52:03 11-Oct-2024 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
fa3cd7ae 2024-08-16 09:00:16 GMT 9 61 92 12391 523 sec

LuaJIT

LuaJIT 2.1.1723681758, commit 4182d6bf

OpenSSL

OpenSSL 1.1.1w 11 Sep 2023

Compilation Errors

Segmentation Faults

Unexpected Failures

File Name Details
balancer-keepalive.t TEST 11: enable_keepalive: bad usage (bad context) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 00000000011F4878
lua balancer: keepalive closing connection 00000000011F4A68
lua balancer: keepalive closing connection 00000000011F4C58
lua balancer: keepalive closing connection 00000000011F4E48
lua balancer: keepalive closing connection 00000000011F5038
'
expected: ''
balancer-keepalive.t TEST 14: enable_keepalive: bad argument \#2 'max_requests' - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 0000000001207A88
lua balancer: keepalive closing connection 0000000001207C78
lua balancer: keepalive closing connection 0000000001207E68
lua balancer: keepalive closing connection 0000000001208058
lua balancer: keepalive closing connection 0000000001208248
'
expected: ''
balancer-keepalive.t TEST 13: enable_keepalive: bad argument \#1 'idle_timeout' - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 0000000001270F98
lua balancer: keepalive closing connection 0000000001271188
lua balancer: keepalive closing connection 0000000001271378
'
expected: ''
balancer-keepalive.t TEST 7: enable_keepalive: do not support reuse by TLS properties - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 00000000011FD2D8
lua balancer: keepalive closing connection 00000000011FD4C8
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive saving connection 0000000001268F88, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive reusing connection 0000000001268F88, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive saving connection 0000000001268F88, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive saving connection 0000000001269178, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive reusing connection 0000000001269178, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive saving connection 0000000001269178, host: 127.0.0.1:27575, name: test2.crt
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: test.crt
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:27575, name: test2.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: test2.crt
$)'
balancer-keepalive.t TEST 15: enable_keepalive: reaching 'max_requests > 0' closes keepalive connection (and frees empty pool) - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 0000000001268F88
lua balancer: keepalive closing connection 0000000001269178
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:
lua balancer: keepalive saving connection 00000000011FD2D8, host: 127.0.0.1:27575, name:
lua balancer: keepalive reusing connection 00000000011FD2D8, host: 127.0.0.1:27575, name:
lua balancer: keepalive saving connection 00000000011FD2D8, host: 127.0.0.1:27575, name:
lua balancer: keepalive reusing connection 00000000011FD2D8, host: 127.0.0.1:27575, name:
lua balancer: keepalive not saving connection 00000000011FD2D8
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:
lua balancer: keepalive saving connection 00000000011FD2D8, host: 127.0.0.1:27575, name:
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive not saving connection \S+
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: $)'
balancer-keepalive.t TEST 12: enable_keepalive: bad usage (no current peer) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 00000000011FD2D8
'
expected: ''
balancer-keepalive.t TEST 24: enable_keepalive: can be called again upon retry - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 00000000012073A8
lua balancer: keepalive no free connection, host: 127.0.0.3:27575, name:
lua balancer: keepalive not saving connection 0000000001206F48
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:
lua balancer: keepalive saving connection 0000000001206F48, host: 127.0.0.1:27575, name:
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.3:27575, name:\s
lua balancer: keepalive not saving connection \S+
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: $)'
balancer-keepalive.t TEST 6: upstream_keepalive_module: no granular pooling (TLS properties) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 0000000001206F48
'
expected: ''
balancer-keepalive.t TEST 25: enable_keepalive: must be called for each try - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 0000000001271090
lua balancer: keepalive closing connection 0000000001271280
lua balancer: keepalive no free connection, host: 127.0.0.3:27575, name: one
lua balancer: keepalive not saving connection 000000000120BD08
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: two
lua balancer: keepalive saving connection 000000000120BD08, host: 127.0.0.1:27575, name: two
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.3:27575, name: one
lua balancer: keepalive not saving connection \S+
lua balancer: keepalive no free connection, host: 127.0.0.1:27575, name: two
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:27575, name: two
$)'

Expected Failures

File Name Details
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:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:19 [warn] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:19 [warn] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:19 [warn] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *97 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:19 [warn] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:19 [warn] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:19 [warn] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *97 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:19 [warn] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:19 [warn] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:19 [warn] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:19 [error] 20901\#20901: *98 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:19 [warn] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:19 [warn] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:19 [warn] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:19 [error] 20901#20901: *98 [lua] content_by_lua(nginx.conf:72):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 nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 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 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:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:20 [warn] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:20 [warn] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *49 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:20 [warn] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:20 [warn] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *49 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:20 [warn] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:20 [warn] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:20 [error] 20983\#20983: *50 [lua] content_by_lua(nginx.conf:72):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:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:20 [warn] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:20 [warn] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:20 [error] 20983#20983: *50 [lua] content_by_lua(nginx.conf:72):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 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:2024/08/16 11:58:21 [notice] 20948\#20948: start worker processes log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *53 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *54 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *55 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *56 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *57 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *58 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *59 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *60 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *61 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *62 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *63 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *64 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *65 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *66 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *67 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *68 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *69 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *70 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:21 [info] 21017\#21017: *71 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2024/08/16 11:58:21 [notice] 20948#20948: start worker processes
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *53 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *54 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *55 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *56 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *57 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *58 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *59 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *60 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *61 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *62 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *63 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *64 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *65 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *66 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *67 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *68 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *69 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *70 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:21 [info] 21017#21017: *71 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:2024/08/16 11:58:21 [info] 21017\#21017: *72 client 127.0.0.1 closed keepalive connection log level:4 log body:2024/08/16 11:58:21 [error] 21017\#21017: *73 [lua] access_by_lua(nginx.conf:58):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:21 [error] 21017\#21017: *74 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:21 [info] 21017#21017: *72 client 127.0.0.1 closed keepalive connection
log level:4
log body:2024/08/16 11:58:21 [error] 21017#21017: *73 [lua] access_by_lua(nginx.conf:58):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:21 [error] 21017#21017: *74 [lua] access_by_lua(nginx.conf:58):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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2024/08/16 11:58:22 [notice] 20948\#20948: start worker processes log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *123 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *125 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *126 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *127 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *128 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *129 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *130 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *131 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *132 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2024/08/16 11:58:22 [notice] 20948#20948: start worker processes
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *123 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *125 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *126 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *127 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *128 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *129 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *130 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *131 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *132 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:2024/08/16 11:58:22 [info] 21106\#21106: *133 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *134 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *135 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *136 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *137 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *138 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *139 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *140 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *141 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:22 [info] 21106\#21106: *142 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *133 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *134 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *135 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *136 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *137 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *138 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *139 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *140 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *141 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:22 [info] 21106#21106: *142 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 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.723 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.723
log body: 2024/08/16 11:58:23 [error] 21225#21225: *240 [lua] content_by_lua(nginx.conf:67):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: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1723809503.772 log body: 2024/08/16 11:58:23 [error] 21225\#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1723809503.772
log body: 2024/08/16 11:58:23 [error] 21225#21225: *241 [lua] content_by_lua(nginx.conf:67):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")'
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 0)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2024/08/16 11:58:24 [warn] 21286\#21286: *288 [lua] content_by_lua(nginx.conf:59):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) '
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 1)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2024/08/16 11:58:24 [warn] 21286\#21286: *289 [lua] content_by_lua(nginx.conf:59):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) '
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2024/08/16 11:58:25 [notice] 20948\#20948: start worker processes log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *340 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *341 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *342 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *343 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *344 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *345 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *346 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *347 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *348 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2024/08/16 11:58:25 [notice] 20948#20948: start worker processes
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *340 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *341 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *342 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *343 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *344 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *345 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *346 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *347 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *348 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:2024/08/16 11:58:25 [info] 21376\#21376: *349 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *350 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *351 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *352 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *353 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *354 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *355 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *356 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *357 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/16 11:58:25 [info] 21376\#21376: *358 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *349 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *350 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *351 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *352 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *353 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *354 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *355 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *356 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *357 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/16 11:58:25 [info] 21376#21376: *358 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 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 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 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 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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:27 [warn] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:27 [warn] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *505 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:27 [error] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:27 [warn] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:27 [warn] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *505 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:27 [error] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:27 [warn] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/16 11:58:27 [warn] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/16 11:58:27 [error] 21556\#21556: *506 [lua] access_by_lua(nginx.conf:58):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:2024/08/16 11:58:27 [error] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:27 [warn] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/16 11:58:27 [warn] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/16 11:58:27 [error] 21556#21556: *506 [lua] access_by_lua(nginx.conf:58):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)'
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(nginx.conf:26):18 loop]
[TRACE 2 init_worker_by_lua(nginx.conf:50):4 loop]
[TRACE 2 content_by_lua(nginx.conf:76):4 loop]
process type in init_by_lua*: master
init_worker_by_lua(nginx.conf:50):10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua\(nginx.conf:\d+\):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(nginx.conf:26):18 loop]
[TRACE 2 init_worker_by_lua(nginx.conf:50):4 loop]
[TRACE 2 content_by_lua(nginx.conf:76):4 loop]
process type in init_by_lua*: master
init_worker_by_lua(nginx.conf:50):10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua\(nginx.conf:\d+\):10: process type: single
)'
semaphore.t TEST 9: semaphore in set_by_lua (wait is not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1,
sem: API disabled in the context of set_by_lua*,
'
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2024/08/16 12:03:57 [notice] 7635\#7635: start worker processes log level:4 log body:2024/08/16 12:03:57 [error] 7766\#7766: *142 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:2024/08/16 12:03:57 [notice] 7635#7635: start worker processes
log level:4
log body:2024/08/16 12:03:57 [error] 7766#7766: *142 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:3
'
expected: 'log lines:2
'
stream/errlog.t TEST 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:2024/08/16 12:04:00 [warn] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [warn] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [warn] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [error] 8009\#8009: *198 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:2024/08/16 12:04:00 [warn] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [warn] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [warn] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [error] 8009#8009: *198 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:2024/08/16 12:04:00 [warn] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [warn] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [warn] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [error] 8009\#8009: *201 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:2024/08/16 12:04:00 [warn] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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:2024/08/16 12:04:00 [warn] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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:2024/08/16 12:04:00 [warn] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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:2024/08/16 12:04:00 [error] 8009#8009: *201 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 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:33398 connected to
capture log line:2
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:1
$)'
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:2024/08/16 12:04:01 [notice] 8046\#8046: start worker processes log level:4 log body:2024/08/16 12:04:01 [error] 8053\#8053: *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:2024/08/16 12:04:01 [notice] 8046#8046: start worker processes
log level:4
log body:2024/08/16 12:04:01 [error] 8053#8053: *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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2024/08/16 12:04:01 [warn] 8081\#8081: *59 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:2024/08/16 12:04:01 [error] 8081\#8081: *59 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:2024/08/16 12:04:01 [warn] 8081\#8081: *59 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:2024/08/16 12:04:01 [error] 8081\#8081: *59 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:2024/08/16 12:04:01 [warn] 8081\#8081: *59 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:2024/08/16 12:04:01 [error] 8081\#8081: *59 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:2024/08/16 12:04:01 [warn] 8081#8081: *59 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:2024/08/16 12:04:01 [error] 8081#8081: *59 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:2024/08/16 12:04:01 [warn] 8081#8081: *59 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:2024/08/16 12:04:01 [error] 8081#8081: *59 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:2024/08/16 12:04:01 [warn] 8081#8081: *59 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:2024/08/16 12:04:01 [error] 8081#8081: *59 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:2024/08/16 12:04:01 [warn] 8081\#8081: *62 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:2024/08/16 12:04:01 [error] 8081\#8081: *62 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:2024/08/16 12:04:01 [warn] 8081\#8081: *62 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:2024/08/16 12:04:01 [error] 8081\#8081: *62 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:2024/08/16 12:04:01 [warn] 8081\#8081: *62 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:2024/08/16 12:04:01 [error] 8081\#8081: *62 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:2024/08/16 12:04:01 [warn] 8081#8081: *62 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:2024/08/16 12:04:01 [error] 8081#8081: *62 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:2024/08/16 12:04:01 [warn] 8081#8081: *62 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:2024/08/16 12:04:01 [error] 8081#8081: *62 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:2024/08/16 12:04:01 [warn] 8081#8081: *62 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:2024/08/16 12:04:01 [error] 8081#8081: *62 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 17: flood the capturing buffer (4k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2024/08/16 12:04:02 [error] 8115\#8115: *87 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:2024/08/16 12:04:02 [warn] 8115\#8115: *87 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:2024/08/16 12:04:02 [error] 8115\#8115: *87 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:2024/08/16 12:04:02 [error] 8115\#8115: *87 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:2024/08/16 12:04:02 [warn] 8115\#8115: *87 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:2024/08/16 12:04:02 [error] 8115\#8115: *87 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:2024/08/16 12:04:02 [error] 8115#8115: *87 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:2024/08/16 12:04:02 [warn] 8115#8115: *87 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:2024/08/16 12:04:02 [error] 8115#8115: *87 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:2024/08/16 12:04:02 [error] 8115#8115: *87 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:2024/08/16 12:04:02 [warn] 8115#8115: *87 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:2024/08/16 12:04:02 [error] 8115#8115: *87 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:2024/08/16 12:04:02 [error] 8115\#8115: *90 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:2024/08/16 12:04:02 [warn] 8115\#8115: *90 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:2024/08/16 12:04:02 [error] 8115\#8115: *90 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:2024/08/16 12:04:02 [error] 8115\#8115: *90 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:2024/08/16 12:04:02 [warn] 8115\#8115: *90 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:2024/08/16 12:04:02 [error] 8115\#8115: *90 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:2024/08/16 12:04:02 [error] 8115#8115: *90 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:2024/08/16 12:04:02 [warn] 8115#8115: *90 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:2024/08/16 12:04:02 [error] 8115#8115: *90 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:2024/08/16 12:04:02 [error] 8115#8115: *90 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:2024/08/16 12:04:02 [warn] 8115#8115: *90 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:2024/08/16 12:04:02 [error] 8115#8115: *90 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 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:2024/08/16 12:04:03 [warn] 8206\#8206: *172 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:2024/08/16 12:04:03 [error] 8206\#8206: *172 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:2024/08/16 12:04:03 [warn] 8206\#8206: *172 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:2024/08/16 12:04:03 [warn] 8206\#8206: *172 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:2024/08/16 12:04:03 [error] 8206\#8206: *172 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:2024/08/16 12:04:03 [warn] 8206\#8206: *172 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:2024/08/16 12:04:03 [error] 8206\#8206: *172 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:2024/08/16 12:04:03 [error] 8206\#8206: *172 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:2024/08/16 12:04:03 [error] 8206\#8206: *172 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:2024/08/16 12:04:03 [warn] 8206#8206: *172 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:2024/08/16 12:04:03 [error] 8206#8206: *172 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:2024/08/16 12:04:03 [warn] 8206#8206: *172 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:2024/08/16 12:04:03 [warn] 8206#8206: *172 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:2024/08/16 12:04:03 [error] 8206#8206: *172 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:2024/08/16 12:04:03 [warn] 8206#8206: *172 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:2024/08/16 12:04:03 [error] 8206#8206: *172 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:2024/08/16 12:04:03 [error] 8206#8206: *172 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:2024/08/16 12:04:03 [error] 8206#8206: *172 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:2024/08/16 12:04:03 [warn] 8206\#8206: *175 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:2024/08/16 12:04:03 [error] 8206\#8206: *175 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:2024/08/16 12:04:03 [warn] 8206\#8206: *175 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:2024/08/16 12:04:03 [warn] 8206\#8206: *175 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:2024/08/16 12:04:03 [error] 8206\#8206: *175 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:2024/08/16 12:04:03 [warn] 8206\#8206: *175 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:2024/08/16 12:04:03 [error] 8206\#8206: *175 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:2024/08/16 12:04:03 [error] 8206\#8206: *175 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:2024/08/16 12:04:03 [error] 8206\#8206: *175 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:2024/08/16 12:04:03 [warn] 8206#8206: *175 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:2024/08/16 12:04:03 [error] 8206#8206: *175 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:2024/08/16 12:04:03 [warn] 8206#8206: *175 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:2024/08/16 12:04:03 [warn] 8206#8206: *175 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:2024/08/16 12:04:03 [error] 8206#8206: *175 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:2024/08/16 12:04:03 [warn] 8206#8206: *175 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:2024/08/16 12:04:03 [error] 8206#8206: *175 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:2024/08/16 12:04:03 [error] 8206#8206: *175 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:2024/08/16 12:04:03 [error] 8206#8206: *175 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 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/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 9: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
stream/semaphore.t TEST 20: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2024/08/16 12:05:01 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/16 12:05:01 [debug] 12060\#12060: stream lua semaphore wait: 00007F65C1BCD028, timeout: 1000, resources: 0, event posted: 0
2024/08/16 12:05:01 [debug] 12060\#12060: *160 event timer add: 0: 1000:11156575
2024/08/16 12:05:01 [debug] 12060\#12060: stream lua semaphore wait yielding
2024/08/16 12:05:01 [debug] 12060\#12060: *160 lua resume returned 1
2024/08/16 12:05:01 [debug] 12060\#12060: *160 lua thread yielded
2024/08/16 12:05:01 [debug] 12060\#12060: *160 lua run thread returned -2
2024/08/16 12:05:01 [debug] 12060\#12060: worker cycle
'
stream/semaphore.t TEST 16: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2024/08/16 12:05:02 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/16 12:05:02 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2024/08/16 12:05:02 [debug] 12060\#12060: stream lua semaphore wait: 00007F65C1BCD028, timeout: 1000, resources: 0, event posted: 0
2024/08/16 12:05:02 [debug] 12060\#12060: *160 event timer add: 0: 1000:11157575
2024/08/16 12:05:02 [debug] 12060\#12060: stream lua semaphore wait yielding
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua resume returned 1
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua thread yielded
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua run thread returned -2
2024/08/16 12:05:02 [debug] 12060\#12060: worker cycle
2024/08/16 12:05:02 [debug] 12060\#12060: epoll timer: 1000
'
stream/semaphore.t TEST 16: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2024/08/16 12:05:02 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2024/08/16 12:05:02 [debug] 12060\#12060: stream lua semaphore wait: 00007F65C1BCD028, timeout: 1000, resources: 0, event posted: 0
2024/08/16 12:05:02 [debug] 12060\#12060: *160 event timer add: 0: 1000:11157575
2024/08/16 12:05:02 [debug] 12060\#12060: stream lua semaphore wait yielding
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua resume returned 1
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua thread yielded
2024/08/16 12:05:02 [debug] 12060\#12060: *160 lua run thread returned -2
2024/08/16 12:05:02 [debug] 12060\#12060: worker cycle
2024/08/16 12:05:02 [debug] 12060\#12060: epoll timer: 1000
2024/08/16 12:05:02 [debug] 12302\#12302: epoll: fd:7 ev:0001 d:00000000014B7698
'
stream/semaphore.t TEST 27: semaphore_mm free block (load <= 50% & the on the older side) - grep_error_log_out (req 0) got: 'free semaphore block
'
expected: ''
stream/semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2024/08/16 12:05:04 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/16 12:05:04 [debug] 12060\#12060: stream lua semaphore wait: 00007F65C1BCD028, timeout: 1000, resources: 0, event posted: 0
2024/08/16 12:05:04 [debug] 12060\#12060: *160 event timer add: 0: 1000:11159575
2024/08/16 12:05:04 [debug] 12060\#12060: stream lua semaphore wait yielding
2024/08/16 12:05:04 [debug] 12060\#12060: *160 lua resume returned 1
2024/08/16 12:05:04 [debug] 12060\#12060: *160 lua thread yielded
2024/08/16 12:05:04 [debug] 12060\#12060: *160 lua run thread returned -2
2024/08/16 12:05:04 [debug] 12060\#12060: worker cycle
2024/08/16 12:05:04 [debug] 12060\#12060: epoll timer: 1000
2024/08/16 12:05:04 [debug] 12454\#12454: epoll: fd:7 ev:0001 d:00000000014E8F58
'
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 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2024/08/16 12:05:06 [error] 12060\#12060: *160 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/16 12:05:06 [debug] 12060\#12060: stream lua semaphore wait: 00007F65C1BCD028, timeout: 1000, resources: 0, event posted: 0
2024/08/16 12:05:06 [debug] 12060\#12060: *160 event timer add: 0: 1000:11161575
2024/08/16 12:05:06 [debug] 12060\#12060: stream lua semaphore wait yielding
2024/08/16 12:05:06 [debug] 12060\#12060: *160 lua resume returned 1
2024/08/16 12:05:06 [debug] 12060\#12060: *160 lua thread yielded
2024/08/16 12:05:06 [debug] 12060\#12060: *160 lua run thread returned -2
2024/08/16 12:05:06 [debug] 12060\#12060: worker cycle
2024/08/16 12:05:06 [debug] 12060\#12060: epoll timer: 1000
2024/08/16 12:05:06 [debug] 12580\#12580: epoll: fd:7 ev:0001 d:00000000014EA538
'

Warnings

Go back to the index page.