(This page was automatically generated by the tools in the opsboy project on 04:52:02 11-Oct-2024 GMT.)

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

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
812b2d38 2023-12-22 15:22:29 GMT 0 68 88 12083 1330 sec

LuaJIT

LuaJIT 2.1.1700206165, commit 4182d6bf

OpenSSL

OpenSSL 1.1.1w 11 Sep 2023

Compilation Errors

Segmentation Faults

Unexpected Failures

(none)

Expected Failures

File Name Details
errlog-raw-log.t nginx: [error] hello world from init_by_lua
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2023/12/22 15:28:01 [notice] 25800\#25800: start worker processes log level:4 log body:2023/12/22 15:28:02 [error] 25813\#25813: *1 [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 lines: #2
log level:6
log body:2023/12/22 15:28:01 [notice] 25800#25800: start worker processes
log level:4
log body:2023/12/22 15:28:02 [error] 25813#25813: *1 [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"
'
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 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:2023/12/22 15:28:05 [notice] 25800\#25800: start worker processes log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *111 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *114 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *115 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *116 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *117 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *118 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *119 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *120 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *121 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *122 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *123 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *124 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *125 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *126 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *127 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *128 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:06 [info] 25962\#25962: *129 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2023/12/22 15:28:05 [notice] 25800#25800: start worker processes
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *111 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *112 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *113 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *114 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *115 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *116 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *117 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *118 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *119 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *120 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *121 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *122 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *123 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *124 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *125 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *126 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *127 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *128 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:06 [info] 25962#25962: *129 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:2023/12/22 15:28:06 [info] 25962\#25962: *130 client 127.0.0.1 closed keepalive connection log level:4 log body:2023/12/22 15:28:06 [error] 25962\#25962: *131 [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:2023/12/22 15:28:06 [error] 25962\#25962: *132 [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:2023/12/22 15:28:06 [info] 25962#25962: *130 client 127.0.0.1 closed keepalive connection
log level:4
log body:2023/12/22 15:28:06 [error] 25962#25962: *131 [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:2023/12/22 15:28:06 [error] 25962#25962: *132 [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 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 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: \#1
'
errlog.t TEST 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1,2 @@
log lines: \#18
-log lines: \#8
+log lines: \#9
'
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 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 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2023/12/22 15:28:16 [notice] 25800\#25800: start worker processes log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *449 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *450 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *451 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *452 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *453 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *454 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *455 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *456 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *457 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2023/12/22 15:28:16 [notice] 25800#25800: start worker processes
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *449 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *450 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *451 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *452 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *453 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *454 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *455 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *456 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *457 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:2023/12/22 15:28:16 [info] 26418\#26418: *458 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *459 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *460 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *461 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *462 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *463 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *464 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *465 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *466 client 127.0.0.1 closed keepalive connection log level:7 log body:2023/12/22 15:28:16 [info] 26418\#26418: *467 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *458 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *459 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *460 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *461 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *462 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *463 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *464 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *465 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *466 client 127.0.0.1 closed keepalive connection
log level:7
log body:2023/12/22 15:28:16 [info] 26418#26418: *467 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 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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [warn] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [warn] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454\#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [warn] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [warn] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:17 [error] 26454#26454: *495 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [warn] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [warn] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454\#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [warn] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [warn] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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:2023/12/22 15:28:18 [error] 26454#26454: *496 [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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2023/12/22 15:28:19 [error] 26520\#26520: *548 [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:2023/12/22 15:28:19 [warn] 26520\#26520: *548 [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:2023/12/22 15:28:19 [error] 26520\#26520: *548 [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:2023/12/22 15:28:19 [error] 26520\#26520: *548 [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:2023/12/22 15:28:19 [warn] 26520\#26520: *548 [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:2023/12/22 15:28:19 [error] 26520\#26520: *548 [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:2023/12/22 15:28:19 [error] 26520#26520: *548 [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:2023/12/22 15:28:19 [warn] 26520#26520: *548 [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:2023/12/22 15:28:19 [error] 26520#26520: *548 [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:2023/12/22 15:28:19 [error] 26520#26520: *548 [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:2023/12/22 15:28:19 [warn] 26520#26520: *548 [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:2023/12/22 15:28:19 [error] 26520#26520: *548 [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:2023/12/22 15:28:19 [error] 26520\#26520: *549 [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:2023/12/22 15:28:19 [warn] 26520\#26520: *549 [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:2023/12/22 15:28:19 [error] 26520\#26520: *549 [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:2023/12/22 15:28:19 [error] 26520\#26520: *549 [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:2023/12/22 15:28:19 [warn] 26520\#26520: *549 [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:2023/12/22 15:28:19 [error] 26520\#26520: *549 [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:2023/12/22 15:28:19 [error] 26520#26520: *549 [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:2023/12/22 15:28:19 [warn] 26520#26520: *549 [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:2023/12/22 15:28:19 [error] 26520#26520: *549 [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:2023/12/22 15:28:19 [error] 26520#26520: *549 [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:2023/12/22 15:28:19 [warn] 26520#26520: *549 [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:2023/12/22 15:28:19 [error] 26520#26520: *549 [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 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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [warn] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556#26556: *574 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556\#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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:2023/12/22 15:28:20 [warn] 26556#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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:2023/12/22 15:28:20 [error] 26556#26556: *575 [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 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t 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
pipe-stdout.t TEST 33: read process, aborted by uthread kill, with graceful shutdown - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
-stdout: ok
+stdout err: timeout
stderr err: closed
'
process-type-privileged-agent-connections.t nginx: [error] [lua] init_by_lua(nginx.conf:27):5: enable_privileged_agent failed: bad 'connections' argument: number expected and greater than 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
)'
request.t TEST 7: ngx.req.start_time() - response_body - response is expected (repeated req 0, req 0) got: "true\x{0a}>= 0.099: true\x{0a}< 0.11: false\x{0a}"
length: 34
expected: "true\x{0a}>= 0.099: true\x{0a}< 0.11: true\x{0a}"
length: 33
strings begin to differ at char 29 (line 3 column 9)
semaphore.t TEST 16: semaphore in ngx.timer (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
sem: 1,
+sem: timeout,
'
semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2023/12/22 15:37:18 [error] 9071\#9071: *871 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000008C56230:160
2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000009B4A870:16
2023/12/22 15:37:18 [debug] 9149\#9149: *938 http set discard body
2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000009318950:80
2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000009B4D550:16
2023/12/22 15:37:18 [debug] 9149\#9149: *938 lua capture header filter, uri "/ver"
2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000009711F10:80
2023/12/22 15:37:18 [debug] 9071\#9071: http lua semaphore wait: 0000000009B7F2B8, timeout: 1000, resources: 0, event posted: 0
2023/12/22 15:37:18 [debug] 9149\#9149: *938 malloc: 0000000009B4D9D0:16
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2023/12/22 15:37:19 [error] 9071\#9071: *871 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2023/12/22 15:37:19 [debug] 9071\#9071: http lua semaphore wait: 0000000009B7F2B8, timeout: 1000, resources: 0, event posted: 0
2023/12/22 15:37:19 [debug] 9071\#9071: *871 event timer add: 0: 1000:950144
2023/12/22 15:37:19 [debug] 9071\#9071: http lua semaphore wait yielding
2023/12/22 15:37:19 [debug] 9071\#9071: *871 lua resume returned 1
2023/12/22 15:37:19 [debug] 9071\#9071: *871 lua thread yielded
2023/12/22 15:37:19 [debug] 9071\#9071: *871 lua run thread returned -2
2023/12/22 15:37:19 [debug] 9071\#9071: worker cycle
'
semaphore.t TEST 24: semaphore post in timer.at - pattern "[error]" should not match any line in error.log but matches line "2023/12/22 15:37:20 [error] 9071\#9071: *871 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2023/12/22 15:37:20 [error] 9071\#9071: *871 [lua] init_worker_by_lua(nginx.conf:26):18: sem: 6 times, context: ngx.timer
2023/12/22 15:37:20 [debug] 9071\#9071: http lua semaphore wait: 0000000009B7F2B8, timeout: 1000, resources: 0, event posted: 0
2023/12/22 15:37:20 [debug] 9071\#9071: *871 event timer add: 0: 1000:951145
2023/12/22 15:37:20 [debug] 9071\#9071: http lua semaphore wait yielding
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua resume returned 1
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua thread yielded
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua run thread returned -2
2023/12/22 15:37:20 [debug] 9071\#9071: worker cycle
2023/12/22 15:37:20 [debug] 9071\#9071: epoll timer: 1000
'
semaphore.t TEST 24: semaphore post in timer.at - pattern "[error]" should not match any line in error.log but matches line "2023/12/22 15:37:20 [error] 9071\#9071: *871 [lua] init_worker_by_lua(nginx.conf:26):18: sem: 6 times, context: ngx.timer" (req 0) 2023/12/22 15:37:20 [debug] 9071\#9071: http lua semaphore wait: 0000000009B7F2B8, timeout: 1000, resources: 0, event posted: 0
2023/12/22 15:37:20 [debug] 9071\#9071: *871 event timer add: 0: 1000:951145
2023/12/22 15:37:20 [debug] 9071\#9071: http lua semaphore wait yielding
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua resume returned 1
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua thread yielded
2023/12/22 15:37:20 [debug] 9071\#9071: *871 lua run thread returned -2
2023/12/22 15:37:20 [debug] 9071\#9071: worker cycle
2023/12/22 15:37:20 [debug] 9071\#9071: epoll timer: 1000
2023/12/22 15:37:20 [debug] 9215\#9215: epoll: fd:6 ev:0001 d:000000000A0556F0
'
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 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 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2023/12/22 15:41:50 [notice] 15696\#15696: start worker processes log level:4 log body:2023/12/22 15:41:51 [error] 15791\#15791: *93 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:2023/12/22 15:41:50 [notice] 15696#15696: start worker processes
log level:4
log body:2023/12/22 15:41:51 [error] 15791#15791: *93 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 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#31 log level:4 log body:2023/12/22 15:41:53 [error] 15899\#15899: *183 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:2023/12/22 15:41:53 [warn] 15899\#15899: *183 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:2023/12/22 15:41:53 [error] 15899\#15899: *183 stream [lua] content_by_lua(nginx.conf:78):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:41:53 [error] 15899\#15899: *183 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:2023/12/22 15:41:53 [warn] 15899\#15899: *183 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:2023/12/22 15:41:53 [error] 15899\#15899: *183 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #31
log level:4
log body:2023/12/22 15:41:53 [error] 15899#15899: *183 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:2023/12/22 15:41:53 [warn] 15899#15899: *183 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:2023/12/22 15:41:53 [error] 15899#15899: *183 stream [lua] content_by_lua(nginx.conf:78):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:41:53 [error] 15899#15899: *183 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:2023/12/22 15:41:53 [warn] 15899#15899: *183 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:2023/12/22 15:41:53 [error] 15899#15899: *183 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: \#31 log level:4 log body:2023/12/22 15:41:54 [error] 15899\#15899: *186 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:2023/12/22 15:41:54 [warn] 15899\#15899: *186 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:2023/12/22 15:41:54 [error] 15899\#15899: *186 stream [lua] content_by_lua(nginx.conf:78):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:41:54 [error] 15899\#15899: *186 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:2023/12/22 15:41:54 [warn] 15899\#15899: *186 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:2023/12/22 15:41:54 [error] 15899\#15899: *186 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #31
log level:4
log body:2023/12/22 15:41:54 [error] 15899#15899: *186 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:2023/12/22 15:41:54 [warn] 15899#15899: *186 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:2023/12/22 15:41:54 [error] 15899#15899: *186 stream [lua] content_by_lua(nginx.conf:78):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:41:54 [error] 15899#15899: *186 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:2023/12/22 15:41:54 [warn] 15899#15899: *186 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:2023/12/22 15:41:54 [error] 15899#15899: *186 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 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:2023/12/22 15:41:54 [notice] 15696\#15696: start worker processes log level:4 log body:2023/12/22 15:41:55 [error] 15935\#15935: *213 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:2023/12/22 15:41:54 [notice] 15696#15696: start worker processes
log level:4
log body:2023/12/22 15:41:55 [error] 15935#15935: *213 stream [lua] content_by_lua(nginx.conf:75):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
end
maybe log lines: #2
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
end
maybe log lines: #1
end
\z)'
stream/errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
stream/errlog.t TEST 31: ringbuf sentinel bug2 - response_body_like - response is expected (log lines: \#18 log lines: \#3) 'log lines: #18
log lines: #3
'
doesn't match '(?^s:\A(?:log lines: #18
log lines: #1
|log lines: #18
log lines: #2
)\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:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *453 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:2023/12/22 15:42:01 [warn] 16213\#16213: *453 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *453 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2023/12/22 15:42:01 [warn] 16213\#16213: *453 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:2023/12/22 15:42:01 [error] 16213\#16213: *453 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2023/12/22 15:42:01 [warn] 16213\#16213: *453 stream [lua] content_by_lua(nginx.conf:91):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *453 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:2023/12/22 15:42:01 [error] 16213\#16213: *453 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:2023/12/22 15:42:01 [error] 16213\#16213: *453 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:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *453 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:2023/12/22 15:42:01 [warn] 16213#16213: *453 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *453 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2023/12/22 15:42:01 [warn] 16213#16213: *453 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:2023/12/22 15:42:01 [error] 16213#16213: *453 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2023/12/22 15:42:01 [warn] 16213#16213: *453 stream [lua] content_by_lua(nginx.conf:91):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *453 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:2023/12/22 15:42:01 [error] 16213#16213: *453 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:2023/12/22 15:42:01 [error] 16213#16213: *453 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:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *456 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:2023/12/22 15:42:01 [warn] 16213\#16213: *456 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *456 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2023/12/22 15:42:01 [warn] 16213\#16213: *456 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:2023/12/22 15:42:01 [error] 16213\#16213: *456 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2023/12/22 15:42:01 [warn] 16213\#16213: *456 stream [lua] content_by_lua(nginx.conf:91):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:01 [error] 16213\#16213: *456 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:2023/12/22 15:42:01 [error] 16213\#16213: *456 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:2023/12/22 15:42:01 [error] 16213\#16213: *456 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:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *456 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:2023/12/22 15:42:01 [warn] 16213#16213: *456 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *456 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2023/12/22 15:42:01 [warn] 16213#16213: *456 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:2023/12/22 15:42:01 [error] 16213#16213: *456 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2023/12/22 15:42:01 [warn] 16213#16213: *456 stream [lua] content_by_lua(nginx.conf:91):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:01 [error] 16213#16213: *456 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:2023/12/22 15:42:01 [error] 16213#16213: *456 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:2023/12/22 15:42:01 [error] 16213#16213: *456 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 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 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:54276 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:54280 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2023/12/22 15:42:05 [error] 16387\#16387: *603 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:2023/12/22 15:42:05 [warn] 16387\#16387: *603 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:05 [error] 16387\#16387: *603 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2023/12/22 15:42:05 [error] 16387\#16387: *603 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:2023/12/22 15:42:05 [warn] 16387\#16387: *603 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:2023/12/22 15:42:05 [error] 16387\#16387: *603 stream [lua] content_by_lua(nginx.conf:93):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:05 [error] 16387\#16387: *603 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:2023/12/22 15:42:05 [error] 16387\#16387: *603 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:2023/12/22 15:42:05 [error] 16387\#16387: *603 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:4
log body:2023/12/22 15:42:05 [error] 16387#16387: *603 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:2023/12/22 15:42:05 [warn] 16387#16387: *603 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:05 [error] 16387#16387: *603 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2023/12/22 15:42:05 [error] 16387#16387: *603 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:2023/12/22 15:42:05 [warn] 16387#16387: *603 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:2023/12/22 15:42:05 [error] 16387#16387: *603 stream [lua] content_by_lua(nginx.conf:93):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:05 [error] 16387#16387: *603 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:2023/12/22 15:42:05 [error] 16387#16387: *603 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:2023/12/22 15:42:05 [error] 16387#16387: *603 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:4 log body:2023/12/22 15:42:06 [error] 16387\#16387: *606 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:2023/12/22 15:42:06 [warn] 16387\#16387: *606 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:06 [error] 16387\#16387: *606 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2023/12/22 15:42:06 [error] 16387\#16387: *606 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:2023/12/22 15:42:06 [warn] 16387\#16387: *606 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:2023/12/22 15:42:06 [error] 16387\#16387: *606 stream [lua] content_by_lua(nginx.conf:93):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2023/12/22 15:42:06 [error] 16387\#16387: *606 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:2023/12/22 15:42:06 [error] 16387\#16387: *606 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:2023/12/22 15:42:06 [error] 16387\#16387: *606 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:4
log body:2023/12/22 15:42:06 [error] 16387#16387: *606 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:2023/12/22 15:42:06 [warn] 16387#16387: *606 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:06 [error] 16387#16387: *606 stream [lua] content_by_lua(nginx.conf:93):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2023/12/22 15:42:06 [error] 16387#16387: *606 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:2023/12/22 15:42:06 [warn] 16387#16387: *606 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:2023/12/22 15:42:06 [error] 16387#16387: *606 stream [lua] content_by_lua(nginx.conf:93):11: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2023/12/22 15:42:06 [error] 16387#16387: *606 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:2023/12/22 15:42:06 [error] 16387#16387: *606 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:2023/12/22 15:42:06 [error] 16387#16387: *606 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:4
'
expected: 'log lines:3
'
stream/errlog.t 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 17: flood the capturing buffer (4k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2023/12/22 15:42:12 [error] 16586\#16586: *93 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:2023/12/22 15:42:12 [warn] 16586\#16586: *93 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:2023/12/22 15:42:12 [error] 16586\#16586: *93 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:2023/12/22 15:42:12 [error] 16586\#16586: *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:2023/12/22 15:42:12 [warn] 16586\#16586: *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:2023/12/22 15:42:12 [error] 16586\#16586: *93 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:2023/12/22 15:42:12 [error] 16586#16586: *93 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:2023/12/22 15:42:12 [warn] 16586#16586: *93 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:2023/12/22 15:42:12 [error] 16586#16586: *93 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:2023/12/22 15:42:12 [error] 16586#16586: *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:2023/12/22 15:42:12 [warn] 16586#16586: *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:2023/12/22 15:42:12 [error] 16586#16586: *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: #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:2023/12/22 15:42:12 [error] 16586\#16586: *96 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:2023/12/22 15:42:12 [warn] 16586\#16586: *96 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:2023/12/22 15:42:12 [error] 16586\#16586: *96 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:2023/12/22 15:42:12 [error] 16586\#16586: *96 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:2023/12/22 15:42:12 [warn] 16586\#16586: *96 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:2023/12/22 15:42:12 [error] 16586\#16586: *96 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:2023/12/22 15:42:12 [error] 16586#16586: *96 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:2023/12/22 15:42:12 [warn] 16586#16586: *96 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:2023/12/22 15:42:12 [error] 16586#16586: *96 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:2023/12/22 15:42:12 [error] 16586#16586: *96 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:2023/12/22 15:42:12 [warn] 16586#16586: *96 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:2023/12/22 15:42:12 [error] 16586#16586: *96 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/process-type-hup.t TEST 1: sanity - pattern "init_worker_by_lua:6: process type: privileged" should match a line in error.log (req 0) Looks like you failed 1 test of 8.
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/request.t TEST 1: ngx.req.start_time() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'
Looks like you failed 1 test of 12.
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: 3 times,
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 1) @@ -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/time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'
time.t TEST 13: "resty.core.time".monotonic_msec - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
true
-< 10: true
+< 10: false
'
time.t TEST 1: ngx.now() - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
true
>= 0.099: true
-< 0.11: true
+< 0.11: false
'

Warnings

Go back to the index page.