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

Detailed Test Report for lua-resty-core in linux i386 (h)

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
973629fd 2020-10-29 15:50:18 GMT 19 95 78 8743 1660 sec

LuaJIT

LuaJIT 2.1.0-beta3, commit 29a66f77

OpenSSL

OpenSSL 1.1.1h 22 Sep 2020

Compilation Errors

Segmentation Faults

Unexpected Failures

File Name Details
pipe-stdin.t TEST 11: write 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
+stderr err: timeout
'
pipe-stdin.t TEST 11: write process, aborted by uthread kill, with graceful shutdown - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1,2 @@
-stdout: ok
+stdout err: timeout
-stderr err: closed
+stderr err: timeout
'
shdict.t TEST 47: exptime uses long type to avoid overflow in set() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
shdict.t TEST 47: exptime uses long type to avoid overflow in set() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
shdict.t TEST 48: exptime uses long type to avoid overflow in expire() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
shdict.t TEST 48: exptime uses long type to avoid overflow in expire() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
shdict.t TEST 49: init_ttl uses long type to avoid overflow in incr() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
shdict.t TEST 49: init_ttl uses long type to avoid overflow in incr() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/re-opt.t TEST 1: default jit_stack_size too small - response_body - response is expected (repeated req 0, req 0) got: 'from: 1
to: 1563
'
expected: 'error: pcre_exec() failed: -27
'
stream/re-opt.t TEST 1: default jit_stack_size too small - response_body - response is expected (repeated req 1, req 0) got: 'from: 1
to: 1563
'
expected: 'error: pcre_exec() failed: -27
'
stream/re-sub.t TEST 2: sub, no submatch, no jit compile, no regex cache - pattern "(?^:\[TRACE\s+\d+ content_by_lua\(nginx\.conf:\d+\):4 loop\])" should match a line in error.log (req 0) Looks like you failed 1 test of 96.
stream/shdict.t TEST 49: init_ttl uses long type to avoid overflow in incr() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/shdict.t TEST 49: init_ttl uses long type to avoid overflow in incr() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/shdict.t TEST 48: exptime uses long type to avoid overflow in expire() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/shdict.t TEST 48: exptime uses long type to avoid overflow in expire() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/shdict.t TEST 47: exptime uses long type to avoid overflow in set() + ttl() - response_body - response is expected (repeated req 0, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
stream/shdict.t TEST 47: exptime uses long type to avoid overflow in set() + ttl() - response_body - response is expected (repeated req 1, req 0) got: 'ttl: 0
'
expected: 'ttl: 2147483648
'
time.t TEST 7: ngx.cookie_time() - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
Thu, 18-Nov-10 11:27:35 GMT
-Sun, 18-Sep-2039 23:06:40 GMT
+Thu, 01-Jan-70 00:00:00 GMT
'
time.t TEST 7: ngx.cookie_time() - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1,2 @@
Thu, 18-Nov-10 11:27:35 GMT
-Sun, 18-Sep-2039 23:06:40 GMT
+Thu, 01-Jan-70 00:00:00 GMT
'

Expected Failures

File Name Details
errlog-raw-log.t nginx: [error] hello world from init_by_lua
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:3
'
errlog.t TEST 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 0, req 0) @@ -1,2 +1,2 @@
log lines: \#18
-log lines: \#8
+log lines: \#10
'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.93 log body: 2020/10/29 19:34:03 [error] 15309\#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********21, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.93
log body: 2020/10/29 19:34:03 [error] 15309#0: *93 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1604000043.993 log body: 2020/10/29 19:34:03 [error] 15309\#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1604000043.993
log body: 2020/10/29 19:34:03 [error] 15309#0: *94 [lua] content_by_lua(nginx.conf:84):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2020/10/29 19:34:04 [notice] 15221\#0: start worker processes log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *96 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *97 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *98 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *99 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *100 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *101 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *102 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *103 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *104 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2020/10/29 19:34:04 [notice] 15221#0: start worker processes
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *96 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *97 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *98 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *99 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *100 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *101 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *102 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *103 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *104 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *105 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *106 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *107 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:04 [info] 15336\#0: *108 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *109 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *110 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *111 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *112 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *113 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:05 [info] 15336\#0: *114 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *105 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *106 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *107 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:04 [info] 15336#0: *108 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *109 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *110 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *111 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *112 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *113 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:05 [info] 15336#0: *114 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 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 0)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2020/10/29 19:34:08 [warn] 15390\#0: *162 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 0) '
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "log a warning event" should match a line in error.log (req 1)
errlog.t TEST 25: get system default filter level during Nginx starts (init) - pattern "do not log another warning event" should not match any line in error.log but matches line "2020/10/29 19:34:08 [warn] 15390\#0: *163 [lua] content_by_lua(nginx.conf:67):7: do not log another warning event, client: 127.0.0.1, server: localhost, request: \"GET /t HTTP/1.1\", host: \"localhost\"" (req 1) '
errlog.t TEST 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 nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 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 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 nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2020/10/29 19:34:33 [notice] 15837\#0: start worker processes log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *51 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *52 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *53 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *54 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *55 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *56 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *57 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *58 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:33 [info] 15899\#0: *59 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2020/10/29 19:34:33 [notice] 15837#0: start worker processes
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *51 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *52 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *53 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *54 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *55 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *56 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *57 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *58 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:33 [info] 15899#0: *59 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *60 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *61 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *62 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *63 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *64 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *65 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *66 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *67 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *68 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15899\#0: *69 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *60 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *61 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *62 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *63 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *64 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *65 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *66 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *67 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *68 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15899#0: *69 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2020/10/29 19:34:34 [notice] 15837\#0: start worker processes log level:7 log body:2020/10/29 19:34:34 [info] 15926\#0: *74 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:34 [info] 15926\#0: *75 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *76 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *77 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *78 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *79 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *80 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *81 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *82 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *83 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *84 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *85 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *86 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *87 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *88 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *89 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *90 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *91 client 127.0.0.1 closed keepalive connection log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *92 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2020/10/29 19:34:34 [notice] 15837#0: start worker processes
log level:7
log body:2020/10/29 19:34:34 [info] 15926#0: *74 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:34 [info] 15926#0: *75 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *76 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *77 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *78 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *79 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *80 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *81 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *82 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *83 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *84 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *85 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *86 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *87 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *88 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *89 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *90 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *91 client 127.0.0.1 closed keepalive connection
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *92 client 127.0.0.1 closed keepalive connection
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#3 log level:7 log body:2020/10/29 19:34:35 [info] 15926\#0: *93 client 127.0.0.1 closed keepalive connection log level:4 log body:2020/10/29 19:34:35 [error] 15926\#0: *94 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2020/10/29 19:34:36 [error] 15926\#0: *95 [lua] access_by_lua(nginx.conf:66):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" end maybe log lines: \#3 end) 'maybe log lines: #3
log level:7
log body:2020/10/29 19:34:35 [info] 15926#0: *93 client 127.0.0.1 closed keepalive connection
log level:4
log body:2020/10/29 19:34:35 [error] 15926#0: *94 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2020/10/29 19:34:36 [error] 15926#0: *95 [lua] access_by_lua(nginx.conf:66):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #3
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:18 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:84):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
re-opt.t TEST 1: default jit_stack_size too small - response_body - response is expected (repeated req 0, req 0) got: 'from: 1
to: 1563
'
expected: 'error: pcre_exec() failed: -27
'
re-opt.t TEST 1: default jit_stack_size too small - response_body - response is expected (repeated req 1, req 0) got: 'from: 1
to: 1563
'
expected: 'error: pcre_exec() failed: -27
'
semaphore.t TEST 17: semaphore post in all phase (in a request) - grep_error_log_out (req 0) got: 'sem: timeout,
sem: 6 times,
'
expected: 'sem: 6 times,
'
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
+sem: timeout,
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:02 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:02 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/10/29 19:45:02 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:02 [debug] 25829\#0: *441 event timer add: 0: 1000:14126350
2020/10/29 19:45:02 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:02 [debug] 25829\#0: worker cycle
2020/10/29 19:45:02 [debug] 25829\#0: epoll timer: 1000
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:02 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/10/29 19:45:02 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:02 [debug] 25829\#0: *441 event timer add: 0: 1000:14126350
2020/10/29 19:45:02 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:02 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:02 [debug] 25829\#0: worker cycle
2020/10/29 19:45:02 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:02 [debug] 25885\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 22: semaphore post in body_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:03 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:03 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:03 [debug] 25829\#0: *441 event timer add: 0: 1000:14127350
2020/10/29 19:45:03 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:03 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:03 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:03 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:03 [debug] 25829\#0: worker cycle
2020/10/29 19:45:03 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:03 [debug] 25885\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 12: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
sem: timeout,
+sem: timeout,
sem: 1,
'
semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:12 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:12 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:12 [debug] 25829\#0: *441 event timer add: 0: 1000:14136354
2020/10/29 19:45:12 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:12 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:12 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:12 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:12 [debug] 25829\#0: worker cycle
2020/10/29 19:45:12 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:12 [debug] 26025\#0: *613 free: 09DC0570, unused: 0
'
semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:13 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:13 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:13 [debug] 25829\#0: *441 event timer add: 0: 1000:14137358
2020/10/29 19:45:13 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:13 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:13 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:13 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:13 [debug] 25829\#0: worker cycle
2020/10/29 19:45:13 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:13 [debug] 26025\#0: epoll: fd:7 ev:0001 d:09DDAE98
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:14 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:14 [debug] 26053\#0: *640 HTTP/1.1 200 OK
Server: nginx/1.19.3 (no pool)
Date: Thu, 29 Oct 2020 19:45:14 GMT
Content-Type: text/plain
Content-Length: 10
Connection: keep-alive

