(This page was automatically generated by the tools in the opsboy project on 00:22:39 30-Oct-2025 GMT.)
| Commit | Testing Time | Unexpected Failures |
Expected Failures |
Files | Tests | Elapsed Time |
|---|---|---|---|---|---|---|
| 8bfffde5 | 2025-10-28 04:52:16 GMT | 0 | 74 | 93 | 12537 | 616 sec |
| File | Name | Details |
|---|---|---|
| balancer-keepalive.t | TEST 5: enable_keepalive: sanity (dynamic sni option) - grep_error_log_out (req 0) |
'lua balancer: keepalive closing connection 0000000020899578 lua balancer: keepalive closing connection 0000000020899768 lua balancer: keepalive closing connection 0000000020899958 lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: one lua balancer: keepalive saving connection 0000000020911878, host: 127.0.0.1:33391, name: one lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: two lua balancer: keepalive saving connection 0000000020911A68, host: 127.0.0.1:33391, name: two ' doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: one lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: one lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: two lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: two $)' |
| balancer-keepalive.t | TEST 23: enable_keepalive: does not save timed out connections - grep_error_log_out (req 0) |
'lua balancer: keepalive closing connection 0000000020911878 lua balancer: keepalive closing connection 0000000020911A68 lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: lua balancer: keepalive not saving connection 0000000020899578 ' doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name:\s lua balancer: keepalive not saving connection \S+$)' |
| 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 0000000020911878 lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive saving connection 0000000020899578, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive reusing connection 0000000020899578, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive saving connection 0000000020899578, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive saving connection 0000000020899768, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive reusing connection 0000000020899768, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive saving connection 0000000020899768, host: 127.0.0.1:33391, name: test2.crt ' doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: test.crt lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:33391, name: test2.crt lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: test2.crt $)' |
| balancer-keepalive.t | TEST 4: enable_keepalive: sanity - grep_error_log_out (req 0) |
'lua balancer: keepalive closing connection 0000000020899578 lua balancer: keepalive closing connection 0000000020899768 lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: one lua balancer: keepalive saving connection 0000000020934938, host: 127.0.0.1:33391, name: one lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: two lua balancer: keepalive saving connection 0000000020934B28, host: 127.0.0.1:33391, name: two lua balancer: keepalive no free connection, host: 127.0.0.2:33391, name: two lua balancer: keepalive saving connection 0000000020934D18, host: 127.0.0.2:33391, name: two lua balancer: keepalive no free connection, host: 127.0.0.2:33391, name: three lua balancer: keepalive saving connection 0000000020934F08, host: 127.0.0.2:33391, name: three lua balancer: keepalive no free connection, host: 127.0.0.2:40981, name: three lua balancer: keepalive saving connection 00000000209350F8, host: 127.0.0.2:40981, name: three ' doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: one lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: one lua balancer: keepalive no free connection, host: 127.0.0.1:33391, name: two lua balancer: keepalive saving connection \S+, host: 127.0.0.1:33391, name: two lua balancer: keepalive no free connection, host: 127.0.0.2:33391, name: two lua balancer: keepalive saving connection \S+, host: 127.0.0.2:33391, name: two lua balancer: keepalive no free connection, host: 127.0.0.2:33391, name: three lua balancer: keepalive saving connection \S+, host: 127.0.0.2:33391, name: three lua balancer: keepalive no free connection, host: 127.0.0.2:40981, name: three lua balancer: keepalive saving connection \S+, host: 127.0.0.2:40981, name: three$)' |
| balancer-keepalive.t | TEST 13: enable_keepalive: bad argument #1 'idle_timeout' - grep_error_log_out (req 0) |
got: 'lua balancer: keepalive closing connection 0000000020934938 lua balancer: keepalive closing connection 0000000020934B28 lua balancer: keepalive closing connection 0000000020934D18 lua balancer: keepalive closing connection 0000000020934F08 lua balancer: keepalive closing connection 00000000209350F8 ' expected: '' |
| balancer-keepalive.t | TEST 22: enable_keepalive: does not save bad connections - grep_error_log_out (req 0) |
'lua balancer: keepalive closing connection 00000000208BFD08 lua balancer: keepalive no free connection, host: 127.0.0.3:33391, name: lua balancer: keepalive not saving connection 00000000208BFD08 ' doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.3:33391, name:\s lua balancer: keepalive not saving connection \S+$)' |
| balancer-keepalive.t | TEST 1: upstream_keepalive_module: sanity (nginx default) - grep_error_log_out (req 0) |
got: 'lua balancer: keepalive closing connection 0000000020929038 lua balancer: keepalive closing connection 0000000020929228 lua balancer: keepalive closing connection 0000000020929418 ' expected: '' |
| balancer-keepalive.t | TEST 8: set_current_peer: bad argument #4 'sni' - grep_error_log_out (req 0) |
got: 'lua balancer: keepalive closing connection 00000000208BFD08 ' expected: '' |
| errlog.t | nginx: [emerg] | invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25 |
| errlog.t | TEST 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 0, req 0) |
@@ -1,2 +1,2 @@ log lines: #18 -log lines: #8 +log lines: #10 |
| errlog.t | TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [lua] content_by_lua(nginx.conf:67):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [lua] content_by_lua(nginx.conf:67):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [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: 1761638253.383 log body: 2025/10/28 07:57:33 [error] 9742#9742: *49 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" ' doesn't match '(?^s:log level: 4 log time: \d+(?:\.\d+)? log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: \d{10}(?:\.\d+)? log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")' |
| errlog.t | TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [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: 1761638253.432 log body: 2025/10/28 07:57:33 [error] 9742#9742: *50 [lua] content_by_lua(nginx.conf:67):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" ' doesn't match '(?^s:log level: 4 log time: \d+(?:\.\d+)? log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: \d{10}(?:\.\d+)? log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")' |
| errlog.t | TEST 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:2025/10/28 07:57:34 [notice] 9705#9705: start worker processes log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *78 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *80 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *81 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *82 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *83 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *84 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *85 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *86 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *87 client 127.0.0.1 closed keepalive connection end maybe log lines: #10 log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *88 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *89 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *90 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *91 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *92 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *93 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *94 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *95 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *96 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *97 client 127.0.0.1 closed keepalive connection end) |
'maybe log lines: #10 log level:6 log body:2025/10/28 07:57:34 [notice] 9705#9705: start worker processes log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *78 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *80 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *81 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *82 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *83 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *84 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *85 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *86 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *87 client 127.0.0.1 closed keepalive connection end maybe log lines: #10 log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *88 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *89 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *90 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *91 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *92 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *93 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *94 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *95 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *96 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *97 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: #4 log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *98 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *99 client 127.0.0.1 closed keepalive connection log level:4 log body:2025/10/28 07:57:34 [error] 9802#9802: *100 [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:2025/10/28 07:57:34 [error] 9802#9802: *101 [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: #4 end) |
'maybe log lines: #4 log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *98 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:34 [info] 9802#9802: *99 client 127.0.0.1 closed keepalive connection log level:4 log body:2025/10/28 07:57:34 [error] 9802#9802: *100 [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:2025/10/28 07:57:34 [error] 9802#9802: *101 [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: #4 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 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:2025/10/28 07:57:34 [warn] 9832#9832: *125 [lua] access_by_lua(nginx.conf:58):10: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [warn] 9832#9832: *125 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [warn] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:5 log body:2025/10/28 07:57:34 [warn] 9832#9832: *125 [lua] access_by_lua(nginx.conf:58):10: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [warn] 9832#9832: *125 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [warn] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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:2025/10/28 07:57:34 [error] 9832#9832: *125 [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 | nginx: [emerg] | invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25 |
| errlog.t | TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) |
got: 'log lines:10 ' expected: 'log lines:2 ' |
| errlog.t | TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 1, req 0) |
got: 'log lines:10 ' expected: 'log lines:2 ' |
| errlog.t | TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2025/10/28 07:57:38 [notice] 365#365: start worker processes log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *29 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *30 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *31 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *32 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *33 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *34 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *35 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *36 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *37 client 127.0.0.1 closed keepalive connection) |
'log level:6 log body:2025/10/28 07:57:38 [notice] 365#365: start worker processes log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *29 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *30 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *31 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *32 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *33 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *34 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *35 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *36 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *37 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:2025/10/28 07:57:38 [info] 402#402: *38 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *39 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *40 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *41 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *42 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *43 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *44 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *45 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *46 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *47 client 127.0.0.1 closed keepalive connection) |
'log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *38 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *39 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *40 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *41 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *42 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *43 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *44 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *45 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *46 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:38 [info] 402#402: *47 client 127.0.0.1 closed keepalive connection ' doesn't match '(?^s:log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" )' |
| errlog.t | TEST 21: multi-line error log - response_body_like - response is expected (log lines: #10 log level:6 log body:2025/10/28 07:57:39 [notice] 365#365: start worker processes log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *100 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *102 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *103 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *104 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *105 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *106 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *107 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *108 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *109 client 127.0.0.1 closed keepalive connection) |
'log lines: #10 log level:6 log body:2025/10/28 07:57:39 [notice] 365#365: start worker processes log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *100 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *102 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *103 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *104 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *105 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *106 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *107 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *108 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *109 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:2025/10/28 07:57:39 [info] 489#489: *110 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *111 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *114 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *115 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *116 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *117 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *118 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *119 client 127.0.0.1 closed keepalive connection) |
'log lines: #10 log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *110 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *111 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *114 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *115 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *116 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *117 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *118 client 127.0.0.1 closed keepalive connection log level:7 log body:2025/10/28 07:57:39 [info] 489#489: *119 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 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 ' |
| 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 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) |
@@ -1,2 +1,3 @@ sem: 1 while logging request, sem: API disabled in the context of log_by_lua* while logging request, +sem: timeout, |
| semaphore.t | TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:01:57 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:01:57 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:01:57 [debug] 2279#2279: *158 event timer add: 0: 1000:11405749 2025/10/28 08:01:57 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:01:57 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:01:57 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:01:57 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:01:57 [debug] 2279#2279: worker cycle 2025/10/28 08:01:57 [debug] 2279#2279: epoll timer: 1000 2025/10/28 08:01:57 [debug] 2369#2369: epoll: fd:6 ev:0001 d:000000000CCB6300 ' |
| semaphore.t | TEST 31: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:01:58 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:01:58 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:01:58 [debug] 2279#2279: *158 event timer add: 0: 1000:11406749 2025/10/28 08:01:58 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:01:58 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:01:58 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:01:58 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:01:58 [debug] 2279#2279: worker cycle 2025/10/28 08:01:58 [debug] 2279#2279: epoll timer: 1000 2025/10/28 08:01:58 [debug] 2431#2431: epoll: fd:6 ev:0001 d:000000000CC9BDC0 ' |
| semaphore.t | TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) |
@@ -1,2 +1,4 @@ sem: timeout, +sem: 6 times, +sem: timeout, sem: 1, |
| semaphore.t | TEST 39: basic semaphore count (negative number) - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:02:01 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:02:01 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:02:01 [debug] 2279#2279: *158 event timer add: 0: 1000:11409749 2025/10/28 08:02:01 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:02:01 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:02:01 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:02:01 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:02:01 [debug] 2279#2279: worker cycle 2025/10/28 08:02:01 [debug] 2279#2279: epoll timer: 1000 2025/10/28 08:02:01 [debug] 2607#2607: timer delta: 11 ' |
| semaphore.t | TEST 30: main thread wait a light thread that is waiting on a semaphore - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:02:02 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:02:02 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:02:02 [debug] 2279#2279: *158 event timer add: 0: 1000:11410749 2025/10/28 08:02:02 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:02:02 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:02:02 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:02:02 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:02:02 [debug] 2279#2279: worker cycle ' |
| semaphore.t | TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:02:03 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:02:03 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:02:03 [debug] 2279#2279: *158 event timer add: 0: 1000:11411749 2025/10/28 08:02:03 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:02:03 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:02:03 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:02:03 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:02:03 [debug] 2279#2279: worker cycle ' |
| semaphore.t | TEST 40: bugfix: semaphore instance can't be garbage collected when someone is waiting on it - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:02:04 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:02:04 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:02:04 [debug] 2279#2279: *158 event timer add: 0: 1000:11412749 2025/10/28 08:02:04 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:02:04 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:02:04 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:02:04 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:02:04 [debug] 2279#2279: worker cycle 2025/10/28 08:02:04 [debug] 2279#2279: epoll timer: 1000 2025/10/28 08:02:04 [debug] 2090#2090: malloc: 000000000CC89090:32 ' |
| semaphore.t | TEST 14: semaphore in header_filter_by_lua (wait not allowed) - grep_error_log_out (req 0) |
@@ -1,2 +1,4 @@ +sem: timeout, +sem: 6 times, sem: 1, sem: API disabled in the context of header_filter_by_lua*, |
| semaphore.t | TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:02:07 [error] 2279#2279: *158 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:02:07 [debug] 2279#2279: http lua semaphore wait: 00007FD7E0B27028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:02:07 [debug] 2279#2279: *158 event timer add: 0: 1000:11415749 2025/10/28 08:02:07 [debug] 2279#2279: http lua semaphore wait yielding 2025/10/28 08:02:07 [debug] 2279#2279: *158 lua resume returned 1 2025/10/28 08:02:07 [debug] 2279#2279: *158 lua thread yielded 2025/10/28 08:02:07 [debug] 2279#2279: *158 lua run thread returned -2 2025/10/28 08:02:07 [debug] 2279#2279: worker cycle 2025/10/28 08:02:07 [debug] 2279#2279: epoll timer: 1000 2025/10/28 08:02:07 [debug] 3008#3008: epoll: fd:6 ev:0001 d:000000000CC40D20 ' |
| semaphore.t | TEST 15: semaphore in body_filter_by_lua (wait not allowed) - grep_error_log_out (req 0) |
@@ -1,3 +1,4 @@ +sem: timeout, sem: 1, sem: API disabled in the context of body_filter_by_lua*, sem: 1, |
| semaphore.t | TEST 12: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) |
@@ -1,2 +1,4 @@ sem: timeout, +sem: 6 times, +sem: timeout, sem: 1, |
| shared.t | TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 0, req 0) |
got: '' expected: 'failed to set ttl: not found ' |
| shared.t | TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 1, req 0) |
got: '' expected: 'failed to set ttl: not found ' |
| shared.t | TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 0, req 0) |
got: '' expected: 'failed to get ttl: not found ' |
| shared.t | TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 1, req 0) |
got: '' expected: 'failed to get ttl: not found ' |
| 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 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:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) |
'msg count: 3 log level:5 log body:2025/10/28 08:04:00 [warn] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 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:2025/10/28 08:04:00 [warn] 8542#8542: *88 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:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2025/10/28 08:04:00 [error] 8542#8542: *88 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985 ' doesn't match '(?^s:\Amsg count: 3 log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+ msg count: 3 log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+ |msg count: 3 log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+ msg count: 3 log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:5 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+ log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+ \z)' |
| stream/errlog.t | TEST 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [warn] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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:2025/10/28 08:04:00 [error] 8542#8542: *91 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 3: client connected info - grep_error_log_out (req 0) |
'client 127.0.0.1:48260 connected to capture log line:10 ' doesn't match '(?^:^client .*? connected to .*? capture log line:1 $)' |
| stream/errlog.t | TEST 3: client connected info - grep_error_log_out (req 1) |
'client 127.0.0.1:48274 connected to capture log line:10 ' doesn't match '(?^:^client .*? connected to .*? capture log line:2 $)' |
| stream/errlog.t | nginx: [emerg] | invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17 |
| stream/errlog.t | TEST 21: multi-line error log - response_body_like - response is expected (log lines: #2 log level:6 log body:2025/10/28 08:04:02 [notice] 8636#8636: start worker processes log level:4 log body:2025/10/28 08:04:02 [error] 8637#8637: *3 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:2025/10/28 08:04:02 [notice] 8636#8636: start worker processes log level:4 log body:2025/10/28 08:04:02 [error] 8637#8637: *3 stream [lua] content_by_lua(nginx.conf:67):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 ' doesn't match '(?^s:\Alog lines: #1 log level:4 log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> new line, client: 127.0.0.1, server: 0.0.0.0:\d+ \z)' |
| stream/errlog.t | TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: #2 log level:6 log body:2025/10/28 08:04:03 [notice] 8636#8636: start worker processes log level:4 log body:2025/10/28 08:04:03 [error] 8706#8706: *91 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:2025/10/28 08:04:03 [notice] 8636#8636: start worker processes log level:4 log body:2025/10/28 08:04:03 [error] 8706#8706: *91 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 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [error] 8885#8885: *263 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [warn] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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:2025/10/28 08:04:06 [error] 8885#8885: *266 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 number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17 |
| stream/errlog.t | TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) |
got: 'log lines:1 ' expected: 'log lines:0 ' |
| stream/errlog.t | TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: #32 log level:5 log body:2025/10/28 08:04:08 [warn] 8987#8987: *90 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:2025/10/28 08:04:08 [error] 8987#8987: *90 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:2025/10/28 08:04:08 [warn] 8987#8987: *90 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:2025/10/28 08:04:08 [error] 8987#8987: *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:2025/10/28 08:04:08 [warn] 8987#8987: *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:2025/10/28 08:04:08 [error] 8987#8987: *90 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:2025/10/28 08:04:08 [warn] 8987#8987: *90 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:2025/10/28 08:04:08 [error] 8987#8987: *90 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:2025/10/28 08:04:08 [warn] 8987#8987: *90 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:2025/10/28 08:04:08 [error] 8987#8987: *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:2025/10/28 08:04:08 [warn] 8987#8987: *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:2025/10/28 08:04:08 [error] 8987#8987: *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: #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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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:2025/10/28 08:04:08 [warn] 8987#8987: *93 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:2025/10/28 08:04:08 [error] 8987#8987: *93 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/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 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 "2025/10/28 08:05:17 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:05:17 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:17 [debug] 3114#3114: *154 event timer add: 0: 1000:11605573 2025/10/28 08:05:17 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:17 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:17 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:17 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:17 [debug] 3114#3114: worker cycle 2025/10/28 08:05:17 [debug] 3114#3114: epoll timer: 1000 2025/10/28 08:05:17 [debug] 3173#3173: epoll: fd:7 ev:0001 d:000000003A467488 ' |
| stream/semaphore.t | TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:19 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) |
2025/10/28 08:05:19 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer 2025/10/28 08:05:19 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:19 [debug] 3114#3114: *154 event timer add: 0: 1000:11607574 2025/10/28 08:05:19 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:19 [debug] 3114#3114: worker cycle ' |
| stream/semaphore.t | TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:19 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 1) |
2025/10/28 08:05:19 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:19 [debug] 3114#3114: *154 event timer add: 0: 1000:11607574 2025/10/28 08:05:19 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:19 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:19 [debug] 3114#3114: worker cycle ' |
| stream/semaphore.t | TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) |
@@ -1,2 +1,3 @@ sem: 1 while returning text, sem: API disabled in the context of log_by_lua* while returning text, +sem: timeout, |
| stream/semaphore.t | TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:25 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:05:25 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer 2025/10/28 08:05:25 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:25 [debug] 3114#3114: *154 event timer add: 0: 1000:11613575 2025/10/28 08:05:25 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:25 [debug] 3114#3114: worker cycle 2025/10/28 08:05:25 [debug] 3114#3114: epoll timer: 1000 ' |
| stream/semaphore.t | TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:25 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) |
2025/10/28 08:05:25 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:25 [debug] 3114#3114: *154 event timer add: 0: 1000:11613575 2025/10/28 08:05:25 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:25 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:25 [debug] 3114#3114: worker cycle 2025/10/28 08:05:25 [debug] 3114#3114: epoll timer: 1000 2025/10/28 08:05:25 [notice] 2960#2960: signal 1 (SIGHUP) received from 3618, reconfiguring ' |
| stream/semaphore.t | TEST 15: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:27 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:05:27 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:27 [debug] 3114#3114: *154 event timer add: 0: 1000:11615575 2025/10/28 08:05:27 [debug] 3114#3114: stream lua semaphore wait yielding 2025/10/28 08:05:27 [debug] 3114#3114: *154 lua resume returned 1 2025/10/28 08:05:27 [debug] 3114#3114: *154 lua thread yielded 2025/10/28 08:05:27 [debug] 3114#3114: *154 lua run thread returned -2 2025/10/28 08:05:27 [debug] 3114#3114: worker cycle 2025/10/28 08:05:27 [debug] 3114#3114: epoll timer: 1000 2025/10/28 08:05:27 [debug] 3736#3736: epoll: fd:7 ev:0001 d:000000003A414208 ' |
| stream/semaphore.t | TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:28 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) |
2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A45D470:16 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A3D7DB0:1024 2025/10/28 08:05:28 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A3D9570:16 2025/10/28 08:05:28 [debug] 3796#3796: *822 recv: eof:0, avail:-1 2025/10/28 08:05:28 [debug] 3796#3796: *822 recv: fd:4 77 of 1024 2025/10/28 08:05:28 [debug] 3796#3796: *822 reusable connection: 0 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A440920:48 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A422C50:1360 ' |
| stream/semaphore.t | TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2025/10/28 08:05:28 [error] 3114#3114: *154 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) |
2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A3D9570:16 2025/10/28 08:05:28 [debug] 3796#3796: *822 recv: eof:0, avail:-1 2025/10/28 08:05:28 [debug] 3796#3796: *822 recv: fd:4 77 of 1024 2025/10/28 08:05:28 [debug] 3796#3796: *822 reusable connection: 0 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A440920:48 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A422C50:1360 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A3D3180:16 2025/10/28 08:05:28 [debug] 3114#3114: stream lua semaphore wait: 00007F51E216D028, timeout: 1000, resources: 0, event posted: 0 2025/10/28 08:05:28 [debug] 3796#3796: *822 malloc: 000000003A3DE4F0:1120 ' |
Go back to the index page.