Condition Coverage

blib/lib/Test/Nginx/Socket.pm
Criterion Covered Total %
condition 25 220 11.3


and 3 conditions

line !l l&&!r l&&r condition
262 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:/
310 0 0 0 lc $key eq 'transfer-encoding' and $val eq 'chunked'
335 1 0 1 ref $block->raw_request and ref $block->raw_request eq 'ARRAY'
534 16 0 4 ref $filter and ref $filter eq 'CODE'
595 0 0 0 $Test::Nginx::Socket::Benchmark and not defined $block->no_check_leak
617 0 0 0 $Test::Nginx::Socket::CheckLeak and not defined $block->no_check_leak
639 0 0 0 $PrevNginxPid and $ngx_pid
654 0 0 0 $? != 0 and not &is_running($ngx_pid)
843 0 0 0 $fname and $fname eq '/dev/stdout' || $fname eq '/dev/stderr'
908 0 0 6 ref $value and ref $value eq 'ARRAY'
916 9 0 1 ref $value and ref $value eq 'ARRAY'
1074 0 0 0 ref $pat and $line =~ /$pat/
1109 0 0 0 ref $grep_pats and ref $grep_pats eq 'ARRAY'
1125 0 0 0 ref $expected and ref $expected eq 'ARRAY'
1137 0 0 0 ref $grep_pat and $line =~ /$grep_pat/
1199 0 0 0 ref $pat and $line =~ /$pat/
1262 0 0 0 ref $pat and $line =~ /$pat/
1302 0 0 0 $check_write_guard_message and not $dry_run
1313 0 0 0 $check_alert_message and not $dry_run
1324 0 0 0 $check_crit_message and not $dry_run
1335 0 0 0 $check_emerg_message and not $dry_run
1402 0 0 0 ref $pat and $line =~ /$pat/
1439 0 0 0 ref $pat and $line =~ /$pat/
1526 0 0 15 ref $filter and ref $filter eq 'ARRAY'
1667 0 16 0 $code and not $code =~ /^\d+$/
1672 0 16 0 $code and $code == 304 || $code == 101
1676 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
1919 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
2331 0 0 0 $http_ver eq '1.1' and $meth eq 'GET'
2360 0 0 0 $prog eq 'ab' and $h =~ /^\s*Content-Type\s*:\s*(.*\S)/i

or 2 conditions

line l !l condition
370 0 7 $block->more_headers || ''
838 0 0 $reason ||= 'env TEST_NGINX_USE_STAP is not set'
891 0 0 $out || ''
896 0 0 $out || ''
938 0 0 $res && $res->code || ''
943 0 0 $res && $res->code || ''
948 0 0 $res && $res->code || ''
1784 0 0 $err // ''
1829 0 0 $tries ||= 1
2300 0 0 $nreqs ||= 100000000
2301 0 0 $concur ||= 2

or 3 conditions

line l !l&&r !l&&!r condition
374 0 0 1 not ref $reqs or ref $reqs ne 'ARRAY'
787 0 0 0 $n or $req_idx < @$r_req_list - 1
843 0 0 0 $fname eq '/dev/stdout' || $fname eq '/dev/stderr'
845 0 0 0 $reason ||= "TEST_NGINX_TAP_OUT is set to $fname"
1034 0 0 0 not ref $val or ref $val eq 'Regexp'
1070 0 0 0 $lines ||= &access_log_data()
1074 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1133 0 0 0 $lines ||= &error_log_data()
1137 0 0 0 ref $grep_pat and $line =~ /$grep_pat/ or $line =~ /\Q$grep_pat\E/
1194 0 0 0 $lines ||= &error_log_data()
1199 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1256 0 0 0 $lines ||= &error_log_data()
1262 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1303 0 0 0 $lines ||= &error_log_data()
1314 0 0 0 $lines ||= &error_log_data()
1325 0 0 0 $lines ||= &error_log_data()
1336 0 0 0 $lines ||= &error_log_data()
1396 0 0 0 $lines ||= &error_log_data()
1402 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1433 0 0 0 $lines ||= &error_log_data()
1439 0 0 0 ref $pat and $line =~ /$pat/ or $line =~ /\Q$pat\E/
1544 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
1575 0 0 9 not defined $expected or ref $expected
1672 0 0 16 $code == 304 || $code == 101
1932 0 0 0 defined $new_err or defined $new_readable
0 0 0 defined $new_err or defined $new_readable or defined $new_writable
2235 0 0 0 /^Connection\s*:/i || /^Host: \Q$Test::Nginx::Socket::ServerName\E$/i || /^Content-Length\s*:/i
2346 0 0 0 /^Connection\s*:/i || /^Host: \Q$Test::Nginx::Socket::ServerName\E$/i || /^Content-Length\s*:/i
2371 0 0 0 $req =~ /\G.+/cgs or $meth eq 'POST'
0 0 0 $req =~ /\G.+/cgs or $meth eq 'POST' or $meth eq 'PUT'