Condition Coverage

blib/lib/Test/Nginx/Socket.pm
Criterion Covered Total %
condition 25 185 13.5


and 3 conditions

line !l l&&!r l&&r condition
257 0 0 14 not $is_chunked and defined $parsed_req->{'content'}
0 11 3 not $is_chunked and defined $parsed_req->{'content'} and $parsed_req->{'content'} ne ''
11 0 3 not $is_chunked and defined $parsed_req->{'content'} and $parsed_req->{'content'} ne '' and not $more_headers =~ /(?:^|\n)Content-Length:/
305 0 0 0 lc $key eq 'transfer-encoding' and $val eq 'chunked'
330 1 0 1 ref $block->raw_request and ref $block->raw_request eq 'ARRAY'
529 16 0 4 ref $filter and ref $filter eq 'CODE'
590 0 0 0 $Test::Nginx::Socket::Benchmark and not defined $block->no_check_leak
612 0 0 0 $Test::Nginx::Socket::CheckLeak and not defined $block->no_check_leak
634 0 0 0 $PrevNginxPid and $ngx_pid
649 0 0 0 $? != 0 and not &is_running($ngx_pid)
830 0 0 0 $fname and $fname eq '/dev/stdout' || $fname eq '/dev/stderr'
895 0 0 6 ref $value and ref $value eq 'ARRAY'
903 9 0 1 ref $value and ref $value eq 'ARRAY'
1048 0 0 0 ref $grep_pats and ref $grep_pats eq 'ARRAY'
1064 0 0 0 ref $expected and ref $expected eq 'ARRAY'
1076 0 0 0 ref $grep_pat and $line =~ /$grep_pat/
1132 0 0 0 ref $pat and $line =~ /$pat/
1188 0 0 0 ref $pat and $line =~ /$pat/
1219 0 0 0 $check_alert_message and not $dry_run
1230 0 0 0 $check_crit_message and not $dry_run
1241 0 0 0 $check_emerg_message and not $dry_run
1319 0 0 15 ref $filter and ref $filter eq 'ARRAY'
1460 0 16 0 $code and not $code =~ /^\d+$/
1465 0 16 0 $code and $code == 304 || $code == 101
1469 16 0 0 defined $enc and $enc eq 'chunked'
0 0 16 defined $len and $len ne ''
0 0 16 defined $len and $len ne '' and $len >= 0
1672 0 0 0 $readable_hdls->count == 0 and $writable_hdls->count == 0
0 0 0 $readable_hdls->count == 0 and $writable_hdls->count == 0 and $err_hdls->count == 0
2049 0 0 0 $http_ver eq '1.1' and $meth eq 'GET'
2078 0 0 0 $prog eq 'ab' and $h =~ /^\s*Content-Type\s*:\s*(.*\S)/i

or 2 conditions

line l !l condition
365 0 7 $block->more_headers || ''
825 0 0 $reason ||= 'env TEST_NGINX_USE_STAP is not set'
878 0 0 $out || ''
883 0 0 $out || ''
925 0 0 $res && $res->code || ''
930 0 0 $res && $res->code || ''
935 0 0 $res && $res->code || ''
1586 0 0 $tries ||= 1
2018 0 0 $nreqs ||= 100000
2019 0 0 $concur ||= 2

or 3 conditions

line l !l&&r !l&&!r condition
369 0 0 1 not ref $reqs or ref $reqs ne 'ARRAY'
782 0 0 0 $n or $req_idx < @$r_req_list - 1
830 0 0 0 $fname eq '/dev/stdout' || $fname eq '/dev/stderr'
832 0 0 0 $reason ||= "TEST_NGINX_TAP_OUT is set to $fname"
1021 0 0 0 not ref $val or ref $val eq 'Regexp'
1072 0 0 0 $lines ||= &error_log_data()
1076 0 0 0 ref $grep_pat and $line =~ /$grep_pat/ or $line =~ /\Q$grep_pat\E/
1127 0 0 0 $lines ||= &error_log_data()
1132 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1183 0 0 0 $lines ||= &error_log_data()
1188 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1220 0 0 0 $lines ||= &error_log_data()
1231 0 0 0 $lines ||= &error_log_data()
1242 0 0 0 $lines ||= &error_log_data()
1337 9 0 7 defined $block->response_body or defined $block->response_body_eval
7 0 0 defined $block->response_body_like or defined $block->response_body_unlike
1368 0 0 9 not defined $expected or ref $expected
1465 0 0 16 $code == 304 || $code == 101
1685 0 0 0 defined $new_err or defined $new_readable
0 0 0 defined $new_err or defined $new_readable or defined $new_writable
1977 0 0 0 /^Connection\s*:/i || /^Host: \Q$Test::Nginx::Socket::ServerName\E$/i || /^Content-Length\s*:/i
2064 0 0 0 /^Connection\s*:/i || /^Host: \Q$Test::Nginx::Socket::ServerName\E$/i || /^Content-Length\s*:/i
2089 0 0 0 $req =~ /\G.+/cgs or $meth eq 'POST'
0 0 0 $req =~ /\G.+/cgs or $meth eq 'POST' or $meth eq 'PUT'