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

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

Summary

Commit Testing Time Unexpected
Failures
Expected
Failures
Files Tests Elapsed Time
8537c5ed 2024-08-06 16:11:52 GMT 9 61 92 12391 547 sec

LuaJIT

LuaJIT 2.1.1719379426, commit 4182d6bf

OpenSSL

OpenSSL 1.1.1w 11 Sep 2023

Compilation Errors

Segmentation Faults

Unexpected Failures

File Name Details
balancer-keepalive.t TEST 16: enable_keepalive: 'max_requests == 100' is the default value - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 00000000023980F8
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive reusing connection 00000000023523E8, host: 127.0.0.1:24847, name:
lua balancer: keepalive not saving connection 00000000023523E8
'
doesn't match '(?^:\Alua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name:\s
(lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name:\s
){98}lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive not saving connection \S+
\z)'
balancer-keepalive.t TEST 7: enable_keepalive: do not support reuse by TLS properties - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 00000000023EB2E8
lua balancer: keepalive closing connection 00000000023EB4D8
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive saving connection 0000000002316B88, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive reusing connection 0000000002316B88, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive saving connection 0000000002316B88, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive saving connection 0000000002316D78, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive reusing connection 0000000002316D78, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive saving connection 0000000002316D78, host: 127.0.0.1:24847, name: test2.crt
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: test.crt
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive reusing connection \S+, host: 127.0.0.1:24847, name: test2.crt
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: test2.crt
$)'
balancer-keepalive.t TEST 10: enable_keepalive: bad usage (no upstream) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 0000000002316B88
lua balancer: keepalive closing connection 0000000002316D78
'
expected: ''
balancer-keepalive.t TEST 4: enable_keepalive: sanity - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 0000000002346280
lua balancer: keepalive closing connection 0000000002346470
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: one
lua balancer: keepalive saving connection 00000000023AFA78, host: 127.0.0.1:24847, name: one
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: two
lua balancer: keepalive saving connection 00000000023AFC68, host: 127.0.0.1:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: two
lua balancer: keepalive saving connection 00000000023AFE58, host: 127.0.0.2:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: three
lua balancer: keepalive saving connection 00000000023B0048, host: 127.0.0.2:24847, name: three
lua balancer: keepalive no free connection, host: 127.0.0.2:26193, name: three
lua balancer: keepalive saving connection 00000000023B0238, host: 127.0.0.2:26193, name: three
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: one
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: one
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: two
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: two
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: three
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:24847, name: three
lua balancer: keepalive no free connection, host: 127.0.0.2:26193, name: three
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:26193, name: three$)'
balancer-keepalive.t TEST 2: enable_keepalive: sanity (different ip port) - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 00000000023AFA78
lua balancer: keepalive closing connection 00000000023AFC68
lua balancer: keepalive closing connection 00000000023AFE58
lua balancer: keepalive closing connection 00000000023B0048
lua balancer: keepalive closing connection 00000000023B0238
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: one
lua balancer: keepalive saving connection 0000000002402478, host: 127.0.0.1:24847, name: one
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: two
lua balancer: keepalive saving connection 0000000002402668, host: 127.0.0.1:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: two
lua balancer: keepalive saving connection 0000000002402858, host: 127.0.0.2:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: three
lua balancer: keepalive saving connection 0000000002402A48, host: 127.0.0.2:24847, name: three
lua balancer: keepalive no free connection, host: 127.0.0.2:26193, name: three
lua balancer: keepalive saving connection 0000000002402C38, host: 127.0.0.2:26193, name: three
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: one
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: one
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name: two
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: two
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:24847, name: two
lua balancer: keepalive no free connection, host: 127.0.0.2:24847, name: three
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:24847, name: three
lua balancer: keepalive no free connection, host: 127.0.0.2:26193, name: three
lua balancer: keepalive saving connection \S+, host: 127.0.0.2:26193, name: three$)'
balancer-keepalive.t TEST 1: upstream_keepalive_module: sanity (nginx default) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 0000000002402478
lua balancer: keepalive closing connection 0000000002402668
lua balancer: keepalive closing connection 0000000002402858
lua balancer: keepalive closing connection 0000000002402A48
lua balancer: keepalive closing connection 0000000002402C38
'
expected: ''
balancer-keepalive.t TEST 21: enable_keepalive: does not save non-keepalive connections - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 000000000238E9F8
lua balancer: keepalive closing connection 000000000238EBE8
lua balancer: keepalive closing connection 000000000238EDD8
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:
lua balancer: keepalive not saving connection 0000000002402068
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:
lua balancer: keepalive not saving connection 0000000002402068
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive not saving connection \S+
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive not saving connection \S+
$)'
balancer-keepalive.t TEST 24: enable_keepalive: can be called again upon retry - grep_error_log_out (req 0) 'lua balancer: keepalive closing connection 000000000238E0F8
lua balancer: keepalive no free connection, host: 127.0.0.3:24847, name:
lua balancer: keepalive not saving connection 00000000023AFD68
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:
lua balancer: keepalive saving connection 00000000023AFD68, host: 127.0.0.1:24847, name:
'
doesn't match '(?^:^lua balancer: keepalive no free connection, host: 127.0.0.3:24847, name:\s
lua balancer: keepalive not saving connection \S+
lua balancer: keepalive no free connection, host: 127.0.0.1:24847, name:\s
lua balancer: keepalive saving connection \S+, host: 127.0.0.1:24847, name: $)'
balancer-keepalive.t TEST 6: upstream_keepalive_module: no granular pooling (TLS properties) - grep_error_log_out (req 0) got: 'lua balancer: keepalive closing connection 00000000023AFD68
'
expected: ''