2020/10/29 19:45:14 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/10/29 19:45:14 [debug] 26053\#0: *640 malloc: 09DE65A8:8
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:14 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/10/29 19:45:14 [debug] 26053\#0: *640 malloc: 09DE65A8:8
2020/10/29 19:45:14 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:14 [debug] 26053\#0: *640 malloc: 09DC55A8:8
2020/10/29 19:45:14 [debug] 25829\#0: *441 event timer add: 0: 1000:14138358
2020/10/29 19:45:14 [debug] 26053\#0: *640 write new buf t:1 f:0 09DB0048, pos 09DB0048, size: 158 file: 0, size: 0
2020/10/29 19:45:14 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:14 [debug] 26053\#0: *640 http write filter: l:0 f:0 s:158
2020/10/29 19:45:14 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:14 [debug] 26053\#0: *640 http write filter limit 0
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:15 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2020/10/29 19:45:15 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:15 [debug] 25829\#0: *441 event timer add: 0: 1000:14139362
2020/10/29 19:45:15 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:15 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:15 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:15 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:15 [debug] 25829\#0: worker cycle
'
semaphore.t TEST 25: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:16 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:16 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:16 [debug] 25829\#0: *441 event timer add: 0: 1000:14140366
2020/10/29 19:45:16 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:16 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:16 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:16 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:16 [debug] 25829\#0: worker cycle
2020/10/29 19:45:16 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:16 [debug] 26081\#0: epoll: fd:7 ev:0001 d:09DDAE98
'
semaphore.t TEST 4: basic semaphore in subrequest - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:17 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:17 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:17 [debug] 25829\#0: *441 event timer add: 0: 1000:14141366
2020/10/29 19:45:17 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:17 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:17 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:17 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:17 [debug] 25829\#0: worker cycle
2020/10/29 19:45:17 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:17 [debug] 25318\#0: malloc: 09DF9EE8:12
'
semaphore.t TEST 4: basic semaphore in subrequest - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:18 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:18 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:18 [debug] 25829\#0: *441 event timer add: 0: 1000:14142366
2020/10/29 19:45:18 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:18 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:18 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:18 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:18 [debug] 25829\#0: worker cycle
2020/10/29 19:45:18 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:18 [debug] 26109\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 24: semaphore post in timer.at - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:19 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:19 [debug] 26109\#0: free: 09DAB708, unused: 0
2020/10/29 19:45:19 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:19 [debug] 26109\#0: free: 09DE8860, unused: 0
2020/10/29 19:45:19 [debug] 25829\#0: *441 event timer add: 0: 1000:14143366
2020/10/29 19:45:19 [debug] 26109\#0: free: 09DD65E0, unused: 0
2020/10/29 19:45:19 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:19 [debug] 26109\#0: free: 09DD65D0, unused: 0
2020/10/29 19:45:19 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:19 [debug] 26109\#0: free: 09DD65C0, unused: 0
'
semaphore.t TEST 24: semaphore post in timer.at - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:20 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:20 [debug] 26137\#0: *722 recv: fd:3 77 of 1024
2020/10/29 19:45:20 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer
2020/10/29 19:45:20 [debug] 26137\#0: *722 reusable connection: 0
2020/10/29 19:45:20 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DC4A40:24
2020/10/29 19:45:20 [debug] 25829\#0: *441 event timer add: 0: 1000:14144366
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DE1410:812
2020/10/29 19:45:20 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DC64B0:8
'
semaphore.t TEST 24: semaphore post in timer.at - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:20 [error] 25829\#0: *441 [lua] init_worker_by_lua:18: sem: 6 times, context: ngx.timer" (req 0) 2020/10/29 19:45:20 [debug] 26137\#0: *722 reusable connection: 0
2020/10/29 19:45:20 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DC4A40:24
2020/10/29 19:45:20 [debug] 25829\#0: *441 event timer add: 0: 1000:14144366
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DE1410:812
2020/10/29 19:45:20 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DC64B0:8
2020/10/29 19:45:20 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:20 [debug] 26137\#0: *722 malloc: 09DD2400:480
'
semaphore.t TEST 15: semaphore in body_filter_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,3 +1,5 @@
+sem: timeout,
+sem: timeout,
sem: 1,
sem: API disabled in the context of body_filter_by_lua*,
sem: 1,
'
semaphore.t TEST 26: kill a light thread that is waiting on a semaphore (no resource) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:23 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:23 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:23 [debug] 25829\#0: *441 event timer add: 0: 1000:14147370
2020/10/29 19:45:23 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:23 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:23 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:23 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:23 [debug] 25829\#0: worker cycle
2020/10/29 19:45:23 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:23 [debug] 26193\#0: epoll: fd:7 ev:0001 d:09DDAE98
'
semaphore.t TEST 38: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:25 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:25 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:25 [debug] 25829\#0: *441 event timer add: 0: 1000:14149370
2020/10/29 19:45:25 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:25 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:25 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:25 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:25 [debug] 25829\#0: worker cycle
2020/10/29 19:45:25 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:25 [debug] 26221\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 21: semaphore post in header_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:28 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:28 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:28 [debug] 25829\#0: *441 event timer add: 0: 1000:14152374
2020/10/29 19:45:28 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:28 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:28 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:28 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:28 [debug] 25829\#0: worker cycle
2020/10/29 19:45:28 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:28 [debug] 26277\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 21: semaphore post in header_filter_by_lua (subrequest) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:29 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:29 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:29 [debug] 25829\#0: *441 event timer add: 0: 1000:14153374
2020/10/29 19:45:29 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:29 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:29 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:29 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:29 [debug] 25829\#0: worker cycle
2020/10/29 19:45:29 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:29 [debug] 26277\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
semaphore.t TEST 40: bugfix: semaphore instance can't be garbage collected when someone is waiting on it - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:30 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:30 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:30 [debug] 25829\#0: *441 event timer add: 0: 1000:14154374
2020/10/29 19:45:30 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:30 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:30 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:30 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:30 [debug] 25829\#0: worker cycle
2020/10/29 19:45:30 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:30 [debug] 26305\#0: epoll: fd:7 ev:0001 d:09DFC130
'
semaphore.t TEST 40: bugfix: semaphore instance can't be garbage collected when someone is waiting on it - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:31 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2020/10/29 19:45:31 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:31 [debug] 25829\#0: *441 event timer add: 0: 1000:14155374
2020/10/29 19:45:31 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:31 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:31 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:31 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:31 [debug] 25829\#0: worker cycle
2020/10/29 19:45:31 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:31 [debug] 26305\#0: epoll: fd:7 ev:0001 d:09DFC130
'
semaphore.t TEST 8: semaphore in init_worker_by_lua (new and post) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:45:37 [error] 25829\#0: *441 [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:45:37 [debug] 25829\#0: http lua semaphore wait: 09DFC96C, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:45:37 [debug] 25829\#0: *441 event timer add: 0: 1000:14161378
2020/10/29 19:45:37 [debug] 25829\#0: http lua semaphore wait yielding
2020/10/29 19:45:37 [debug] 25829\#0: *441 lua resume returned 1
2020/10/29 19:45:37 [debug] 25829\#0: *441 lua thread yielded
2020/10/29 19:45:37 [debug] 25829\#0: *441 lua run thread returned -2
2020/10/29 19:45:37 [debug] 25829\#0: worker cycle
2020/10/29 19:45:37 [debug] 25829\#0: epoll timer: 1000
2020/10/29 19:45:37 [debug] 26389\#0: epoll: fd:7 ev:0001 d:09DC79D0
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 11: shared.expire returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to set ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 0, req 0) got: ''
expected: 'failed to get ttl: not found
'
shared.t TEST 3: shared.ttl returns error on not found key - response_body - response is expected (repeated req 1, req 0) got: ''
expected: 'failed to get ttl: not found
'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2020/10/29 19:50:56 [warn] 30777\#0: *138 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:50:56 [error] 30777\#0: *138 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:2020/10/29 19:50:56 [warn] 30777\#0: *138 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:2020/10/29 19:50:56 [error] 30777\#0: *138 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:2020/10/29 19:50:56 [warn] 30777\#0: *138 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:2020/10/29 19:50:56 [error] 30777\#0: *138 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2020/10/29 19:50:56 [warn] 30777#0: *138 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:50:56 [error] 30777#0: *138 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:2020/10/29 19:50:56 [warn] 30777#0: *138 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:2020/10/29 19:50:56 [error] 30777#0: *138 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:2020/10/29 19:50:56 [warn] 30777#0: *138 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:2020/10/29 19:50:56 [error] 30777#0: *138 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2020/10/29 19:50:56 [warn] 30777\#0: *141 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:50:56 [error] 30777\#0: *141 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:2020/10/29 19:50:56 [warn] 30777\#0: *141 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:2020/10/29 19:50:56 [error] 30777\#0: *141 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:2020/10/29 19:50:56 [warn] 30777\#0: *141 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:2020/10/29 19:50:56 [error] 30777\#0: *141 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2020/10/29 19:50:56 [warn] 30777#0: *141 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:50:56 [error] 30777#0: *141 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:2020/10/29 19:50:56 [warn] 30777#0: *141 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:2020/10/29 19:50:56 [error] 30777#0: *141 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:2020/10/29 19:50:56 [warn] 30777#0: *141 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:2020/10/29 19:50:56 [error] 30777#0: *141 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 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 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2020/10/29 19:51:04 [warn] 30939\#0: *300 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *300 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:2020/10/29 19:51:04 [warn] 30939\#0: *300 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *300 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:04 [warn] 30939\#0: *300 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:2020/10/29 19:51:04 [error] 30939\#0: *300 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *300 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:2020/10/29 19:51:04 [error] 30939\#0: *300 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:2020/10/29 19:51:04 [error] 30939\#0: *300 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/10/29 19:51:04 [warn] 30939#0: *300 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *300 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:2020/10/29 19:51:04 [warn] 30939#0: *300 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *300 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:04 [warn] 30939#0: *300 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:2020/10/29 19:51:04 [error] 30939#0: *300 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *300 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:2020/10/29 19:51:04 [error] 30939#0: *300 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:2020/10/29 19:51:04 [error] 30939#0: *300 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2020/10/29 19:51:04 [warn] 30939\#0: *303 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *303 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:2020/10/29 19:51:04 [warn] 30939\#0: *303 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *303 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:04 [warn] 30939\#0: *303 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:2020/10/29 19:51:04 [error] 30939\#0: *303 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:04 [error] 30939\#0: *303 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:2020/10/29 19:51:04 [error] 30939\#0: *303 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:2020/10/29 19:51:04 [error] 30939\#0: *303 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/10/29 19:51:04 [warn] 30939#0: *303 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *303 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:2020/10/29 19:51:04 [warn] 30939#0: *303 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *303 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:04 [warn] 30939#0: *303 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:2020/10/29 19:51:04 [error] 30939#0: *303 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:04 [error] 30939#0: *303 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:2020/10/29 19:51:04 [error] 30939#0: *303 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:2020/10/29 19:51:04 [error] 30939#0: *303 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 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:53647 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:53649 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:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *436 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *436 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2020/10/29 19:51:12 [warn] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2020/10/29 19:51:12 [error] 31076\#0: *439 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2020/10/29 19:51:12 [warn] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2020/10/29 19:51:12 [error] 31076#0: *439 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2020/10/29 19:51:14 [notice] 31134\#0: start worker processes log level:4 log body:2020/10/29 19:51:15 [error] 31141\#0: *30 stream [lua] content_by_lua(nginx.conf:67):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #2
log level:6
log body:2020/10/29 19:51:14 [notice] 31134#0: start worker processes
log level:4
log body:2020/10/29 19:51:15 [error] 31141#0: *30 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:1
'
expected: 'log lines:0
'
stream/errlog.t TEST 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 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 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#2 log level:6 log body:2020/10/29 19:51:24 [notice] 31333\#0: start worker processes log level:4 log body:2020/10/29 19:51:24 [error] 31334\#0: *3 stream [lua] content_by_lua(nginx.conf:75):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2020/10/29 19:51:24 [notice] 31333#0: start worker processes
log level:4
log body:2020/10/29 19:51:24 [error] 31334#0: *3 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/semaphore.t TEST 12: semaphore post in all phase (in a request) - grep_error_log_out (req 0) got: 'sem: timeout,
sem: 3 times,
'
expected: 'sem: 3 times,
'
stream/semaphore.t TEST 8: semaphore in preread_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: timeout,
sem: timeout while prereading client data,
sem: 1 while prereading client data,
'
stream/semaphore.t TEST 8: semaphore in preread_by_lua (all allowed) - grep_error_log_out (req 1) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: 3 times,
sem: timeout while prereading client data,
sem: 1 while prereading client data,
'
stream/semaphore.t TEST 30: bugfix: semaphore instance can't be garbage collected when someone is waiting on it - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:15 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:15 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:15 [debug] 2210\#0: *321 event timer add: 0: 1000:14739583
2020/10/29 19:55:15 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:15 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:15 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:15 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:15 [debug] 2210\#0: worker cycle
2020/10/29 19:55:15 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:15 [debug] 2294\#0: epoll: fd:8 ev:0001 d:09A8D71C
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:18 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:18 [debug] 1889\#0: malloc: 09AD0000:20
2020/10/29 19:55:18 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:18 [debug] 1889\#0: malloc: 09AD0748:8
2020/10/29 19:55:18 [debug] 2210\#0: *321 event timer add: 0: 1000:14742587
2020/10/29 19:55:18 [debug] 1889\#0: malloc: 09AD0018:20
2020/10/29 19:55:18 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:18 [debug] 1889\#0: malloc: 09AD0030:8
2020/10/29 19:55:18 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:18 [debug] 1889\#0: malloc: 09AD0040:92
'
stream/semaphore.t TEST 21: multi wait and mult post with one semaphore - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:19 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:19 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:19 [debug] 2210\#0: *321 event timer add: 0: 1000:14743587
2020/10/29 19:55:19 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:19 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:19 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:19 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:19 [debug] 2210\#0: worker cycle
2020/10/29 19:55:19 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:19 [debug] 2350\#0: epoll: fd:8 ev:0001 d:09A8D71C
'
stream/semaphore.t TEST 9: semaphore in content_by_lua (all allowed) - grep_error_log_out (req 0) @@ -1,2 +1,5 @@
sem: timeout,
+sem: 3 times,
+sem: timeout,
+sem: timeout,
sem: 1,
'
stream/semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:22 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:22 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:22 [debug] 2210\#0: *321 event timer add: 0: 1000:14746587
2020/10/29 19:55:22 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:22 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:22 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:22 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:22 [debug] 2210\#0: worker cycle
2020/10/29 19:55:22 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:22 [debug] 2406\#0: epoll: fd:8 ev:0001 d:09A8D71C
'
stream/semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:23 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:23 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/10/29 19:55:23 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:23 [debug] 2210\#0: *321 event timer add: 0: 1000:14747591
2020/10/29 19:55:23 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:23 [debug] 2210\#0: worker cycle
2020/10/29 19:55:23 [debug] 2210\#0: epoll timer: 1000
'
stream/semaphore.t TEST 2: semaphore wait order - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:23 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/10/29 19:55:23 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:23 [debug] 2210\#0: *321 event timer add: 0: 1000:14747591
2020/10/29 19:55:23 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:23 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:23 [debug] 2210\#0: worker cycle
2020/10/29 19:55:23 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:23 [debug] 2406\#0: epoll: fd:8 ev:0001 d:09A8D71C
'
stream/semaphore.t TEST 28: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:24 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:24 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:24 [debug] 2210\#0: *321 event timer add: 0: 1000:14748591
2020/10/29 19:55:24 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:24 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:24 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:24 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:24 [debug] 2210\#0: worker cycle
2020/10/29 19:55:24 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:24 [debug] 2434\#0: epoll: fd:8 ev:0001 d:09AC85B4
'
stream/semaphore.t TEST 28: basic semaphore count - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:25 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:25 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:25 [debug] 2210\#0: *321 event timer add: 0: 1000:14749591
2020/10/29 19:55:25 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:25 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:25 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:25 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:25 [debug] 2210\#0: worker cycle
'
stream/semaphore.t TEST 17: kill a light thread that is waiting on a semaphore (after post) - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:28 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:28 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:28 [debug] 2210\#0: *321 event timer add: 0: 1000:14752595
2020/10/29 19:55:28 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:28 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:28 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:28 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:28 [debug] 2210\#0: worker cycle
2020/10/29 19:55:28 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:28 [debug] 2490\#0: epoll: fd:8 ev:0001 d:09AC85B4
'
stream/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:29 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:29 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/10/29 19:55:29 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:29 [debug] 2210\#0: *321 event timer add: 0: 1000:14753595
2020/10/29 19:55:29 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:29 [debug] 2210\#0: worker cycle
2020/10/29 19:55:29 [debug] 2210\#0: epoll timer: 1000
'
stream/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:29 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/10/29 19:55:29 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:29 [debug] 2210\#0: *321 event timer add: 0: 1000:14753595
2020/10/29 19:55:29 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:29 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:29 [debug] 2210\#0: worker cycle
2020/10/29 19:55:29 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:29 [debug] 1889\#0: malloc: 09ABC970:8
'
stream/semaphore.t TEST 13: semaphore wait post in preread_by_lua - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:30 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:30 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:30 [debug] 2210\#0: *321 event timer add: 0: 1000:14754595
2020/10/29 19:55:30 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:30 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:30 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:30 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:30 [debug] 2210\#0: worker cycle
2020/10/29 19:55:30 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:30 [debug] 2518\#0: epoll: fd:8 ev:0001 d:09A8D70C
'
stream/semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:31 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:31 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:31 [debug] 2210\#0: *321 event timer add: 0: 1000:14755595
2020/10/29 19:55:31 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:31 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:31 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:31 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:31 [debug] 2210\#0: worker cycle
2020/10/29 19:55:31 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:31 [debug] 1889\#0: child: 0 2210 e:1 t:0 d:0 r:1 j:0
'
stream/semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:32 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:32 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2020/10/29 19:55:32 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:32 [debug] 2210\#0: *321 event timer add: 0: 1000:14756599
2020/10/29 19:55:32 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:32 [debug] 2210\#0: worker cycle
2020/10/29 19:55:32 [debug] 2210\#0: epoll timer: 1000
'
stream/semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:32 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 0) 2020/10/29 19:55:32 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:32 [debug] 2210\#0: *321 event timer add: 0: 1000:14756599
2020/10/29 19:55:32 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:32 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:32 [debug] 2210\#0: worker cycle
2020/10/29 19:55:32 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:32 [debug] 2546\#0: epoll: fd:8 ev:0001 d:09AC85B4
'
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: timeout,
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
'
stream/semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:39 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:39 [debug] 2658\#0: epoll: fd:8 ev:0001 d:09AC85B4
2020/10/29 19:55:39 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:39 [debug] 2658\#0: accept on 0.0.0.0:1984, ready: 0
2020/10/29 19:55:39 [debug] 2210\#0: *321 event timer add: 0: 1000:14763607
2020/10/29 19:55:39 [debug] 2658\#0: malloc: 09ABC1A0:24
2020/10/29 19:55:39 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:39 [debug] 2658\#0: malloc: 09A96B90:16
2020/10/29 19:55:39 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:39 [debug] 2658\#0: malloc: 09A8A9B8:8
'
stream/semaphore.t TEST 3: semaphore wait time=0 - pattern "[error]" should not match any line in error.log but matches line "2020/10/29 19:55:40 [error] 2210\#0: *321 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2020/10/29 19:55:40 [debug] 2210\#0: stream lua semaphore wait: B6CE7014, timeout: 1000, resources: 0, event posted: 0
2020/10/29 19:55:40 [debug] 2210\#0: *321 event timer add: 0: 1000:14764611
2020/10/29 19:55:40 [debug] 2210\#0: stream lua semaphore wait yielding
2020/10/29 19:55:40 [debug] 2210\#0: *321 lua resume returned 1
2020/10/29 19:55:40 [debug] 2210\#0: *321 lua thread yielded
2020/10/29 19:55:40 [debug] 2210\#0: *321 lua run thread returned -2
2020/10/29 19:55:40 [debug] 2210\#0: worker cycle
2020/10/29 19:55:40 [debug] 2210\#0: epoll timer: 1000
2020/10/29 19:55:40 [debug] 2658\#0: epoll: fd:8 ev:0001 d:09AC85B4
'

Warnings

Go back to the index page.