Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 1359 lines (1207 sloc) 96.5 KB
#!/usr/bin/env perl
use strict;
use warnings;
use Date::Parse;
use Getopt::Std;
use List::MoreUtils qw( uniq );
use JSON::XS;
use List::Util qw( max sum );
my %opts;
getopts('vo:', \%opts) or usage();
my $outfile = $opts{o} or usage();
my $verbose = $opts{v};
my %white_list = (
ngx_stream_echo => [
['r', 'discard-req.t', qr/TEST 5: read line then discard request - response_body - response is expected /, qr/\+receive stream response error: connection reset by peer/],
['r', 'discard-req.t', qr/TEST 5: read line then discard request - pattern "\[error\]" should not match any line in error.log but matches line .*? Connection reset by peer/],
['r', 'discard-req.t', qr/TEST 3: read bytes then discard - response_body - response is expected/, qr/\+receive stream response error: connection reset by peer/],
['r', 'discard-req.t', qr/TEST 3: read bytes then discard - pattern "\[error\]" should not match any line in error\.log but matches line .*? Connection reset by peer/],
[undef, 'echo-dup.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
[undef, 'echo.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
[undef, 'flush-wait.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
[undef, 'read-bytes.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
[undef, 'sleep.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
['r', 'lingering-close.t', qr/- response_body - response is expected /, qr/receive stream response error: connection reset by/],
['r', 'lingering-close.t', qr/pattern "\[error\]" should not match any line in error.log but matches line .* Connection reset by peer/],
['r', 'lingering-close.t', qr/TEST 4: lingering_timeout - pattern "\(\?\^:event timer add: \\d\+: 321:\)" should match a line in error\.log/],
['r', 'lingering-close.t', qr/TEST 5: lingering_time - pattern "\(\?\^:event timer add: \\d\+: 1000:\)" should match a line in error\.log/],
#['h', 'echo-dup.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['h', 'echo.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['h', 'flush-wait.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['h', 'read-bytes.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['h', 'sleep.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
['h', 'slow-writes.t', qr/TEST 1: default echo_send_timeout is 60s - grep_error_log_out/],
['h', 'slow-writes.t', qr/TEST 2: explicitly set echo_send_timeout to 60s - grep_error_log_out/],
#['l', 'echo-dup.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['l', 'echo.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['l', 'flush-wait.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['l', 'read-bytes.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['l', 'sleep.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['o', 'echo-dup.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['o', 'echo.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['o', 'flush-wait.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['o', 'read-bytes.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['o', 'sleep.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
['o', undef, qr/ - grep_error_log_out /],
['o', undef, qr/should match a line in error\.log/],
#['v', 'echo-dup.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['v', 'echo.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['v', 'flush-wait.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['v', 'read-bytes.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
#['v', 'sleep.t', 'nginx: [emerg]', qr/^stream echo[ :]|^"echo" directive|in "echo_\w+" directive/],
],
'lua-resty-limit-traffic' => [
['v', 'req.t', qr/TEST 1: a single key \(always commit\) - response_body_like - response is expected \(elapsed: \d+.\d+ sec\.\)/],
['v', 'traffic.t', qr/TEST 1: sanity \(output states\) - response_body_like - response is expected /],
['v', 'traffic.t', qr/TEST 2: sanity \(no output states\) - response_body_like - response is expected/],
],
'resty-cli' => [
['v', 'resty/options.t', 'TEST 15: --shdict option missing size - exit code okay', "got: '3'"],
['v', 'resty/options.t', 'TEST 28: returns error message on invalid name server ip - exit code okay', "got: '3'"],
['v', 'resty/options.t', 'TEST 30: --valgrind & --gdb - exit code okay', "got: '1'"],
['v', 'resty/options.t', 'TEST 31: --gdb & --rr - stderr eq okay', "got: 'ERROR: options --gdb and --valgrind cannot be specified at the same time.\n'"],
['v', 'resty/options.t', 'TEST 31: --gdb & --rr - exit code okay', "got: '1'"],
['v', 'resty/options.t', 'TEST 32: --rr & --valgrind - exit code okay', "got: '1'"],
['v', 'resty/user-args.t', 'TEST 2: minus indexes - stdout like okay', qr/arg -1: .*? --suppressions=valgrind\.suppress/],
['v', 'resty/user-args.t', 'TEST 3: with quote and options - stdout like okay', qr/arg -1: .*? --suppressions=valgrind\.suppress/],
['v', 'resty/options.t', 'TEST 1: bad --nginx value - exit code okay', "got: '3'"],
['v', 'resty/options.t', 'TEST 14: --shdict option missing size - exit code okay', "got: '3'"],
['v', 'resty/signals.t', 'TEST 3: Forward SIGTERM to child process - exit code okay', "got: '3'"],
['v', 'resty/signals.t', 'TEST 1: Forward SIGINT to child process - exit code okay', "got: '2'"],
['v', 'resty/signals.t', 'TEST 8: Forward SIGHUP to child process - exit code okay', "got: '1'"],
],
'lua-resty-lrucache' => [
['v', 'sanity.t', 'TEST 4: ttl - response_body - response is expected'],
['v', 'pureffi/sanity.t', 'TEST 4: ttl - response_body - response is expected'],
['v', 'pureffi/sanity.t', qr/TEST 11: replace value 3 \(the old value has longer expire time\) - response_body - response is expected/, undef, 'linux i386'],
],
'lua-resty-upstream-healthcheck' => [
['hv', 'sanity.t', 'should not match any line in error.log but matches line'],
['wv', 'sanity.t', 'should match a line in error.log'],
['v', 'sanity.t', ' - grep_error_log_out'],
['v', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - response_body - response is expected'],
['v', 'sanity.t', 'TEST 4: health check (bad case), bad status - response_body - response is expected'],
['v', 'sanity.t', 'TEST 5: health check (bad case), timed out - response_body - response is expected'],
['r', 'sanity.t', 'TEST 4: health check (bad case), bad status - response_body - response is expected'],
['r', 'sanity.t', ' - grep_error_log_out'],
['r', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - response_body - response is expected'],
['rv', 'sanity.t', 'TEST 7: peers version upgrade (make up peers down) - response_body - response is expected'],
['w', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - response_body - response is expected'],
['w', 'sanity.t', 'TEST 5: health check (bad case), timed out - grep_error_log_out'],
['w', 'sanity.t', 'TEST 4: health check (bad case), bad status - grep_error_log_out'],
['w', 'sanity.t', 'TEST 9: concurrency == 2 (odd number of peers) - grep_error_log_out'],
['w', 'sanity.t', 'TEST 3: health check (bad case), no listening port in a primary peer - grep_error_log_out'],
['w', 'sanity.t', 'TEST 1: health check (good case), status ignored by default - grep_error_log_out'],
['w', 'sanity.t', 'TEST 2: health check (bad case), no listening port in the backup peer - grep_error_log_out'],
['w', 'sanity.t', 'TEST 7: peers version upgrade (make up peers down)'],
['w', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - grep_error_log_out'],
['w', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - grep_error_log_out'],
['wv', 'sanity.t', 'TEST 11: health check (good case), status ignored by default - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 3: health check (bad case), no listening port in a primary peer - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 5: health check (bad case), timed out - grep_error_log_out'],
['wv', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 4: health check (bad case), bad status - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 2: health check (bad case), no listening port in the backup peer - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 8: peers version upgrade (make down peers up) - response_body - response is expected'],
['wv', 'sanity.t', 'TEST 8: peers version upgrade (make down peers up) - grep_error_log_out'],
['wv', 'sanity.t', 'TEST 5: health check (bad case), timed out - response_body - response is expected'],
['h', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - pattern "healthcheck: peer 127.0.0.1:12359 is turned down after 2 failure(s)" should match a line in error.log'],
['h', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - pattern "healthcheck: peer 127.0.0.1:12356 is turned down after 2 failure(s)" should match a line in error.log'],
['h', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - pattern "healthcheck: peer 127.0.0.1:12355 is turned down after 2 failure(s)" should match a line in error.log'],
['h', 'sanity.t', ' - grep_error_log_out'],
['h', 'sanity.t', 'TEST 5: health check (bad case), timed out - response_body - response is expected'],
['h', 'sanity.t', 'TEST 1: health check (good case), status ignored by default - pattern "was checked to be not ok" should not match any line in error.log but matches line'],
['h', 'sanity.t', 'TEST 1: health check (good case), status ignored by default - pattern "[warn]" should not match any line in error.log but matches line'],
['h', 'sanity.t', 'TEST 7: peers version upgrade (make up peers down) - pattern "was checked to be not ok" should not match any line in error.log but matches line'],
['h', 'sanity.t', qr/TEST 9: concurrency == 2 \(odd number of peers\) - pattern ".*?" should match a line in error\.log/],
['h', 'sanity.t', 'should not match any line in error.log but matches line'],
['h', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - pattern "healthcheck: peer 127.0.0.1:12354 is turned down after 2 failure(s)" should match a line in error.log'],
['h', 'sanity.t', 'TEST 6: health check (bad case), bad status, and then rise again - response_body - response is expected'],
['hv', 'sanity.t', 'TEST 10: concurrency == 3 (odd number of peers) - pattern "healthcheck: peer 127.0.0.1:12359 is turned down after 2 failure(s)" should match a line in error.log'],
],
'lua-resty-mysql' => [
['h', 'sanity.t', 'should match a line in error.log'],
['v', 'world.t', 'ERROR: client socket timed out - TEST 1: test an old bug in table.new() on i386 in luajit v2.1'],
['v', 'world.t', 'TEST 1: test an old bug in table.new() on i386 in luajit v2.1 - status code ok'],
['v', 'world.t', 'TEST 1: test an old bug in table.new() on i386 in luajit v2.1 - response_body - response is expected'],
['v', 'sanity.t', 'TEST 10: multiple select queries - response_body - response is expected'],
['v', 'sanity.t', qr/TEST 10: multiple select queries - pattern "\[error\]" should not match any line in error\.log but matches line .*? lua tcp socket read timed out/],
['r', 'world.t', 'ERROR: client socket timed out - TEST 1: test an old bug in table.new() on i386 in luajit v2.1'],
['r', 'world.t', 'TEST 1: test an old bug in table.new() on i386 in luajit v2.1 - status code ok'],
['r', 'world.t', 'TEST 1: test an old bug in table.new() on i386 in luajit v2.1 - response_body - response is expected'],
['r', 'ssl.t', qr/ - response_body_like - response is expected/, qr/failed to do ssl handshake: handshake failed: nil nil/],
['r', 'ssl.t', qr/ peer closed connection in SSL handshake/],
['r', 'ssl.t', 'TEST 3: send query w/o result set (verify, failed) - response_body - response is expected', qr/failed to connect: failed to do ssl handshake: handshake failed: nil nil/],
['r', 'ssl.t', 'TEST 3: send query w/o result set (verify, failed) - pattern "lua ssl certificate verify error: (18: self signed certificate)" should match a line in error.log'],
['w', 'sanity.t', 'TEST 13: send query w/o result set (unix domain socket) - response_body_like - response is expected', 'failed to close: broken pipe'],
['w', 'sanity.t', qr/TEST 13: send query w\/o result set \(unix domain socket\) - pattern "\[error\]" should not match any line in error\.log but matches line .*? send\(\) failed \(\d+: Broken pipe\)/],
['w', 'charset.t', qr/send\(\) failed \(32: Broken pipe\)/i],
['w', 'sanity.t', qr/send\(\) failed \(32: Broken pipe\)/i],
],
'lua-resty-redis' => [
['w', 'mock.t', 'TEST 1: continue using the obj when read timeout happens - tcp_query ok'],
],
'lua-resty-logger-socket' => [
[undef, 'timeout.t', 'TEST 1: connect timeout - pattern "tcp socket connect timed out" should match a line in error.log'],
[undef, 'timeout.t', 'TEST 1: connect timeout - pattern "reconnect to the log server" should match a line in error.log'],
[undef, 'timeout.t', 'TEST 4: return previous log error - pattern "lua tcp socket connect timed out" should match a line in error.log'],
[undef, 'timeout.t', 'TEST 4: return previous log error - pattern "reconnect to the log server: timeout" should match a line in error.log'],
[undef, 'timeout.t', 'TEST 4: return previous log error - pattern "log error:try to send log messages to the log server failed after 1 retries: try to connect to the log server failed after 1 retries: timeout" should match a line in error.log'],
['h', 'sanity.t', qr/pattern ".*?" should match a line in error\.log/],
['h', 'sanity.t', qr/pattern ".*?" should not match any line in error\.log but matches line/],
['r', 'sanity.t', qr/TEST 18: SSL logging - Verify - pattern "lua ssl certificate verify error" should match a line in error.log/],
['r', 'sanity.t', qr/TEST 19: SSL logging - No SNI - pattern "Message received: Hello SSL" should match a line in error.log/],
['r', 'sanity.t', qr/TEST 17: SSL logging - pattern "Message received: Hello SSL" should match a line in error.log/],
['r', 'sanity.t', qr/TEST 17: SSL logging - pattern "SNI Host: test.com" should match a line in error.log/],
['r', 'sanity.t', qr/TEST 19: SSL logging - No SNI - pattern "SNI Host: nil" should match a line in error.log/],
['v', 'sanity.t', 'should match a line in error.log'],
['v', 'timeout.t', 'should match a line in error.log'],
['v', 'timeout.t', 'TEST 5: flush race condition - pattern "tcp socket connect timed out" should not match any line in error.log but matches line'],
['v', 'bug.t', 'TEST 1: small flush_limit, instant flush - grep_error_log_out'],
['h', 'timeout.t', 'should not match any line in error.log but matches line'],
['h', 'timeout.t', 'should match a line in error.log'],
['h', 'bug.t', 'TEST 1: small flush_limit, instant flush - grep_error_log_out'],
['hv', 'sanity.t', qr/TEST 8: do not log subrequests - pattern .*? should not match any line in error.log but matches line/],
['rv', 'sanity.t', qr/TEST 7: log subrequest, flush twice - pattern "\[error\]" should not match any line in error\.log but matches line .*? lua tcp socket connect timed out, context: ngx\.timer/],
['rv', 'sanity.t', 'TEST 9: partial flush - tcp_query ok'],
['rv', 'sanity.t', qr/TEST 9: partial flush - pattern "\[error\]" should not match any line in error\.log but matches line .*? lua tcp socket connect timed out, context: ngx\.timer/],
['rv', 'sanity.t', 'TEST 15: max reuse - tcp_query ok'],
['rv', 'sanity.t', 'TEST 15: max reuse - TCP query length ok'],
['rv', 'sanity.t', 'TEST 16: flush periodically - tcp_query ok'],
['rv', 'sanity.t', 'TEST 16: flush periodically - TCP query length ok'],
['wv', 'sanity.t', 'TEST 15: max reuse - tcp_query ok'],
['wv', 'sanity.t', 'TEST 15: max reuse - TCP query length ok'],
['wv', 'sanity.t', 'TEST 16: flush periodically - tcp_query ok'],
['wv', 'sanity.t', 'TEST 16: flush periodically - TCP query length ok'],
['v', 'sanity.t', 'TEST 12: drop log test - tcp_query ok'],
['v', 'sanity.t', 'TEST 12: drop log test - TCP query length ok'],
['v', 'sanity.t', 'TEST 2: small flush_limit, instant flush, unix domain socket - tcp_query ok'],
['v', 'sanity.t', 'TEST 2: small flush_limit, instant flush, unix domain socket - TCP query length ok'],
['v', 'sanity.t', 'TEST 1: small flush_limit, instant flush - tcp_query ok'],
['v', 'sanity.t', 'TEST 1: small flush_limit, instant flush - TCP query length ok'],
['v', 'sanity.t', 'TEST 3: small flush_limit, instant flush, write a number to remote - tcp_query ok'],
['v', 'sanity.t', 'TEST 3: small flush_limit, instant flush, write a number to remote - TCP query length ok'],
['v', 'timeout.t', 'TEST 3: risk condition - tcp_query ok'],
['v', 'timeout.t', 'TEST 3: risk condition - TCP query length ok'],
],
'lua-resty-lock' => [
['v', 'sanity.t', 'TEST 13: expire() - response_body - response is expected', qr/\+lock 1: expire: nil, not found$/sm],
['v', 'sanity.t', 'TEST 4: waited locks - response_body_like - response is expected'],
['v', 'sanity.t', 'TEST 5: waited locks (custom step) - response_body_like - response is expected'],
['v', 'sanity.t', 'TEST 6: waited locks (custom ratio) - response_body_like - response is expected'],
['v', 'sanity.t', 'TEST 7: waited locks (custom max step) - response_body_like - response is expected'],
['v', 'sanity.t', 'TEST 8: lock expired by itself - response_body_like - response is expected'],
],
'lua-resty-websocket' => [
['h', 'cs.t', 'TEST 14: pool option - pattern "lua tcp socket keepalive create connection pool for key "my_conn_pool"" should match a line in error.log (req 1)'],
['h', 'cs.t', 'TEST 22: SSL with keepalive - failed to reload configuration'],
['h', 'cs.t', 'TEST 22: SSL with keepalive - status code ok', "got: '404'"],
['h', 'cs.t', 'TEST 22: SSL with keepalive - response_body - response is expected', '404 Not Found'],
['h', 'cs.t', qr/TEST 22: SSL with keepalive - pattern "\[error]" should not match any line in error.log but matches line .*? No such file or directory/],
['v', 'cs.t', 'should match a line in error.log'],
['v', 'cs.t', 'TEST 10: client recv timeout (timeout option) - response_body - response is expected'],
['v', 'cs.t', 'TEST 9: client recv timeout (set_timeout) - response_body - response is expected'],
['v', 'sanity.t', 'ERROR: client socket timed out - TEST 9: simple text data frame (1 Mbytes)'],
['v', 'sanity.t', 'should match a line in error.log'],
['v', 'sanity.t', qr/TEST 9: simple text data frame \(1 Mbytes\) - (?:header \S+|status code) ok/],
['r', 'sanity.t', 'TEST 16: text frame (send unmasked frames on the client side) - response_body - response is expected'],
['r', 'sanity.t', 'ERROR: client socket timed out - TEST 8: simple text data frame (65536 bytes)'],
['r', 'sanity.t', 'TEST 8: simple text data frame (65536 bytes) - pattern "text msg received is expected," should match a line in error.log'],
['r', 'sanity.t', 'ERROR: client socket timed out - TEST 7: simple text data frame (65535 bytes)'],
['r', 'sanity.t', 'TEST 7: simple text data frame (65535 bytes) - pattern "text msg received is expected," should match a line in error.log'],
['r', 'sanity.t', 'ERROR: client socket timed out - TEST 9: simple text data frame (1 Mbytes)'],
['r', 'sanity.t', 'TEST 9: simple text data frame (1 Mbytes) - pattern "text msg received is expected," should match a line in error.log'],
['r', 'cs.t', 'TEST 16: text frame (send unmasked frames on the client side) - response_body - response is expected'],
['rv', 'cs.t', 'TEST 10: client recv timeout (timeout option) - response_body - response is expected'],
['wv', 'cs.t', 'TEST 10: client recv timeout (timeout option) - response_body - response is expected'],
['wv', 'cs.t', 'TEST 16: text frame (send unmasked frames on the client side) - response_body - response is expected'],
['hv', 'sanity.t', 'TEST 13: close frame (no payload at all) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 18: simple text data frame (3 bytes, fragmented, first frame) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 4: simple text data frame (125 bytes) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 19: simple text data frame (3 bytes, fragmented, last frame) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 16: pong frame (with payload) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 8: simple text data frame (65536 bytes) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 10: simple binary data frame (3 bytes) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 11: close frame (status code + non-empty msg) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 2: simple text data frame (3 bytes) - pattern "[error]" should not match any line in error.log but matches line'],
['hv', 'sanity.t', 'TEST 6: simple text data frame (127 bytes) - pattern "[error]" should not match any line in error.log but matches line'],
['r', 'cs.t', qr/TEST 26: SSL without ssl_verify/],
['r', 'cs.t', qr/TEST 23: SSL without keepalive/],
['r', 'cs.t', qr/TEST 22: SSL with keepalive/],
['r', 'cs.t', qr/TEST 24: SSL with ssl_verify/],
['r', 'cs.t', qr/TEST 25: SSL with ssl_verify \(handshake failed\)/],
],
'lua-resty-dns' => [
['v', 'mock.t', qr/pattern "\[error\]" should not match any line in error.log but matches line ".*?lua udp socket read timed out/],
['v', 'mock.t', 'TEST 10: timeout - response_body - response is expected'],
['v', 'mock.t', 'pattern "lua udp socket read timed out" should match a line in error.log'],
['v', 'sanity.t', qr/TEST 8: TXT query \(no ans\) - pattern "\[error\]" should not match any line in error.log but matches line .*? lua udp socket read timed out/],
['rv', 'sanity.t', qr/TEST 7: NS records - pattern "\[error\]" should not match any line in error\.log but matches line .*? lua udp socket read timed out/],
['hv', 'sanity.t', qr/TEST 7: NS records - pattern "\[error\]" should not match any line in error\.log but matches line .*? lua udp socket read timed out/],
],
ngx_rds_csv => [
['w', '000_init.t', 'TEST 11: cats - drop table'],
['w', '000_init.t', 'TEST 12: cats - create table'],
['w', '000_init.t', 'TEST 13: cats - insert value'],
['w', '000_init.t', 'TEST 14: cats - insert value'],
['w', 'pg.t'],
['w', 'unused.t', 'TEST 1: used - stap output expected'],
['w', 'unused.t', 'TEST 3: used (multi http {} blocks) - stap output expected'],
['r', 'sanity-stream.t', 'TEST 1: sanity'],
['r', 'sanity-stream.t', 'TEST 2: keep-alive'],
['r', 'sanity-stream.t', 'TEST 7: single row, single col'],
['r', 'sanity-stream.t', 'TEST 9: text blob field'],
['r', 'sanity-stream.t', 'TEST 12: date type'],
],
ngx_replace_filter => [
['w', '09-unused.t', 'TEST 1: used - stap output expected'],
['w', '09-unused.t', 'TEST 3: used (multi http {} blocks) - stap output expected'],
],
ngx_postgres => [
['w', undef, qr/ - status code ok/, qr/got: '50[20]'/],
['w', undef, qr/ - response is expected/, qr/500 Internal Server Error|502 Bad Gateway/],
['w', undef, qr/ - header Content-Type ok/, qr/got: 'text\/html'/],
['w', undef, qr/header Content-Type not present in the raw headers/, qr/HTTP\/1\.1 (?:502 Bad Gateway|500 Internal Server Error)/],
['w', undef, qr/header X-(?:Affected|Test|Columns|Rows|Query) ok/, qr/got: ''/],
['w', undef, qr/postgres: connection failed: could not send startup packet: Success/],
['w', 'eval.t', 'TEST 2: sanity (simple case) - response_body - response is expected', qr/got: ""/],
],
ngx_eval => [
['l', 'crash.t', 'nginx: [emerg]', qr/"eval" directive is not allowed here/],
],
ngx_form_input => [
['r', 'upload.t', 'TEST 1: big upload'],
['r', 'upload.t', 'Looks like you planned 2 tests but ran 3'],
],
ngx_set_misc => [
['v', 'formatted-time.t', 'TEST 1: local time format - response_body_like - response is expected'],
['v', 'formatted-time.t', 'TEST 2: GMT time format - response_body_like - response is expected'],
['', 'base32.t', 'nginx: [emerg]', qr/"set_base32_alphabet" directive takes an alphabet of \d+ bytes but 32 expected in/],
],
ngx_memc => [
['v', 'exptime.t', 'TEST 1: set exptime - response_body_like'],
['w', 'keepalive/storage.t', 'TEST 18: set and get too big values'],
['r', 'keepalive/storage.t', 'TEST 18: set and get too big values'],
['w', 'storage.t', 'TEST 18: set and get too big values'],
['r', 'storage.t', 'TEST 18: set and get too big values'],
['r', 'storage.t', 'Looks like you planned 76 tests but ran 78.'],
['r', 'keepalive/storage.t', 'Looks like you planned 74 tests but ran 76.'],
],
ngx_rds_json => [
['o', undef, 'should match a line in error.log'],
['w', 'pg.t'],
['w', '000_init.t', 'TEST 8: cats - drop table'],
['w', '000_init.t', 'TEST 9: cats - create table'],
['w', '000_init.t', 'TEST 10: cats - insert value'],
['w', '000_init.t', 'TEST 11: cats - insert value'],
],
ngx_encrypted_session => [
['o', undef, 'should match a line in error.log'],
],
ngx_srcache => [
[undef, 'bugs.t', 'TEST 16: exit(500) in srcache_store - stap output expected', qr/-post subreq: rc=500, status=0/],
['o', undef, 'should match a line in error.log'],
['w', 'postgres-main.t'],
['w', 'bugs.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line .*? writev\(\) failed/],
['w', 'bugs.t', 'TEST 14: upstream closes the connection prematurely in srcache_fetch - pattern "upstream prematurely closed connection" should match a line in error.log'],
['w', '000_init.t', '- pg -'],
['w', 'conditional-get.t', 'TEST 7: cache hit (I-U-S conditional GET, 412) - '],
['v', 'store-max-size.t', 'TEST 8: just more than store_max_size - pattern "store status: BYPASS" should match a line in error.log'],
],
'lua-resty-core' => [
['v', 'shared.t', 'TEST 4 shared.ttl returns key ttl for non-default ttl - response_body_like - response is expected'],
['v', 'shared.t', 'TEST 4 shared.ttl returns key ttl for non-default ttl - pattern "[error]" should not match any line in error.log but matches line'],
['l', undef, 'nginx: [emerg]', qr/bind\(\) to 0\.0\.0\.0:\d+ failed \(\d+: Address already in use\)/],
['l', undef, 'nginx: [emerg]', 'still could not bind()'],
['h', 'shared.t', 'TEST 10: shared.expire returns error on not found key - response_body - response is expected'],
['h', 'shared.t', 'TEST 3: shared.ttl returns error on not found key - response_body - response is expected'],
['h', 'errlog.t', 'TEST 20: fetch a few and generate a few, then fetch again (not overflown again) - response_body_like - response is expected', qr/\A\s*'msg count: \d/s],
['h', 'errlog.t', 'TEST 18: flood the capturing buffer (5k) - response_body_like - response is expected', qr/\A\s*'log lines: /s],
['h', 'errlog.t', 'TEST 31: ringbuf sentinel bug2 - response_body - response is expected', qr/\+log lines: \\\#9/],
['h', 'errlog.t', 'TEST 19: fetch a few and generate a few, then fetch again (overflown again) - response_body_like'],
['h', 'ssl-session-fetch.t', qr/TEST 5: yield during doing handshake with client which uses low version OpenSSL - pattern .*? No such file or directory/],
[undef, 'errlog-raw-log.t', 'nginx: [error]', 'hello world from init_by_lua'],
[undef, 'errlog.t', 'TEST 17: flood the capturing buffer (4k) - response_body_like - response is expected', qr/\A\s*\'log lines: \#20\n/s],
[undef, 're-opt.t', 'TEST 1: default jit_stack_size too small - response_body - response is expected', qr/got: 'from: 1\nto: 1563\n'/, 'linux i386'],
[undef, 'errlog.t', 'nginx: [emerg]', 'invalid number of arguments in "lua_capture_error_log" directive in '],
[undef, 'errlog.t', 'nginx: [emerg]', 'invalid capture error log size "3k", minimum size is 4096 in '],
['h', 'errlog.t', 'TEST 21: multi-line error log - response_body_like - response is expected', qr/'log lines: \#\d+\b/m],
['h', 'errlog.t', 'TEST 16: check the captured error log body - response_body_like - response is expected', qr/'log level:\d\b/m],
['h', 'errlog.t', 'TEST 31: ringbuf sentinel bug2 - response_body - response is expected', qr/\+log lines: \\\#10\b/m],
['h', 'errlog.t', 'TEST 22: user-supplied Lua table to hold the result (get one log + no log) - response_body_like', qr/'maybe log lines: \#\d+\b/m],
['h', 'errlog.t', ' should match a line in error.log'],
['h', 'errlog.t', ' should not match any line in error.log but matches line "'],
['h', 'errlog.t', 'TEST 11: filter log by level(ngx.INFO) - response_body - response is expected', qr/\bgot: 'log lines:\d+\n'/ms],
['h', 'errlog.t', 'TEST 13: filter log by level(ngx.CRIT) - response_body - response is expected', qr/\bgot: 'log lines:\d+\n'/ms],
['h', 'errlog.t', 'TEST 12: filter log by level(ngx.WARN) - response_body - response is expected', qr/\bgot: 'log lines:\d+\n'/ms],
['h', 'errlog.t', 'TEST 29: ringbuf overflow bug - response_body_like - response is expected', qr/'log level: \d\n/ms],
['h', 'errlog.t', 'TEST 17: flood the capturing buffer (4k) - response_body_like - response is expected', qr/'log lines: \#\d+\n/ms],
['v', 'process-type-cache.t', 'TEST 1: sanity - response_body - response is expected', qr/got: "type: single\b/],
['v', 'process-type-cache.t', 'TEST 1: sanity - grep_error_log_out', " loop]\n'"],
['v', 'process-type-master.t', 'TEST 1: sanity - response_body - response is expected', qr/got: "process type: single\b/],
['v', 'process-type-master.t', 'TEST 1: sanity - grep_error_log_out', " loop]\ninit_worker_by_lua:8: process type: single\n'"],
['v', 'process-type-privileged-agent.t', 'TEST 1: sanity - response_body - response is expected', qr/got: "type: single\b/],
['v', 'process-type-privileged-agent.t', 'TEST 1: sanity - grep_error_log_out', " loop]\n'"],
['v', 'shared.t', 'TEST 11: shared.expire updates ttl of key with non-default ttl - response_body - response is expected', qr/got: 'after 0\.2s: nil\nafter 0\.4s: nil/],
['h', 'ocsp.t', qr/ should match a line in error\.log/],
['h', 'ocsp.t', qr/ - response_body - response is expected/, qr/\+failed to connect: no such file or directory/],
['h', 'ocsp.t', qr/pattern "\[emerg\]" should not match any line in error\.log but matches line ".*?No such file or directory/],
['h', 'ssl.t', qr/ should match a line in error\.log/],
['h', 'ssl.t', qr/ - response_body - response is expected/, qr/\+failed to connect: no such file or directory/],
['h', 'ssl.t', qr/pattern "\[(?:emerg|crit)\]" should not match any line in error\.log but matches line ".*?No such file or directory/],
['h', 'ssl-session-fetch.t', ' - grep_error_log_out'],
['h', 'ssl-session-fetch.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', 'ssl-session-store.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', 'ssl-session-store.t', 'should match a line in error.log'],
['r', 'ocsp.t', qr/ - response_body - response is expected/, qr/\+failed to do SSL handshake: handshake failed/],
['r', 'ocsp.t', qr/pattern ".*?" should match a line in error\.log/],
['r', 'ocsp.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', 'ssl.t', qr/ - response_body - response is expected/, qr/\+failed to do SSL handshake: handshake failed/],
['r', 'ssl.t', qr/pattern ".*?" should match a line in error\.log/],
['r', 'ssl.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', 'ssl.t', qr/TEST 14: ngx\.semaphore in ssl_certificate_by_lua\* - grep_error_log_out/],
['r', 'ssl.t', qr/\[crit\] .*? SSL_do_handshake\(\) failed .*?random number generator:SSLEAY_RAND_BYTES:PRNG not seeded/],
['r', 'ssl.t', qr/TEST 21: yield during doing handshake with client which uses low version OpenSSL - response_body - response is expected/],
['r', 'ssl.t', qr/TEST 21: yield during doing handshake with client which uses low version OpenSSL - pattern .*? should not match any line in error.log but matches line/],
['r', 'ssl.t', qr/SSL_do_handshake\(\) failed \(SSL: error:\d+:random number generator:RAND_bytes:PRNG not seeded/],
['r', 'balancer.t', 'TEST 16: https (keepalive) - status code ok', qr/got: '502'/],
['r', 'balancer.t', 'TEST 16: https (keepalive) - response_body - response is expected', qr/502 Bad Gateway/],
['r', 'balancer.t', qr/TEST 16: https \(keepalive\) - pattern "\[error]" should not match any line in error\.log but matches line .*? peer closed connection in SSL handshake while SSL handshaking to upstream/],
['r', 'balancer.t', 'TEST 17: https (no keepalive) - status code ok', qr/got: '502'/],
['r', 'balancer.t', 'TEST 17: https (no keepalive) - response_body - response is expected', '502 Bad Gateway'],
['r', 'balancer.t', qr/TEST 17: https \(no keepalive\) - pattern "\[error]" should not match any line in error\.log but matches line .*? peer closed connection in SSL handshake while SSL handshaking to upstream/],
['r', 'balancer.t', qr/pattern "\[alert\]" should not match any line in error\.log but matches line .*? ignoring stale global SSL error/],
['r', 'ssl-session-store.t', qr/pattern ".*?" should match a line in error\.log/],
['r', 'ssl-session-store.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', 'ssl-session-store.t', qr/ - response_body - response is expected /, qr/\+failed to do SSL handshake: handshake failed/],
['r', 'ssl-session-fetch.t', qr/ - response_body - response is expected /, qr/\+failed to do SSL handshake: handshake failed/],
['r', 'ssl-session-fetch.t', qr/pattern ".*?" should match a line in error\.log/],
['r', 'ssl-session-fetch.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', 'ssl-session-fetch.t', ' - grep_error_log_out'],
['r', 'ssl-session-fetch.t', 'TEST 5: yield during doing handshake with client which uses low version OpenSSL - response_body - response is expected'],
['r', 'ssl-session-fetch.t', 'TEST 5: yield during doing handshake with client which uses low version OpenSSL - pattern .*? should not match any line in error.log but matches line'],
['v', 'balancer.t', qr/should match a line in error\.log/, undef, 'linux i386'],
['v', 'semaphore.t', qr/ - grep_error_log_out /, undef, 'linux i386'],
['h', 'semaphore.t', qr/should not match any line in error.log but matches line/],
['h', 'semaphore.t', qr/ - grep_error_log_out /],
['v', 'time.t', 'TEST 1: ngx.now() - response_body - response is expected', qr/< 0\.11: false/],
['v', 'request.t', 'TEST 7: ngx.req.start_time() - response_body - response is expected', qr/< 0\.11: false/],
[undef, 're-match.t', qr/TEST 2: matched, no submatch, jit compile, regex cache - pattern ".*?TRACE .*?" should match a line in error\.log/], # FIXME
['v', 're-sub.t', 'ERROR: client socket timed out - TEST 5: replace template + submatches (exceeding buffers)'],
['v', 're-sub.t', 'TEST 5: replace template + submatches (exceeding buffers) - status code ok'],
['v', 're-sub.t', 'TEST 5: replace template + submatches (exceeding buffers) - response_body - response is expected'],
['h', 'shdict.t', 'TEST 2: get an nonexistent key - response_body - response is expected'],
['h', 'request.t', qr/TEST 3: ngx.req.get_headers \(count is 2\) - pattern .*?TRACE.*? should match a line in error\.log/],
['rv', 're-sub.t', qr/TEST 3: func \+ submatches - pattern "NYI" should not match any line in error\.log but matches line "\[TRACE --- content_by_lua\(.*?\):1 -- NYI: bytecode 51 at content_by_lua\(.*?\):5\]/],
['wv', 're-sub.t', qr/TEST 3: func \+ submatches - pattern "NYI" should not match any line in error\.log but matches line "\[TRACE --- content_by_lua\(.*?\):1 -- NYI: bytecode 51 at content_by_lua\(.*?\):5\]/],
['wv', 'shared.t', qr/TEST 4 shared\.ttl returns key ttl for non-default ttl - response_body_like - response is expected/],
['wv', 'shared.t', 'TEST 4 shared.ttl returns key ttl for non-default ttl - pattern "[error]" should not match any line in error.log but matches line'],
[undef, 'response.t', qr/TEST 4: .*? - pattern " -- NYI:" should not match any line in error\.log but matches line "\[TRACE --- response.lua:112 -- NYI: return to lower frame/],
],
ngx_stream_lua => [
['l', undef, 'nginx: [emerg]', qr/bind\(\) to 0\.0\.0\.0:\d+ failed \(\d+: Address already in use\)/],
['l', undef, 'nginx: [emerg]', 'still could not bind()'],
[undef, '132-lua-blocks.t', 'nginx: [emerg]', qr/Lua code block missing the closing long bracket \"\]=*\]\" in|unexpected lua closing long-bracket in|"http" directive is not allowed here in /],
[undef, '109-timer-hup.t', qr/TEST 7: HUP reload should abort pending timers \(fuzz test\) - grep_error_log_out/, qr/got: 'stream lua found 8\d{3} pending timers/],
['r', '071-idle-socket.t', 'TEST 6: set keepalive when cosocket recv buffer has unread data'],
['r', '129-ssl-socket.t', undef, qr/failed to do SSL handshake: handshake failed/],
['r', '023-preread/sanity.t', 'TEST 32: phase postponing works - response_body - response is expected', qr/receive stream response error: connection reset by/],
['r', '023-preread/sanity.t', 'TEST 32: phase postponing works - pattern "$ssl_preread_server_name = my.sni.server.name while prereading client data" should match a line in error.log'],
['r', '023-preread/sanity.t', qr/SSL: error:\d+:random number generator:RAND_bytes:PRNG not seeded/],
['w', '023-preread/sanity.t', 'TEST 32: phase postponing works - response_body - response is expected', qr/receive stream response error: connection reset by/],
['o', undef, 'should match a line in error.log'],
['o', undef, ' - grep_error_log_out'],
[undef, '126-shdict-frag.t', 'TEST 9: cannot merge in-used big slabs page (forward) - response_body - response is expected', undef, 'linux i386'],
[undef, '126-shdict-frag.t', 'TEST 9: cannot merge in-used big slabs page (forward) - stap output expected', undef, 'linux i386'],
[undef, '126-shdict-frag.t', 'TEST 7: merge big slabs (less than max slab size) backward - stap output expected', undef, 'linux i386'],
['r', '106-timer.t', 'should match a line in error.log'],
['v', '108-timer-safe.t', 'should match a line in error.log'],
['rv', '058-tcp-socket.t', 'TEST 34: successful reread after a read time out happen (receive -> receive) - response_body - response is expected'],
['v', '106-timer.t', 'should match a line in error.log'],
['v', '109-timer-hup.t', 'should match a line in error.log'],
['w', '005-exit.t', 'TEST 2: throw error after sending the header and partial body - response_body - response is expected', "got: 'h'"],
['v', '025-codecache.t', 'should match a line in error.log'],
['w', '025-codecache.t', 'TEST 17: lua_max_pending_timers - chained timers (non-zero delay) - not exceeding - pattern "stream lua decrementing the reference count for Lua VM: 3" should not match any line in error.log but matches line'],
['w', '025-codecache.t', 'TEST 22: cosocket connection pool timeout (after Lua VM destroys) - pattern "stream lua tcp socket keepalive max idle timeout" should not match any line in error.log'],
['w', '025-codecache.t', qr/TEST 22: cosocket connection pool timeout \(after Lua VM destroys\) - pattern .*?lua tcp socket keepalive: free connection pool/],
['', '058-tcp-socket.t', qr/wrong ident \d+ response for blah-blah-not-found\.agentzh\.org/],
['w', '058-tcp-socket.t', 'TEST 26: send tables of string fragments (bad type "nil") - response_body - response is expected', "got: 'c'"],
['w', '058-tcp-socket.t', 'TEST 27: send tables of string fragments (bad type "boolean") - response_body - response is expected', "got: 'c'"],
['w', '058-tcp-socket.t', 'TEST 28: send tables of string fragments (bad type ngx.null) - response_body - response is expected', "got: 'c'"],
['w', '100-client-abort.t', 'TEST 16: ngx.say - pattern "say failed: broken pipe" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 17: ngx.print - pattern "print failed: broken pipe" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 16: ngx.say - pattern "say failed: nginx output filter error" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 17: ngx.print - pattern "print failed: nginx output filter error" should match a line in error.log'],
['w', '056-flush.t', 'TEST 1: flush wait - content - pattern "lua reuse free buf memory 13 >= 5" should match a line in error.log'],
['h', '043-shdict.t', '- response_body'],
['v', '124-init-worker.t', 'TEST 18: syslog error log - udp_query ok'],
['h', '124-init-worker.t', 'TEST 18: syslog error log - udp_query ok'],
['h', '126-shdict-frag.t', 'response_body - response is expected'],
['h', '129-ssl-socket.t', 'should match a line in error.log'],
['h', '129-ssl-socket.t', qr/unix domain ssl cosocket .*? response is expected/, qr/failed to connect: no such file or directory/],
['h', '129-ssl-socket.t', qr/unix domain ssl cosocket .*? - grep_error_log_out/, qr/''/],
[undef, '058-tcp-socket.t', 'unexpected response for blah-blah-not-found.agentzh.org'],
['w', '067-req-socket.t', 'TEST 9: successful reread after reading timeout happens (receive -> receive) - response_body - response is expected', '+received: err: timeout, partial: abchello world'],
['w', '067-req-socket.t', 'TEST 10: successful reread after reading timeout happens (receive -> receiveuntil) - response_body - response is expected', '+received: err: timeout, partial: abchello world'],
['w', '067-req-socket.t', 'TEST 11: successful reread after reading timeout happens (receiveuntil -> receive) - response_body - response is expected', '+received: err: timeout, partial: abchello world'],
['w', '100-client-abort.t', 'TEST 18: ngx.flush - pattern "flush succeeded" should match a line in error.log'],
['v', '043-shdict.t', 'TEST 56: get_stale: expired entries can still be fetched - response_body - response is expected', '+33, nil, true', 'linux i386'],
#['v', '057-flush-timeout.t', 'TEST 1: flush wait - timeout - response_body - response is expected', qr/got: 'received \d+ bytes of response data\./, 'linux i386'],
#['v', '057-flush-timeout.t', 'TEST 4: flush wait - return "timeout" error - response_body - response is expected', qr/got: 'received \d+ bytes of response data\./, 'linux i386'],
#['v', '057-flush-timeout.t', 'TEST 5: flush wait in multiple user threads - return "timeout" error - response_body - response is expected', qr/got: 'received \d+ bytes of response data\./, 'linux i386'],
['h', '129-ssl-socket.t', 'TEST 24: lua_ssl_crl - response_body - response is expected', '+failed to connect: no such file or directory'],
['rv', '058-tcp-socket.t', 'TEST 35: successful reread after a read time out happen (receive -> receiveuntil) - response_body - response is expected', '+world', 'linux i386'],
['rv', '058-tcp-socket.t', 'TEST 36: successful reread after a read time out happen (receiveuntil -> receiveuntil) - response_body - response is expected', '+world', 'linux i386'],
['rv', '058-tcp-socket.t', 'TEST 37: successful reread after a read time out happen (receiveuntil -> receive) - response_body - response is expected', '+world', 'linux i386'],
['rv', '067-req-socket.t', 'TEST 11: successful reread after reading timeout happens (receiveuntil -> receive) - response_body - response is expected', '+received: err: timeout, partial: abchello world', 'linux i386'],
['h', '058-tcp-socket.t', qr/pattern "\[error\]" should not match any line in error.log but matches line .*? unexpected response for agentzh\.org/],
],
ngx_lua => [
[undef, undef, qr/ - stap output expected/, undef, 'linux i386'],
[undef, undef, qr/ - stap output should match the pattern/, qr/doesn't match/m, 'linux i386'],
[undef, '044-req-body.t', qr/TEST 44: zero size request body and reset it to a new file/], # FIXME: stap goes crazy on EC2. should fix this up.
['r', '132-lua-blocks.t', qr/TEST 24: inline Lua code cache should not mess up across different phases - pattern .*? should match a line in error\.log/],
['r', '139-ssl-cert-by.t', 'TEST 1: simple logging - grep_error_log_out', qr/'reusable connection: 1/],
['r', '142-ssl-session-store.t', 'TEST 1: simple logging - grep_error_log_out', qr/'reusable connection: 1/],
['r', '014-bugs.t', qr/SSL: error:\d+:random number generator:RAND_bytes:PRNG not seeded/],
[undef, '153-semaphore-hup.t', 'TEST 2: timer + reload (lua code cache off) - grep_error_log_out', qr/^\s*created semaphore object$/ms],
[undef, '153-semaphore-hup.t', 'TEST 1: timer + reload - grep_error_log_out', qr/^\s*created semaphore object$/ms],
['hv', '154-semaphore.t', 'TEST 2: timer + shutdown error log (lua code cache off)', 'Memcheck:Leak'],
['v', '124-init-worker.t', qr/TEST 24: destory Lua VM in cache processes \(with init worker but without privileged agent\) - pattern .*?lua close the global Lua VM/],
['v', '124-init-worker.t', qr/TEST 22: destory Lua VM in cache processes \(with privileged agent\) - grep_error_log_out/, qr/\A\s*''\s+doesn't match/sm],
['v', '124-init-worker.t', qr/TEST 22: destory Lua VM in cache processes \(with privileged agent\) - pattern .*?start privileged agent process/],
['v', '124-init-worker.t', qr/TEST 23: destory Lua VM in cache processes \(with init worker and privileged agent\) - grep_error_log_out/, '-hello from init worker by lua'],
['v', '124-init-worker.t', qr/TEST 23: destory Lua VM in cache processes \(with init worker and privileged agent\) - pattern .*?(?:start privileged agent process|lua close the global Lua VM).*? should match a line in error\.log/],
['v', '124-init-worker.t', qr/TEST 21: destory Lua VM in cache processes \(without privileged agent but with shdict\) - grep_error_log_out/, qr/\A\s*''\s+doesn't match/sm],
['v', '124-init-worker.t', qr/TEST 20: destory Lua VM in cache processes \(without privileged agent or shdict\) - grep_error_log_out/, qr/\A\s*''\s+doesn't match/sm],
['v', '152-timer-every.t', 'TEST 6: memory leak check - response_body - response is expected', qr/\+growth1 == growth2: false$/sm],
['v', '152-timer-every.t', qr/TEST 1: simple very - pattern ".*?elapsed:.*?" should match a line in error\.log/sm],
['v', '152-timer-every.t', 'TEST 3: lua variable sharing via upvalue - response_body - response is expected', qr/\+foo = 3$/sm],
['v', '152-timer-every.t', 'TEST 4: create the next timer immediately when timer start running - response_body - response is expected', qr/\+foo = 3$/sm],
[undef, '086-init-by.t', 'nginx: [error]', 'init_by_lua error: init_by_lua:2: failed to init'],
['l', undef, 'nginx: [error]', 'init_by_lua error: init_by_lua:2: failed to init'],
[undef, '142-ssl-session-store.t', 'nginx: [emerg]', '"ssl_session_store_by_lua_block" directive is not allowed here in '],
[undef, '146-malloc-trim.t', ' - grep_error_log_out', '+malloc_trim(1) returned 1', 'linux i386'],
['v', '146-malloc-trim.t', ' - grep_error_log_out', '+malloc_trim(1) returned 0'],
[undef, '146-malloc-trim.t', 'TEST 8: malloc_trim() every 1 req - grep_error_log_out', "got: 'malloc_trim(1) returned 1", 'linux i386'],
[undef, '146-malloc-trim.t', 'TEST 1: malloc_trim() every 1 req, in subreq - grep_error_log_out', "got: 'malloc_trim(1) returned 1", 'linux i386'],
[undef, '043-shdict.t', 'nginx: [emerg]', 'lua_shared_dict "dogs" is already defined as "dogs" in'],
[undef, '148-fake-shm-zone.t', 'nginx: [emerg]', 'lua_fake_shm "x1" is already defined as "x1" in'],
['h', '152-timer-every.t', qr/ - pattern .*?lua_max_running_timers are not enough"/],
['h', '145-shdict-list.t', 'response_body - response is expected'],
['h', '140-ssl-c-api.t', 'should match a line in error.log'],
['h', '139-ssl-cert-by.t', qr/nginx\.sock failed .*? No such file or directory/],
['h', '139-ssl-cert-by.t', qr/ - response_body - response is expected /, qr/\+failed to connect: no such file or directory/],
['h', '139-ssl-cert-by.t', qr/ should match a line in error\.log /],
['h', '139-ssl-cert-by.t', qr/ - grep_error_log_out /],
['h', '146-malloc-trim.t', qr/ - grep_error_log_out /],
['h', '146-malloc-trim.t', 'should not match any line in error.log but matches line'],
['h', '148-fake-shm-zone.t', ' - response_body - response is expected', qr/\+isold=true/],
['h', '058-tcp-socket.t', qr/TEST 53: tcp_nodelay off - pattern "\[error\]" should not match any line in error\.log but matches line .*? unexpected response for agentzh\.org/],
['h', '101-on-abort.t', ' should not match any line in error.log but matches line '],
['h', '142-ssl-session-store.t', ' should not match any line in error.log but matches line '],
['h', '143-ssl-session-fetch.t', ' should not match any line in error.log but matches line '],
['h', '139-ssl-cert-by.t', 'send() failed (111: Connection refused)'],
['hv', '146-malloc-trim.t', 'should not match any line in error.log but matches line '],
[undef, undef, qr/pattern "\[error\]" should not match any line in error.log but matches line ".*? wrong ident \d+ response for \w+\.org, expect \d+/],
['w', '056-flush.t', qr/TEST 1: flush wait - content - pattern "lua reuse free buf chain, but reallocate memory because 5 >= 0" should match a line in error\.log/],
['h', '056-flush.t', qr/TEST 1: flush wait - content - pattern "lua reuse free buf chain, but reallocate memory because 5 >= 0" should match a line in error\.log/],
['w', '041-header-filter.t', 'TEST 41: filter finalize - status code ok', qr/got: ''/],
['w', '041-header-filter.t', qr/TEST 41: filter finalize - response_body_like - response is expected/, qr/''/],
['r', '014-bugs.t', 'TEST 41: https proxy has no timeout protection for ssl handshake - status code ok', qr/got: '502'/],
['r', '014-bugs.t', 'TEST 41: https proxy has no timeout protection for ssl handshake - stap output expected', qr/\+write timer set: 0/],
['r', '014-bugs.t', qr/TEST 41: https proxy has no timeout protection for ssl handshake .*?peer closed connection in SSL handshake while SSL handshaking to upstream/],
['r', '014-bugs.t', qr/ignoring stale global SSL error \(SSL: error:\d+:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded/],
['w', '067-req-socket.t', qr/TEST 14: successful reread after reading timeout happens \(receive -> receive\) - response_body - response is expected/, undef, 'linux i386'],
['w', '067-req-socket.t', qr/TEST 15: successful reread after reading timeout happens \(receive -> receiveuntil\) - response_body - response is expected/, undef, 'linux i386'],
['w', '067-req-socket.t', qr/TEST 16: successful reread after reading timeout happens \(receiveuntil -> receive\) - response_body - response is expected/, undef, 'linux i386'],
['w', '014-bugs.t', qr/TEST 41: https proxy has no timeout protection for ssl handshake/],
['r', '129-ssl-socket.t', undef, qr/failed to do SSL handshake: handshake failed/],
['w', '005-exit.t', 'TEST 24: exit 444 in header filter - status code ok'],
['w', '005-exit.t', 'TEST 22: exit 201 in header filter - status code ok'],
['w', '005-exit.t', 'TEST 23: exit both in header filter and content handler - status code ok'],
['w', '005-exit.t', 'TEST 21: exit 403 in header filter - status code ok'],
['w', '005-exit.t', 'TEST 21: exit 403 in header filter - response_body_like - response is expected'],
['', '123-lua-path.t', 'TEST 1: LUA_PATH & LUA_CPATH env (code cache on)', qr{/lua-resty-core/lib/\?\.lua}],
['', '123-lua-path.t', 'TEST 2: LUA_PATH & LUA_CPATH env (code cache off)', qr{/lua-resty-core/lib/\?\.lua}],
['', '004-require.t', qr{TEST 3: expand default path \(after\) - response_body_like - response is expected \(/\S+/lua-resty-core/lib/\?\.lua},],
['', '025-codecache.t', 'nginx: [alert]'],
['', '023-rewrite/tcp-socket.t', 'TEST 8: resolver error (host not found) - response_body_like - response is expected', 'Operation timed out'],
[undef, '132-lua-blocks.t', 'nginx: [emerg]', qr/Lua code block missing the closing long bracket \"\]=*\]\" in|unexpected lua closing long-bracket in|"events" directive is not allowed here in/],
['v', '087-udp-socket.t', qr/TEST 13: .*? - response_body - response is expected/, qr/failed to connect to agentzh\.org: openresty\.org could not be resolved \(110: Operation timed out\)/],
['v', '025-codecache.t', 'should match a line in error.log'],
['v', '109-timer-hup.t', 'TEST 6: HUP reload should abort pending timers (coroutine + cosocket) - grep_error_log_out'],
['v', '109-timer-hup.t', 'TEST 7: HUP reload should abort pending timers (fuzz test) - grep_error_log_out'],
['v', '056-flush.t', qr/TEST 17: limit_rate - pattern .*? should match a line in error\.log/],
['', '056-flush.t', qr/TEST 1: flush wait - content - pattern "lua reuse free buf memory 13 >= 5" should match a line in error\.log/],
['w', '025-codecache.t', 'TEST 29: cosocket connection pool timeout (after Lua VM destroys) - pattern "lua tcp socket keepalive max idle timeout" should not match any line in error.log but matches line'],
['w', '025-codecache.t', 'TEST 24: lua_max_pending_timers - chained timers (non-zero delay) - not exceeding - pattern "decrementing the reference count for Lua VM: 3" should not match any line in error.log but matches line'],
['w', '025-codecache.t', qr/TEST 29: cosocket connection pool timeout \(after Lua VM destroys\) - pattern .*?lua tcp socket keepalive: free connection pool/],
['o', undef, 'should match a line in error.log'],
['o', undef, ' - grep_error_log_out'],
['r', '071-idle-socket.t', 'TEST 6: set keepalive when cosocket recv buffer has unread data'],
['r', '106-timer.t', 'should match a line in error.log'],
['', '058-tcp-socket.t', 'TEST 8: resolver error (host not found)'],
['', '058-tcp-socket.t', 'TEST 9: resolver error (timeout) - response_body_like - response is expected'],
['', '058-tcp-socket.t', qr/wrong ident \d+ response for blah-blah-not-found\.agentzh\.org/],
[undef, '126-shdict-frag.t', 'TEST 9: cannot merge in-used big slabs page (forward) - response_body - response is expected', undef, 'linux i386'],
[undef, '126-shdict-frag.t', 'TEST 9: cannot merge in-used big slabs page (forward) - stap output expected', undef, 'linux i386'],
[undef, '126-shdict-frag.t', 'TEST 7: merge big slabs (less than max slab size) backward - stap output expected', undef, 'linux i386'],
['v', '135-worker-id.t', 'TEST 2: worker id should be nil for non-worker processes - grep_error_log_out', 'got: ""'],
['v', '135-worker-id.t', 'TEST 2: worker id should be nil for non-worker processes - response_body - response is expected', 'got: "not ok: c=1\x{0a}"'],
['v', '023-rewrite/tcp-socket.t', 'TEST 9: resolver error (timeout) - response_body_like'],
['w', '023-rewrite/req-socket.t', 'TEST 7: Expect & 100 Continue'],
['w', '072-conditional-get.t', 'TEST 3: If-Unmodified-Since false'],
['w', '067-req-socket.t', 'TEST 7: Expect & 100 Continue'],
['w', '100-client-abort.t', 'TEST 27: ngx.say - pattern "say failed: nginx output filter error" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 28: ngx.print - pattern "print failed: nginx output filter error" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 31: ngx.eof - pattern "eof failed: nginx output filter error" should match a line in error.log'],
['w', '100-client-abort.t', 'TEST 31: ngx.eof - pattern "eof succeeded" should not match any line in error.log but matches line'],
['w', '020-subrequest.t', 'TEST 65: DELETE - stap output expected'],
['v', '062-count.t', 'should match a line in error.log'],
['v', '075-logby.t', 'should match a line in error.log'],
['v', '023-rewrite/sleep.t', qr/TEST 3: sleep 0\.5 in subrequestg? - response_body_like - response is expected/],
['v', '023-rewrite/sleep.t', 'TEST 1: sleep 0.5 - response_body_like - response is expected'],
['v', '023-rewrite/sleep.t', 'TEST 5: sleep 0.5 - multi-times - response_body_like'],
['v', '024-access/sleep.t', qr/TEST 3: sleep 0\.5 in subrequestg? - response_body_like - response is expected/],
['v', '024-access/sleep.t', 'TEST 1: sleep 0.5 - response_body_like - response is expected'],
['v', '033-ctx.t', 'pattern "ctx.foo = 32" should match a line in error.log'],
['v', '077-sleep.t', 'TEST 1: sleep 0.5 - content - response_body_like - response is expected'],
['v', '077-sleep.t', 'TEST 3: sleep 0.5 in subrequest - content - response_body_like - response is expected'],
['v', '018-ndk.t', 'should match a line in error.log'],
['v', '085-if.t', 'TEST 6: log_by_lua inherited by location if - pattern "from log by lua" should match a line in error.log'],
['v', '089-phase.t', 'TEST 8: get_phase in log_by_lua - pattern "log" should match a line in error.log'],
['v', '087-udp-socket.t', 'TEST 9: read timeout and resend - pattern "lua udp socket read timed out" should match a line in error.log'],
['v', '023-rewrite/client-abort.t', 'should match a line in error.log'],
['v', '023-rewrite/on-abort.t', 'should match a line in error.log'],
['v', '023-rewrite/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - status code ok'],
['v', '023-rewrite/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - response_body - response is expected'],
['v', '024-access/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - status code ok'],
['v', '024-access/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - response_body - response is expected'],
['v', '101-on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - status code ok'],
['v', '101-on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - response_body - response is expected'],
['v', '024-access/client-abort.t', 'should match a line in error.log'],
['v', '024-access/on-abort.t', 'should match a line in error.log'],
['v', '100-client-abort.t', 'should match a line in error.log'],
['v', '101-on-abort.t', 'should match a line in error.log'],
['v', '087-udp-socket.t', 'should match a line in error.log'],
['v', '106-timer.t', 'should match a line in error.log'],
['v', '107-timer-errors.t', 'should match a line in error.log'],
['v', '108-timer-safe.t', 'should match a line in error.log'],
['v', '109-timer-hup.t', 'should match a line in error.log'],
['v', '089-phase.t', 'should match a line in error.log'],
['v', '043-shdict.t', 'TEST 60: get_stale: expired entries can still be fetched - response_body - response is expected', undef, 'linux i386'],
['v', '067-req-socket.t', 'TEST 13: failing reread after reading timeout happens - response_body - response is expected'],
['v', '067-req-socket.t', 'TEST 14: successful reread after reading timeout happens (receive -> receive) - response_body - response is expected'],
['v', '067-req-socket.t', 'TEST 15: successful reread after reading timeout happens (receive -> receiveuntil) - response_body - response is expected'],
['v', '067-req-socket.t', 'TEST 16: successful reread after reading timeout happens (receiveuntil -> receive) - response_body - response is expected'],
['v', '124-init-worker.t', 'TEST 18: syslog error log - udp_query ok'],
['v', '141-luajit.t', 'TEST 1: avoid the data segment from growing on Linux - response_body - response is expected', 'got: "fail: p = 0x'],
['v', '142-ssl-session-store.t', qr/TEST 9: inter-operation with ssl_certificate_by_lua - pattern ".*?" should match a line in error\.log/],
['v', '143-ssl-session-fetch.t', 'TEST 2: sleep - grep_error_log_out'],
['h', '058-tcp-socket.t', qr/TEST 4: with resolver - pattern "\[error\]" should not match any line in error\.log but matches line .*? wrong ident \d+ response for/],
['h', '014-bugs.t', qr/wrong ident \d+ response for not-exist\.agentzh\.org, expect \d+/],
['h', '124-init-worker.t', 'TEST 18: syslog error log - udp_query ok'],
['h', '129-ssl-socket.t', 'should match a line in error.log'],
['h', '129-ssl-socket.t', qr/unix domain ssl cosocket .*? response is expected/, qr/failed to connect: no such file or directory/],
['h', '129-ssl-socket.t', qr/unix domain ssl cosocket .*? - grep_error_log_out/, qr/''/],
['h', '058-tcp-socket.t', 'TEST 6: connection timeout (tcp) - response_body - response is expected', qr/Operation timed out/],
['h', '058-tcp-socket.t', 'TEST 6: connection timeout (tcp) - pattern "lua tcp socket connect timed out" should match a line in error.log'],
['h', '091-coroutine.t', 'unexpected response for iscribblet.org"'],
['h', '143-ssl-session-fetch.t', ' - grep_error_log_out'],
['h', '143-ssl-session-fetch.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', '142-ssl-session-store.t', ' - grep_error_log_out'],
['h', '142-ssl-session-store.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', '142-ssl-session-store.t', 'should match a line in error.log'],
['hv', '129-ssl-socket.t', qr/unix domain ssl cosocket .*? should match a line in error\.log/],
['hv', '024-access/on-abort.t', 'should not match any line in error.log but matches line'],
#['', '023-rewrite/on-abort.t', 'TEST 10: ignore the client abort event in the user callback (uthread) - stap output expected'],
['wv', '023-rewrite/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - pattern "client prematurely closed connection" should not match any line in error.log but matches line'],
['wv', '024-access/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - pattern "client prematurely closed connection" should not match any line in error.log but matches line'],
['wv', '101-on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - pattern "client prematurely closed connection" should not match any line in error.log but matches line'],
['wv', '020-subrequest.t', 'TEST 54: forwarding in-file request bodies to multiple subrequests (exceeding client_body_buffer_size)'],
['rv', '116-raw-req-socket.t', qr/TEST 9: receive timeout - pattern "server: .*?" should match a line in error\.log/],
['rv', '020-subrequest.t', 'TEST 54: forwarding in-file request bodies to multiple subrequests (exceeding client_body_buffer_size)'],
['rv', '058-tcp-socket.t', 'TEST 40: successful reread after a read time out happen (receiveuntil -> receive) - response_body - response is expected'],
['rv', '058-tcp-socket.t', 'TEST 37: successful reread after a read time out happen (receive -> receive) - response_body - response is expected'],
['rv', '058-tcp-socket.t', 'TEST 39: successful reread after a read time out happen (receiveuntil -> receiveuntil) - response_body - response is expected'],
['rv', '058-tcp-socket.t', 'TEST 38: successful reread after a read time out happen (receive -> receiveuntil) - response_body - response is expected'],
['rv', '104-req-raw-header.t', 'TEST 27: two pipelined requests with large headers - response_body - response is expected'],
['rv', '104-req-raw-header.t', 'TEST 27: two pipelined requests with large headers - status code ok'],
['rv', '104-req-raw-header.t', 'ERROR: client socket timed out - TEST 27: two pipelined requests with large headers'],
['v', '065-tcp-socket-timeout.t', 'TEST 17: re-connect after timed out - response_body - response is expected'],
['v', '109-timer-hup.t', 'TEST 6: HUP reload should abort pending timers (fuzz test) - grep_error_log_out'],
['h', '129-ssl-socket.t', qr/TEST 24: lua_ssl_crl - pattern "lua ssl server name: "test\.com"" should match a line in error\.log/],
['h', '129-ssl-socket.t', 'TEST 24: lua_ssl_crl - response_body - response is expected', qr/failed to connect: no such file or directory/],
['h', '129-ssl-socket.t', 'TEST 23: unix domain ssl cosocket (no ssl on server) - pattern "(?-xism:SSL_do_handshake\(\) failed .*?unknown protocol)" should match a line in error.log (req 1)'],
['h', '117-raw-req-socket-timeout.t', qr/TEST 2: send timeout - pattern ".*?" should match a line in error\.log/],
['h', '065-tcp-socket-timeout.t', 'TEST 18: re-send on the same object after a send timeout happens - response_body - response is expected'],
['h', '065-tcp-socket-timeout.t', 'TEST 18: re-send on the same object after a send timeout happens - pattern "lua tcp socket write timed out" should match a line in error.log'],
['h', '108-timer-safe.t', qr/TEST 7: simple at \(sleep in the timer callback\) - log_by_lua - pattern .*? should match a line in error\.log/],
['h', '043-shdict.t', '- response_body'],
['h', '009-log.t', 'TEST 16: ngx.log() big data - pattern "(?-xism:ah{1970}b)" should match a line in error.log'],
['h', '023-rewrite/socket-keepalive.t', 'TEST 11: sanity (uds) - pattern "lua tcp socket keepalive: free connection pool for " should not match any line in error.log'],
['h', '023-rewrite/tcp-socket.t', qr{pattern "\[error\]" should not match any line in error\.log but matches line .*? wrong ident \d+ response for}],
['h', '068-socket-keepalive.t', qr/pattern ".*?" should not match any line in error\.log/],
['h', '068-socket-keepalive.t', qr/pattern ".*?" should match a line in error\.log/],
['h', '068-socket-keepalive.t', 'TEST 17: custom pools (same pool for the same path) - unix - response_body - response is expected'],
['h', '057-flush-timeout.t', 'TEST 1: flush wait - timeout'],
['h', '058-tcp-socket.t', 'unexpected response for blah-blah-not-found.agentzh.org'],
['h', '023-rewrite/tcp-socket.t', 'unexpected response for blah-blah-not-found.agentzh.org'],
['h', '023-rewrite/tcp-socket-timeout.t', 'TEST 15: sock:settimeout(-1) does not override lua_socket_send_timeout'],
['h', '023-rewrite/tcp-socket-timeout.t', 'TEST 11: lua_socket_send_timeout only'],
['h', '023-rewrite/tcp-socket-timeout.t', 'TEST 12: sock:settimeout() overrides lua_socket_send_timeout'],
['h', '023-rewrite/tcp-socket-timeout.t', 'TEST 14: sock:settimeout(0) does not override lua_socket_send_timeout'],
['h', '023-rewrite/tcp-socket-timeout.t', 'TEST 13: sock:settimeout(nil) does not override lua_socket_send_timeout'],
['h', '065-tcp-socket-timeout.t', 'TEST 11: lua_socket_send_timeout only'],
['h', '065-tcp-socket-timeout.t', 'TEST 12: sock:settimeout() overrides lua_socket_send_timeout'],
['h', '065-tcp-socket-timeout.t', 'TEST 13: sock:settimeout(nil) does not override lua_socket_send_timeout'],
['h', '065-tcp-socket-timeout.t', 'TEST 14: sock:settimeout(0) does not override lua_socket_send_timeout'],
['h', '065-tcp-socket-timeout.t', 'TEST 15: sock:settimeout(-1) does not override lua_socket_send_timeout'],
['h', '065-tcp-socket-timeout.t', 'TEST 16: exit in user thread (entry thread is still pending on tcpsock:send)'],
['h', '106-timer.t', qr/TEST 9: simple at \(sleep in the timer callback\) - log_by_lua - pattern .*? should match a line in error\.log/],
['h', '126-shdict-frag.t', 'TEST 4: merge one single-page block backward, but no more - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 3: merge 3 single-page free slabs (actively deleted, merge backward AND forward) - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 7: merge big slabs (less than max slab size) backward - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 9: cannot merge in-used big slabs page (forward) - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 1: merge 2 single-page free blocks (forcibly evicted, merge forward) - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 2: merge 2 single-page free slabs (forcibly evicted, merge backward) - response_body - response is expected'],
['h', '126-shdict-frag.t', 'TEST 5: merge one single-page block forward, but no more - response_body - response is expected'],
['h', '059-unix-socket.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', '140-ssl-c-api.t', ' - response_body - response is expected', '+failed to connect: no such file or directory'],
['h', '140-ssl-c-api.t', 'TEST 1: simple cert + private key - pattern "lua ssl server name: "test.com"" should match a line in error.log'],
['hv', '024-access/on-abort.t', 'TEST 8: ignore the client abort event in the user callback (no check) - pattern "main handler done" should not match any line in error.log but matches line'],
['rv', '104-req-raw-header.t', 'TEST 3: large header (no request line)'],
['rv', '104-req-raw-header.t', 'TEST 11: large header, pipelined'],
['rv', '104-req-raw-header.t', 'TEST 9: large header, with lots of leading CRLF, excluding request line'],
['rv', '104-req-raw-header.t', 'TEST 8: large header, with leading CRLF, excluding request line'],
['rv', '104-req-raw-header.t', 'TEST 7: large header, with leading CRLF'],
['rv', '104-req-raw-header.t', 'TEST 2: large header'],
['rv', '104-req-raw-header.t', 'TEST 13: large header, multi-line header'],
['rv', '104-req-raw-header.t', 'TEST 17: large header (POST body) - in subrequests'],
['rv', '104-req-raw-header.t', 'TEST 16: large header (POST body)'],
['r', '139-ssl-cert-by.t', qr/ - response_body - response is expected /, qr/\+failed to do SSL handshake: handshake failed/],
['r', '139-ssl-cert-by.t', qr/pattern ".*?" should match a line in error\.log/],
['r', '139-ssl-cert-by.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', '139-ssl-cert-by.t', qr/TEST 15: coroutine API - grep_error_log_out/],
['r', '139-ssl-cert-by.t', qr/TEST 16: simple user thread wait with yielding - grep_error_log_out/],
['r', '140-ssl-c-api.t', ' - response_body - response is expected ', '+failed to do SSL handshake: handshake failed'],
['r', '140-ssl-c-api.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', '140-ssl-c-api.t', qr/pattern ".*?" should match a line in error\.log/],
['v', '139-ssl-cert-by.t', qr/TEST 2: sleep - pattern "\(\?\^:elapsed in ssl cert by lua: .*?,\)" should match a line in error\.log/],
['r', '142-ssl-session-store.t', qr/ - response_body - response is expected /, qr/\+failed to do SSL handshake: handshake failed/],
['r', '142-ssl-session-store.t', qr/pattern ".*?" should match a line in error\.log/],
['r', '142-ssl-session-store.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', '143-ssl-session-fetch.t', qr/ - response_body - response is expected /, qr/\+failed to do SSL handshake: handshake failed/],
['r', '143-ssl-session-fetch.t', qr/pattern ".*?" should match a line in error\.log/],
['r', '143-ssl-session-fetch.t', qr/pattern "\[error\]" should not match any line in error\.log but matches line ".*? peer closed connection in SSL handshake/],
['r', '143-ssl-session-fetch.t', ' - grep_error_log_out'],
],
ngx_drizzle => [
['h', 'status.t', ' - response_body'],
],
ngx_headers_more => [
['rv', 'input.t', 'TEST 4: try to rewrite content length using the rewrite module'],
['rv', 'input.t', qr/Looks like you planned \d+ tests but ran \d+\./],
['o', 'unused.t', 'should match a line in error.log'],
['hv', 'unused.t', 'TEST 3: unused output filter (with more_set_input_headers only) - pattern "headers more header filter" should not match any line in error.log but matches line'],
['hv', 'unused.t', 'TEST 2: unused output filter (none) - pattern "headers more header filter" should not match any line in error.log but matches line'],
['h', 'unused.t', 'TEST 3: unused output filter (with more_set_input_headers only) - pattern "headers more header filter" should not match any line in error.log but matches line'],
['h', 'unused.t', 'TEST 2: unused output filter (none) - pattern "headers more header filter" should not match any line in error.log but matches line'],
],
ngx_echo => [
['o', undef, 'should match a line in error.log'],
['r', 'echo-timer.t'],
['rv', 'request-body.t', 'TEST 1: big client body buffered into temp files'],
['rv', 'request-body.t', 'ERROR: client socket timed out - TEST 3: big client body buffered into temp files (trailing echo)'],
['rv', 'request-body.t', 'TEST 3: big client body buffered into temp files (trailing echo) - status code ok'],
['rv', 'request-body.t', 'TEST 3: big client body buffered into temp files (trailing echo) - response_body - response is expected'],
['rv', 'request-body.t', 'Looks like you planned 4 tests but ran 6.'],
['rv', 'request-info.t', 'TEST 12: large header'],
['rv', 'request-info.t', 'TEST 14: large header, with leading CRLF'],
['rv', 'request-info.t', 'TEST 16: large header, pipelined'],
['rv', 'request-info.t', 'TEST 18: large header, multi-line header'],
['rv', 'request-info.t', 'TEST 21: large header (POST body)'],
['rv', 'request-info.t', 'TEST 22: large header (POST body) - in subrequests'],
['rv', 'request-info.t', 'ERROR: client socket timed out - TEST 31: two pipelined requests with large headers'],
['rv', 'request-info.t', 'TEST 31: two pipelined requests with large headers - status code ok'],
['rv', 'request-info.t', 'TEST 31: two pipelined requests with large headers - response_body - response is expected'],
['v', 'echo-timer.t', 'TEST 1: timer without explicit reset - response_body_like - response is expected'],
['v', 'echo-timer.t', 'TEST 2: timer without explicit reset and sleep - response_body_like - response is expected'],
['v', 'echo-timer.t', 'TEST 3: timing accumulated sleeps - response_body_like - response is expected'],
['v', 'echo-timer.t', 'TEST 4: timer with explicit reset but without sleep - response_body_like - response is expected'],
['v', 'echo-timer.t', 'TEST 5: reset timer between sleeps - response_body_like - response is expected'],
['v', 'echo-timer.t', 'TEST 6: reset timer between blocking sleeps - response_body_like - response is expected'],
['v', 'location-async.t', 'TEST 6: timed multiple subrequests (blocking sleep) - response_body_like - response is expected'],
['v', 'location-async.t', 'TEST 7: timed multiple subrequests (non-blocking sleep) - response_body_like - response is expected'],
['v', 'location.t', 'TEST 8: timed multiple subrequests (non-blocking sleep) - response_body_like - response is expected'],
['v', 'location.t', 'TEST 7: timed multiple subrequests (blocking sleep) - response_body_like - response is expected'],
['v', 'subrequest-async.t', 'TEST 8: timed multiple subrequests (non-blocking sleep) - response_body_like - response is expected'],
['v', 'subrequest-async.t', 'TEST 7: timed multiple subrequests (blocking sleep) - response_body_like - response is expected'],
['v', 'subrequest.t', 'TEST 6: timed multiple subrequests (blocking sleep) - response_body_like - response is expected'],
['v', 'subrequest.t', 'TEST 7: timed multiple subrequests (non-blocking sleep) - response_body_like - response is expected'],
['r', 'request-info.t', 'TEST 18: large header, multi-line header'],
],
);
my $failure;
my $in_failure;
my $in_valgrind_warning;
my $rec;
my $date;
my $arch;
my @records;
my $test_name;
my $leak_test_samples;
my $luajit_rev;
my $luajit_ver;
my $making_luajit;
my $openssl_ver;
while (<>) {
if ($in_valgrind_warning) {
if (/^\}$/) {
undef $in_valgrind_warning;
$failure->{details} .= $_;
next;
} elsif (/^(?:\{|\s+|==\d+== )/) {
$failure->{details} .= $_;
next;
} else {
undef $in_valgrind_warning;
}
}
if ($in_failure && !/^\# /) {
undef $in_failure;
}
if ($making_luajit && /Updating [a-f0-9]+\.\.([a-f0-9]+)/) {
$luajit_rev = $1;
}
if ($making_luajit && !defined $luajit_rev && /HEAD is now at ([a-f0-9]+)/) {
$luajit_rev = $1;
}
if (!defined $luajit_ver && m/=== Installing LuaJIT (\d+\S+)/) {
$luajit_ver = $1;
}
if (!defined $openssl_ver && /^built with OpenSSL (\d+\.\d+\.\d+.*)/) {
#die "found openssl $1";
$openssl_ver = $1;;
}
if (!defined $date && /^(?:DATE )?(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})$/) {
$date = $1;
next;
}
if (!defined $arch) {
if (/^(?:ARCH )?Linux .*\bi386\b/) {
$arch = 'linux i386';
warn "$arch\n";
} elsif (/^(?:ARCH )?Linux .*\bx86_64\b/) {
$arch = 'linux x86_64';
warn "$arch\n";
}
}
if (/^making (\S+) \.\.\.$/) {
my $subj = $1;
if ($subj =~ /^luajit/) {
$making_luajit = 1;
} else {
undef $making_luajit;
}
if ($subj =~ /^t([rvwhlo]*)-(resty-cli|sregex|(?:ngx_|lua-)[-_A-Za-z0-9]+)$/) {
my ($mode, $module) = ($1, $2);
print "t$mode-$module\t";
if ($rec) {
if (!$rec->{commit}) {
my $line = $rec->{line};
die "line $line: No git commit found.\n";
}
my $n = @{ $rec->{failures} };
if ($n >= 2) {
my $a = $rec->{failures}[$n - 1];
my $b = $rec->{failures}[$n - 2];
if (((!defined $a->{file} && !defined $b->{file}) || $a->{file} eq $b->{file})
&& ((!defined $a->{name} && !defined $b->{name}) || $a->{name} eq $b->{name})
&& ((!defined $a->{details} && !defined $b->{details})
|| $a->{details} eq $b->{details}))
{
#warn "remove duplicate test failures";
pop @{ $rec->{failures} };
}
}
#@{ $rec->{failures} } = uniq @{ $rec->{failures} };
}
$rec = {
module => $module,
mode => $mode,
line => $.,
tests_pass => 0,
valgrind_pass => 1,
failures => [],
valgrind_warnings => [],
warns => [],
comp_errors => [],
luajit_ver => $luajit_ver,
luajit_rev => $luajit_rev,
openssl_ver => $openssl_ver,
};
undef $openssl_ver;
push @records, $rec;
} else {
#warn "ignoring $subj\n";
undef $rec;
}
} elsif ($rec && !defined $rec->{commit} && /^commit ([0-9a-f]+)$/) {
$rec->{commit} = $1;
} elsif ($rec && defined $rec->{commit} && !defined $rec->{commit_date}
&& /Date:\s+([A-Z][a-z]{2} [A-Z][a-z]{2} \d+ .*)/)
{
$rec->{commit_date} = str2time($1);
} elsif ($rec && !defined $rec->{nginx_version} && m{^nginx version: (.*)}) {
(my $ver = $1) =~ s/without pool/no pool/;
$rec->{nginx_version} = $ver;
} elsif ($rec && m{^(nginx: \[(?:emerg|alert|error)\]) (.*)}) {
my ($name, $details) = ($1, $2);
if ($name eq 'nginx: [alert]' && $details =~ /lua_code_cache is off/) {
next;
}
$failure = {
name => $name,
details => $details,
};
push @{ $rec->{failures} }, $failure;
} elsif ($rec && m{^\./configure: error: (.+)}) {
$rec->{config_error} = $1;
} elsif ($rec && m{^/home/\S+?\w+\.c:\d+:\d+: error: .*}) {
push @{ $rec->{comp_errors} }, $&;
} elsif ($rec && m{^sh: -c: line \d+: .*error}) {
push @{ $rec->{comp_errors} }, $&;
} elsif ($rec && /\bWARNING: (.+)/) {
my $warning = $1;
#warn "Found warning: $1\n";
if (@{ $rec->{warns} } && $rec->{warns}[-1] eq $warning) {
next;
}
push @{ $rec->{warns} }, $warning;
} elsif ($rec && m{\./util/build2?\.sh (\d+\.\d+\.\d+)\b}) {
$rec->{nginx_version} = "nginx/$1 (no pool)";
} elsif ($rec && $rec->{mode} !~ /l/ && /^All tests successful/) {
$rec->{tests_pass} = 1;
} elsif ($rec && $rec->{mode} =~ /l/ && /LeakTest: \[(.*?)\]/) {
$leak_test_samples = $1;
} elsif ($rec && $rec->{mode} =~ /l/ && /LeakTest: k=(\d+(?:\.\d+)?)/) {
my $k = $1;
if ($k >= 10) {
$leak_test_samples ||= '';
my @samples = split /\s+/, $leak_test_samples;
my $up_edges = get_up_edges(\@samples);
my $stable = get_stable_point(\@samples);
$failure = {
name => $test_name,
details => "${_}Up-Edges: $up_edges\n"
. "Stable point: ". ($stable || "N/A") . "\n\n"
. "RSS Samples (in KB):\n$leak_test_samples",
chart => gen_chart_uri($leak_test_samples),
stable => $stable,
up_edges => $up_edges,
};
push @{ $rec->{failures} }, $failure;
}
} elsif ($rec && /^(Bailout called\.\s*)(.*)/) {
$failure = {
name => $1,
details => $2,
};
push @{ $rec->{failures} }, $failure;
} elsif ($rec && /\# Looks like you planned \d+ tests? but ran \d+\./) {
$failure = {
name => $&,
details => '',
};
push @{ $rec->{failures} }, $failure;
} elsif ($rec && /^Files=(\d+),\s+Tests=(\d+),\s+(\d+)\s+wallclock secs/) {
$rec->{files} = $1;
$rec->{tests} = $2;
$rec->{secs} = $3;
} elsif (/^TEST \d+: .*/) {
$test_name = $&;
} elsif ($rec && $rec->{mode} =~ /v/ && /^==\d+==\s+/) {
$failure = {
name => $test_name,
details => $_,
};
push @{ $rec->{failures} }, $failure;
#warn "Found valgrind warning: $&\n";
$in_valgrind_warning = 1;
$rec->{valgrind_pass} = 0;
} elsif ($rec && ($rec->{mode} !~ /l/ || /the nginx process \d+ is gone/) && /^\#\s+Failed test '(.*?)'?$/) {
my $name = $1;
#warn "$rec->{module}: $rec->{mode}: $name\n";
$failure = {
name => $name,
};
push @{ $rec->{failures} }, $failure;
$in_failure = 1;
} elsif ($rec && $rec->{mode} !~ /l/ && $in_failure && /^\# (.*)/) {
my $s = $1;
if ($s =~ /^\s*at .*?\w+\.pm line \d+\.$/
|| $s =~ /^\s*Looks like you failed \d+ tests of \d+\.\s*$/)
{
next;
}
$failure->{details} .= "$s\n";
} elsif ($rec && m{^t/(\S+\.t) \.+ }) {
my $file = $1;
#warn "file $file\n";
my $failures = $rec->{failures};
my $i = @$failures - 1;
while ($i >= 0) {
my $f = $failures->[$i];
if (defined $f->{file}) {
last;
}
$f->{file} = $file;
$i--;
}
}
}
for my $rec (@records) {
my $mode = $rec->{mode};
my $module = $rec->{module};
if ($verbose) {
print $mode, ": ", $module, ": ";
}
if ($rec->{comp_errors}) {
@{ $rec->{comp_errors} } = uniq @{ $rec->{comp_errors} };
}
if (($rec->{tests_pass} && $rec->{valgrind_pass})
|| ($rec->{mode} =~ /l/ && !@{ $rec->{failures} }))
{
if ($verbose) {
print "\e[32mPASS\e[39m\n";
}
$rec->{result} = 'PASS';
$rec->{true_fails} = [];
$rec->{expected_fails} = [];
} else {
my (@fails, @expected_fails);
my $specs = $white_list{$module};
if ($specs) {
for my $f (@{ $rec->{failures} }) {
my $expected;
for my $spec (@$specs) {
if (!defined $spec->[0] || $mode =~ /$spec->[0]/) {
#warn "mode $mode matched $spec->[0]";
my $file = $spec->[1];
if (defined $file) {
if (defined $f->{file} && $f->{file} eq $file) {
#warn "Hit $file!";
my $test = $spec->[2];
if (defined $test) {
if ($f->{name} =~ /(?:$test)|\Q$test\E/) {
#warn "Matched \"$f->{name}\" with \"$test\"";
my $details = $spec->[3];
if (defined $details) {
if ($f->{details} && ($f->{details} =~ m/\Q$details\E/ || (ref $details && $f->{details} =~ m/$details/))) {
if (defined $spec->[4]) {
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
} else {
if (defined $spec->[4]) {
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
}
} else {
#warn "Matched mode $spec->[0] and file $spec->[1]";
if (defined $spec->[4]) { # filter by arch
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
}
} else {
#warn "Matched mode $spec->[0]";
my $test = $spec->[2];
if (defined $test) {
if ($f->{name} =~ /(?:$test)|\Q$test\E/) {
#warn "Matched \"$f->{name}\" with \"$test\"";
my $details = $spec->[3];
if (defined $details) {
if ($f->{details} && ($f->{details} =~ m/\Q$details\E/ || $f->{details} =~ m/$details/)) {
if (defined $spec->[4]) {
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
} else {
if (defined $spec->[4]) { # filter by arch
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
}
} else {
#warn "Matched mode $spec->[0] and file $spec->[1]";
if (defined $spec->[4]) { # filter by arch
if ($arch eq $spec->[4]) {
$expected = 1;
last;
}
} else {
$expected = 1;
last;
}
}
}
}
}
if ($expected) {
if (@expected_fails) {
my $last = $expected_fails[-1];
if ((!defined $last->{file} || $last->{file} eq $f->{file})
&& $last->{name} eq $f->{name}
&& ((!defined $last->{details} && !defined $f->{details})
|| $last->{details} eq $f->{details}))
{
pop @expected_fails;
}
}
push @expected_fails, $f;
} else {
push @fails, $f;
}
}
} else {
@fails = @{ $rec->{failures} };
}
if ($rec->{mode} =~ /l/) {
my @fails2;
for my $fail (@fails) {
if ($fail->{stable}
|| (defined $fail->{up_edges} && $fail->{up_edges} < 10))
{
push @expected_fails, $fail;
} else {
push @fails2, $fail;
}
}
@fails = @fails2;
}
$rec->{true_fails} = \@fails;
$rec->{expected_fails} = \@expected_fails;
delete $rec->{failures};
if (!@fails && $rec->{tests}) {
if ($verbose) {
print "\e[33mPASS\e[39m\n";
}
$rec->{result} = '~PASS';
} else {
if ($verbose) {
print "\e[31mFAIL\e[39m\n";
}
$rec->{result} = 'FAIL';
if (@fails && ($module ne 'ngx_postgres' || $mode !~ /w/)) {
if ($verbose) {
print join("\n", map { "@$_" } @fails), "\n";
}
}
}
}
if (@{ $rec->{valgrind_warnings} }) {
#print @{ $rec->{valgrind_warnings} };
}
}
my $json_xs = JSON::XS->new->ascii->pretty;
my $res = {
arch => $arch,
date => $date,
records => \@records,
};
open my $out, ">$outfile" or
die "Cannot open $outfile for writing: $!\n";
print $out $json_xs->encode($res);
close $out;
sub usage {
die "Usage: $0 [-v] -o <outfile> <infile>\n";
}
sub gen_chart_uri {
my $samples = shift;
if (!$samples) {
return undef;
}
my @ys = split /\s+/, $samples;
my $max = max @ys;
@ys = map { sprintf "%.0f", ($_ * 100 / $max) } @ys;
my $ys = join ",", @ys;
return "https://chart.googleapis.com/chart?cht=lc&chd=t:$ys&chs=200x80&chco=3072F3"
}
sub get_stable_point {
my $samples = shift;
my $n = @$samples;
if (!$n) {
return undef;
}
my $m = int (($n - 1) * 0.65);
if ($m < 0) {
$m = 0;
}
my $p;
for (my $i = $m; $i < $n; $i++) {
if (!defined $p) {
$p = $samples->[$i];
} else {
if ($p == $samples->[$i]) {
next;
}
return undef;
}
}
return $p;
}
sub get_up_edges {
my $samples = shift;
if (!@$samples) {
return 0;
}
my @ys = @$samples;
my $a = shift @ys;
my $edges = 0;
while (@ys) {
my $b = shift @ys;
my $diff = $b - $a;
if ($diff > 0) {
$edges++;
} elsif ($diff < 0) {
$edges--;
}
$a = $b;
}
return $edges;
}
print "\n";
You can’t perform that action at this time.