Expected Failures

File Name Details
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:6 log body:2024/08/06 17:53:09 [notice] 20665\#20665: start worker processes log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *5 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *6 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *7 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *8 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *9 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *10 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *11 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *12 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *13 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:6
log body:2024/08/06 17:53:09 [notice] 20665#20665: start worker processes
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *5 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *6 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *7 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *8 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *9 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *10 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *11 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *12 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *13 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#10 log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *14 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *15 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *16 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *17 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *18 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *19 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *20 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *21 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *22 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:09 [info] 20672\#20672: *23 client 127.0.0.1 closed keepalive connection) 'log lines: #10
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *14 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *15 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *16 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *17 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *18 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *19 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *20 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *21 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *22 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:09 [info] 20672#20672: *23 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 nginx: [emerg] invalid capture error log size "3k", minimum size is 4096 in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:25
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:2
'
errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2024/08/06 17:53:11 [error] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:11 [warn] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:11 [error] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:11 [error] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:11 [warn] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:11 [error] 20877\#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log lines: #25
log level:4
log body:2024/08/06 17:53:11 [error] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:11 [warn] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:11 [error] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:11 [error] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:11 [warn] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:11 [error] 20877#20877: *73 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Alog lines: #26
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#25 log level:4 log body:2024/08/06 17:53:12 [error] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:12 [warn] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:12 [error] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:12 [error] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:12 [warn] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:12 [error] 20877\#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log lines: #25
log level:4
log body:2024/08/06 17:53:12 [error] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:12 [warn] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:12 [error] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:12 [error] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:12 [warn] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):10: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:12 [error] 20877#20877: *74 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Alog lines: #26
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.308 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********22, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********23, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********24, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********25, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********26, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********27, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********28, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********29, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.308
log body: 2024/08/06 17:53:13 [error] 20995#20995: *169 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 29: ringbuf overflow bug - response_body_like - response is expected (log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level: 4 log time: 1722966793.356 log body: 2024/08/06 17:53:13 [error] 20995\#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********30, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********31, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********32, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********33, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********34, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********35, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********36, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********37, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********38, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: 1722966793.356
log body: 2024/08/06 17:53:13 [error] 20995#20995: *170 [lua] content_by_lua(nginx.conf:67):8: **********39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:log level: 4
log time: \d+(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*39, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level: 4
log time: \d{10}(?:\.\d+)?
log body: \d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: \*\*\*\*\*\*\*\*\*\*40, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost")'
errlog.t TEST 30: ringbuf sentinel bug1 - response_body - response is expected (repeated req 0, req 0) @@ -1,3 +1,3 @@
log lines: \#2
-AAA
+aaa
aaa
'
errlog.t TEST 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: \#1
'
errlog.t TEST 31: ringbuf sentinel bug2 - response_body - response is expected (repeated req 1, req 0) @@ -1,2 +1,2 @@
log lines: \#18
-log lines: \#8
+log lines: \#9
'
errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:16 [warn] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:16 [warn] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *366 [lua] content_by_lua(nginx.conf:72):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:16 [warn] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:16 [warn] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *366 [lua] content_by_lua(nginx.conf:72):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:16 [warn] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:16 [warn] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:16 [error] 21239\#21239: *367 [lua] content_by_lua(nginx.conf:72):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:16 [warn] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:16 [warn] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] access_by_lua(nginx.conf:58):11: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] content_by_lua(nginx.conf:72):14: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] content_by_lua(nginx.conf:72):15: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:16 [error] 21239#21239: *367 [lua] content_by_lua(nginx.conf:72):16: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#10 log level:6 log body:2024/08/06 17:53:17 [notice] 20808\#20808: start worker processes log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *416 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *417 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *418 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *419 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *420 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *421 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *422 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *423 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *424 client 127.0.0.1 closed keepalive connection end maybe log lines: \#10 log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *425 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *426 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *427 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *428 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *429 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *430 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *431 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *432 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *433 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *434 client 127.0.0.1 closed keepalive connection end) 'maybe log lines: #10
log level:6
log body:2024/08/06 17:53:17 [notice] 20808#20808: start worker processes
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *416 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *417 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *418 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *419 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *420 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *421 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *422 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *423 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *424 client 127.0.0.1 closed keepalive connection
end
maybe log lines: #10
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *425 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *426 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *427 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *428 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *429 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *430 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *431 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *432 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *433 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *434 client 127.0.0.1 closed keepalive connection
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#3 log level:7 log body:2024/08/06 17:53:17 [info] 21331\#21331: *435 client 127.0.0.1 closed keepalive connection log level:4 log body:2024/08/06 17:53:17 [error] 21331\#21331: *436 [lua] access_by_lua(nginx.conf:58):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:17 [error] 21331\#21331: *437 [lua] access_by_lua(nginx.conf:58):8: --> new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" end maybe log lines: \#3 end) 'maybe log lines: #3
log level:7
log body:2024/08/06 17:53:17 [info] 21331#21331: *435 client 127.0.0.1 closed keepalive connection
log level:4
log body:2024/08/06 17:53:17 [error] 21331#21331: *436 [lua] access_by_lua(nginx.conf:58):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:17 [error] 21331#21331: *437 [lua] access_by_lua(nginx.conf:58):8: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #3
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
end
maybe log lines: #1
end
\z)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:6 log body:2024/08/06 17:53:17 [notice] 20808\#20808: start worker processes log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *440 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *441 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *442 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *443 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *444 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *445 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *446 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *447 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *448 client 127.0.0.1 closed keepalive connection) 'log level:6
log body:2024/08/06 17:53:17 [notice] 20808#20808: start worker processes
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *440 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *441 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *442 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *443 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *444 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *445 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *446 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *447 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *448 client 127.0.0.1 closed keepalive connection
'
doesn't match '(?^s:log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->2, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*access_by_lua\(nginx.conf:\d+\):\d+: -->3, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
)'
errlog.t TEST 16: check the captured error log body - response_body_like - response is expected (log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *449 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *450 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *451 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *452 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *453 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *454 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *455 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *456 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *457 client 127.0.0.1 closed keepalive connection log level:7 log body:2024/08/06 17:53:17 [info] 21359\#21359: *458 client 127.0.0.1 closed keepalive connection) 'log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *449 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *450 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *451 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *452 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *453 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *454 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *455 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *456 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *457 client 127.0.0.1 closed keepalive connection
log level:7
log body:2024/08/06 17:53:17 [info] 21359#21359: *458 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 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *484 [lua] content_by_lua(nginx.conf:72):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *484 [lua] content_by_lua(nginx.conf:72):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" msg count: 3 log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:5 log body:2024/08/06 17:53:18 [warn] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost" log level:4 log body:2024/08/06 17:53:18 [error] 21393\#21393: *485 [lua] content_by_lua(nginx.conf:72):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost") 'msg count: 3
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:2024/08/06 17:53:18 [warn] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):10: --> 91, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] access_by_lua(nginx.conf:58):11: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] content_by_lua(nginx.conf:72):13: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:2024/08/06 17:53:18 [error] 21393#21393: *485 [lua] content_by_lua(nginx.conf:72):14: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
'
doesn't match '(?^s:\Amsg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 89, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 90, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?access_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: localhost, request: "GET /t HTTP/1.1", host: "localhost"
\z)'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
errlog.t TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected (repeated req 1, req 0) got: 'log lines:10
'
expected: 'log lines:0
'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua(nginx.conf:26):18 loop]
[TRACE 2 init_worker_by_lua(nginx.conf:50):4 loop]
[TRACE 2 content_by_lua(nginx.conf:76):4 loop]
process type in init_by_lua*: master
init_worker_by_lua(nginx.conf:50):10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua\(nginx.conf:\d+\):10: process type: single
)'
process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua(nginx.conf:26):18 loop]
[TRACE 2 init_worker_by_lua(nginx.conf:50):4 loop]
[TRACE 2 content_by_lua(nginx.conf:76):4 loop]
process type in init_by_lua*: master
init_worker_by_lua(nginx.conf:50):10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua\(nginx.conf:\d+\):\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua\(nginx.conf:\d+\):10: process type: single
)'
semaphore.t TEST 27: 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 "2024/08/06 17:57:14 [error] 1167\#1167: *273 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2024/08/06 17:57:14 [debug] 1167\#1167: http lua semaphore wait: 00007FC469A11028, timeout: 1000, resources: 0, event posted: 0
2024/08/06 17:57:14 [debug] 1167\#1167: *273 event timer add: 0: 1000:6391163
2024/08/06 17:57:14 [debug] 1167\#1167: http lua semaphore wait yielding
2024/08/06 17:57:14 [debug] 1167\#1167: *273 lua resume returned 1
2024/08/06 17:57:14 [debug] 1167\#1167: *273 lua thread yielded
2024/08/06 17:57:14 [debug] 1167\#1167: *273 lua run thread returned -2
2024/08/06 17:57:14 [debug] 1167\#1167: worker cycle
2024/08/06 17:57:14 [debug] 1167\#1167: epoll timer: 1000
2024/08/06 17:57:14 [notice] 810\#810: signal 1 (SIGHUP) received from 1261, reconfiguring
'
semaphore.t TEST 13: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1 while logging request,
sem: API disabled in the context of log_by_lua* while logging request,
'
semaphore.t TEST 14: semaphore in header_filter_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: 6 times,
sem: 1,
sem: API disabled in the context of header_filter_by_lua*,
'
semaphore.t TEST 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 "2024/08/06 17:57:19 [error] 1167\#1167: *273 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2024/08/06 17:57:19 [debug] 1167\#1167: http lua semaphore wait: 00007FC469A11028, timeout: 1000, resources: 0, event posted: 0
2024/08/06 17:57:19 [debug] 1167\#1167: *273 event timer add: 0: 1000:6396164
2024/08/06 17:57:19 [debug] 1167\#1167: http lua semaphore wait yielding
2024/08/06 17:57:19 [debug] 1167\#1167: *273 lua resume returned 1
2024/08/06 17:57:19 [debug] 1167\#1167: *273 lua thread yielded
2024/08/06 17:57:19 [debug] 1167\#1167: *273 lua run thread returned -2
2024/08/06 17:57:19 [debug] 1167\#1167: worker cycle
'
semaphore.t TEST 9: semaphore in set_by_lua (wait is not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,3 @@
+sem: timeout,
sem: 1,
sem: API disabled in the context of set_by_lua*,
'
semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 17:57:21 [error] 1167\#1167: *273 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 0) 2024/08/06 17:57:21 [debug] 1167\#1167: http lua semaphore wait: 00007FC469A11028, timeout: 1000, resources: 0, event posted: 0
2024/08/06 17:57:21 [debug] 1167\#1167: *273 event timer add: 0: 1000:6398164
2024/08/06 17:57:21 [debug] 1167\#1167: http lua semaphore wait yielding
2024/08/06 17:57:21 [debug] 1167\#1167: *273 lua resume returned 1
2024/08/06 17:57:21 [debug] 1167\#1167: *273 lua thread yielded
2024/08/06 17:57:21 [debug] 1167\#1167: *273 lua run thread returned -2
2024/08/06 17:57:21 [debug] 1167\#1167: worker cycle
2024/08/06 17:57:21 [debug] 1167\#1167: epoll timer: 1000
2024/08/06 17:57:21 [notice] 810\#810: signal 1 (SIGHUP) received from 1802, reconfiguring
'
semaphore.t TEST 18: semaphore wait post in access_by_lua - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 17:57:22 [error] 1167\#1167: *273 [lua] init_worker_by_lua(nginx.conf:26):14: sem: timeout, context: ngx.timer" (req 1) 2024/08/06 17:57:22 [debug] 1167\#1167: http lua semaphore wait: 00007FC469A11028, timeout: 1000, resources: 0, event posted: 0
2024/08/06 17:57:22 [debug] 1167\#1167: *273 event timer add: 0: 1000:6399164
2024/08/06 17:57:22 [debug] 1167\#1167: http lua semaphore wait yielding
2024/08/06 17:57:22 [debug] 1167\#1167: *273 lua resume returned 1
2024/08/06 17:57:22 [debug] 1167\#1167: *273 lua thread yielded
2024/08/06 17:57:22 [debug] 1167\#1167: *273 lua run thread returned -2
2024/08/06 17:57:22 [debug] 1167\#1167: worker cycle
'
stream/errlog-raw-log.t nginx: [error] hello world from init_by_lua
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 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like - response is expected (maybe log lines: \#2 log level:6 log body:2024/08/06 17:58:58 [notice] 7665\#7665: start worker processes log level:4 log body:2024/08/06 17:58:58 [error] 7852\#7852: *199 stream [lua] content_by_lua(nginx.conf:75):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985 end maybe log lines: \#2 end) 'maybe log lines: #2
log level:6
log body:2024/08/06 17:58:58 [notice] 7665#7665: start worker processes
log level:4
log body:2024/08/06 17:58:58 [error] 7852#7852: *199 stream [lua] content_by_lua(nginx.conf:75):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
end
maybe log lines: #2
end
'
doesn't match '(?^s:\Amaybe log lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
end
maybe log lines: #1
end
\z)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *259 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *259 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
|msg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 88, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 102, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 103, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 104, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7908\#7908: *262 stream [lua] content_by_lua(nginx.conf:93):26: --> 104, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):10: --> 88, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):24: --> 102, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *262 stream [lua] content_by_lua(nginx.conf:93):25: --> 103, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7908#7908: *262 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 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2024/08/06 17:58:59 [warn] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:58:59 [warn] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:58:59 [error] 7946\#7946: *287 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2024/08/06 17:58:59 [warn] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:58:59 [warn] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:58:59 [error] 7946#7946: *287 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected (msg count: 3 log level:5 log body:2024/08/06 17:59:00 [warn] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:00 [warn] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 msg count: 3 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:00 [warn] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:00 [error] 7946\#7946: *290 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985) 'msg count: 3
log level:5
log body:2024/08/06 17:59:00 [warn] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:00 [warn] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
msg count: 3
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:00 [warn] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):10: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 87, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):23: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:00 [error] 7946#7946: *290 stream [lua] content_by_lua(nginx.conf:91):24: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Amsg count: 3
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
msg count: 3
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 86, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 87, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something new!, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*?content_by_lua\(nginx.conf:\d+\):\d+: howdy, something even newer!, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 12: filter log by level(ngx.WARN) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:3
'
expected: 'log lines:2
'
stream/errlog.t 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 nginx: [emerg] invalid number of arguments in "lua_capture_error_log" directive in /home/ec2-user/git/lua-resty-core/t/servroot/conf/nginx.conf:17
stream/errlog.t TEST 21: multi-line error log - response_body_like - response is expected (log lines: \#2 log level:6 log body:2024/08/06 17:59:02 [notice] 8111\#8111: start worker processes log level:4 log body:2024/08/06 17:59:02 [error] 8112\#8112: *3 stream [lua] content_by_lua(nginx.conf:67):8: --> new line, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #2
log level:6
log body:2024/08/06 17:59:02 [notice] 8111#8111: start worker processes
log level:4
log body:2024/08/06 17:59:02 [error] 8112#8112: *3 stream [lua] content_by_lua(nginx.conf:67):8: -->
new line, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\Alog lines: #1
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: -->
new line, client: 127.0.0.1, server: 0.0.0.0:\d+
\z)'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *59 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected (log lines: \#32 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985 log level:5 log body:2024/08/06 17:59:02 [warn] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985 log level:4 log body:2024/08/06 17:59:02 [error] 8152\#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985) 'log lines: #32
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 85, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 86, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 99, client: 127.0.0.1, server: 0.0.0.0:1985
log level:5
log body:2024/08/06 17:59:02 [warn] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):10: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
log level:4
log body:2024/08/06 17:59:02 [error] 8152#8152: *62 stream [lua] content_by_lua(nginx.conf:78):11: --> 100, client: 127.0.0.1, server: 0.0.0.0:1985
'
doesn't match '(?^s:\A(?:log lines: #33
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 84, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 85, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 99, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:5
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[warn\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
log level:4
log body:\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2} \[error\] (\d+).*content_by_lua\(nginx.conf:\d+\):\d+: --> 100, client: 127.0.0.1, server: 0.0.0.0:\d+
)\z)'
stream/errlog.t TEST 11: filter log by level(ngx.INFO) - response_body - response is expected (repeated req 0, req 0) got: 'log lines:4
'
expected: 'log lines:3
'
stream/errlog.t TEST 3: client connected info - grep_error_log_out (req 0) 'client 127.0.0.1:7838 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:7842 connected to
capture log line:10
'
doesn't match '(?^:^client .*? connected to .*?
capture log line:2
$)'
stream/process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 0, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
stream/process-type-single.t TEST 1: sanity - grep_error_log_out (req 0) '[TRACE 1 init_by_lua:31 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:78):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
stream/process-type-single.t TEST 1: sanity - response_body - response is expected (repeated req 1, req 0) got: "process type: worker\x{0a}"
length: 21
expected: "process type: single\x{0a}"
length: 21
strings begin to differ at char 15 (line 1 column 15)
stream/process-type-single.t TEST 1: sanity - grep_error_log_out (req 1) '[TRACE 1 init_by_lua:31 loop]
[TRACE 2 init_worker_by_lua:4 loop]
[TRACE 2 content_by_lua(nginx.conf:78):4 loop]
process type in init_by_lua*: master
init_worker_by_lua:10: process type: worker
'
doesn't match '(?^:\[TRACE\s+\d+ init_by_lua:\d+ loop\]
\[TRACE\s+\d+ init_worker_by_lua:\d+ loop\]
\[TRACE\s+\d+ content_by_lua\(nginx.conf:\d+\):4 loop\]
process type in init_by_lua\*: single
init_worker_by_lua:10: process type: single
)'
stream/semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 18:00:09 [error] 12221\#12221: *156 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 1) 2024/08/06 18:00:09 [error] 12221\#12221: *156 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer
2024/08/06 18:00:09 [debug] 12221\#12221: stream lua semaphore wait: 00000000011CAA88, timeout: 1000, resources: 0, event posted: 0
2024/08/06 18:00:09 [debug] 12221\#12221: *156 event timer add: 0: 1000:6566004
2024/08/06 18:00:09 [debug] 12221\#12221: stream lua semaphore wait yielding
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua resume returned 1
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua thread yielded
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua run thread returned -2
2024/08/06 18:00:09 [debug] 12221\#12221: worker cycle
'
stream/semaphore.t TEST 1: basic semaphore in uthread - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 18:00:09 [error] 12221\#12221: *156 stream [lua] init_worker_by_lua:18: sem: 3 times, context: ngx.timer" (req 1) 2024/08/06 18:00:09 [debug] 12221\#12221: stream lua semaphore wait: 00000000011CAA88, timeout: 1000, resources: 0, event posted: 0
2024/08/06 18:00:09 [debug] 12221\#12221: *156 event timer add: 0: 1000:6566004
2024/08/06 18:00:09 [debug] 12221\#12221: stream lua semaphore wait yielding
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua resume returned 1
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua thread yielded
2024/08/06 18:00:09 [debug] 12221\#12221: *156 lua run thread returned -2
2024/08/06 18:00:09 [debug] 12221\#12221: worker cycle
'
stream/semaphore.t TEST 15: two thread wait for each other - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 18:00:13 [error] 12221\#12221: *156 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/06 18:00:13 [debug] 12221\#12221: stream lua semaphore wait: 00000000011CAA88, timeout: 1000, resources: 0, event posted: 0
2024/08/06 18:00:13 [debug] 12221\#12221: *156 event timer add: 0: 1000:6570008
2024/08/06 18:00:13 [debug] 12221\#12221: stream lua semaphore wait yielding
2024/08/06 18:00:13 [debug] 12221\#12221: *156 lua resume returned 1
2024/08/06 18:00:13 [debug] 12221\#12221: *156 lua thread yielded
2024/08/06 18:00:13 [debug] 12221\#12221: *156 lua run thread returned -2
2024/08/06 18:00:13 [debug] 12221\#12221: worker cycle
'
stream/semaphore.t TEST 29: basic semaphore count (negative number) - pattern "[error]" should not match any line in error.log but matches line "2024/08/06 18:00:14 [error] 12221\#12221: *156 stream [lua] init_worker_by_lua:14: sem: timeout, context: ngx.timer" (req 0) 2024/08/06 18:00:14 [debug] 12221\#12221: stream lua semaphore wait: 00000000011CAA88, timeout: 1000, resources: 0, event posted: 0
2024/08/06 18:00:14 [debug] 12221\#12221: *156 event timer add: 0: 1000:6571008
2024/08/06 18:00:14 [debug] 12221\#12221: stream lua semaphore wait yielding
2024/08/06 18:00:14 [debug] 12221\#12221: *156 lua resume returned 1
2024/08/06 18:00:14 [debug] 12221\#12221: *156 lua thread yielded
2024/08/06 18:00:14 [debug] 12221\#12221: *156 lua run thread returned -2
2024/08/06 18:00:14 [debug] 12221\#12221: worker cycle
'
stream/semaphore.t TEST 10: semaphore in log_by_lua (wait not allowed) - grep_error_log_out (req 0) @@ -1,2 +1,4 @@
+sem: timeout,
+sem: 3 times,
sem: 1 while returning text,
sem: API disabled in the context of log_by_lua* while returning text,
'

Warnings

Go back to the index page.