Condition Coverage

blib/lib/Net/OpenSSH.pm
Criterion Covered Total %
condition 80 433 18.4


and 2 conditions

line l !l condition
151 42 24 defined $_ and return $_

and 3 conditions

line !l l&&!r l&&r condition
126 3 0 0 $debug and $debug & 1
237 3 0 0 not defined $opts{'host'} and defined $external_master
281 3 0 0 $forward_agent and $passphrase
318 3 0 0 defined $default_ssh_opts and not ref $default_ssh_opts
3 0 0 defined $default_ssh_opts and not ref $default_ssh_opts and $default_ssh_opts =~ /^-\w\s+\S/
477 0 2 0 defined $sizeof_sun_path and length $ctl_path > $sizeof_sun_path
483 2 0 0 $debug and $debug & 2
485 2 0 0 $strict_mode and not $self->_is_secure_path($ctl_dir)
530 0 17 0 ref $self and $self->{'_expand_vars'}
554 0 0 0 $debug and $debug & 2
558 0 0 0 $debug and $debug & 2
559 0 0 0 $uid == $> || $uid == 0 and ($mode & 18) == 0 || $mode & 512
560 0 0 0 defined $home and $home eq $dir
586 0 0 0 $debug and $debug & 4
591 2 0 0 $debug and $debug & 4
596 0 0 0 $debug and $debug & 4
614 2 0 0 $debug and $debug & 8
636 0 0 0 $debug and $debug & 8
662 0 0 0 $debug and $debug & 8
685 0 0 0 $debug and $debug & 8
705 2 0 0 defined $h and $h ne "IGNORE"
712 0 0 0 $debug and $debug & 32
725 0 0 0 $debug and $debug & 32
729 0 0 0 $debug and $debug & 32
730 0 0 0 $deceased < 0 and $! == 10
733 0 0 0 $debug and $debug & 32
744 0 0 0 $debug and $debug & 32
791 3 0 1 $pid and $self->{'_perl_pid'} == $$
3 0 1 $pid and $self->{'_perl_pid'} == $$ and $self->{'_thread_generation'} == $thread_generation
800 0 0 0 not $async and $self->{'_master_state'} == "_STATE_RUNNING"
0 0 0 not $async and $self->{'_master_state'} == "_STATE_RUNNING" and $send_ctl || $self->_my_master_pid
805 0 0 0 $debug and $debug & 32
814 0 0 6 defined $fn and $fn >= 0
846 0 0 2 defined $timeout and $self->{'_kill_ssh_on_timeout'}
860 0 0 0 $debug and $debug & 16
868 0 0 0 $debug and $debug & 16
877 2 0 0 $debug and $debug & 16
998 1 0 0 $debug and $debug & 512
1064 2 0 0 $debug and $debug & 4
1065 2 0 0 $state == $self->{'_master_state'} and $state != "_STATE_KILLING"
2 0 0 $state == $self->{'_master_state'} and $state != "_STATE_KILLING" and $state != "_STATE_GONE"
1080 1 0 0 $deceased < 0 and $! == 10
1081 0 0 0 $debug and $debug & 4
1092 0 0 0 $debug and $debug & 4
1098 0 0 0 $self->_master_jump_state(4, $async) && $self->_master_check($async)
1132 1 0 0 $self->{'_master_setpgrp'} and not $async
1 0 0 $self->{'_master_setpgrp'} and not $async and not $self->{'_batch_mode'}
0 0 0 $self->{'_master_setpgrp'} and not $async and not $self->{'_batch_mode'} and not $self->{'_external_master'}
1147 1 0 0 $mpty and $self->{'_master_state'} == 2 || $self->{'_master_state'} == 3
1163 0 0 0 $debug and $debug & 4
1166 17 0 0 $debug and $debug & 4
1168 0 17 0 defined $timeout and time - $start_time > $timeout
1174 16 0 0 $deceased < 0 and $! == 10
1182 16 0 0 $self->{'_login_handler'} and $self->{'_master_state'} == "_STATE_LOGIN"
1224 0 0 0 length $passwd_prompt and $self->{'_wfm_bout'} =~ /^(.*$passwd_prompt)\s*$/s
1226 0 0 0 $debug and $debug & 4
1233 0 0 0 $debug and $debug & 4
1246 0 0 0 $debug and $debug & 4
1305 0 3 0 ref $self and !defined($remote_shell) || $remote_shell eq $self->{'_remote_shell'}
1330 0 0 0 ref $_ eq "REF" and ref $$_ eq "SCALAR"
1348 0 0 0 $opts->{'stdout_discard'} and $opts->{'stderr_discard'} || $opts->{'stderr_to_stdout'}
1415 0 0 0 $debug and $debug & 16
1420 0 0 0 $debug and $debug & 16
1504 0 3 0 not defined $opts{'quote_args_extended'} and $cmd eq "ssh"
1540 3 0 0 $stdout_pty and not $stdin_pty
1648 3 0 0 $debug and $debug & 16
1710 0 0 0 $debug and $debug & 16
1731 0 0 0 $debug and $debug & 16
1743 3 2 0 defined $encoding and $encoding ne "bytes"
1758 0 0 0 defined $enc and @_
1810 2 0 0 $cin and not $has_input
0 2 0 not $cin and $has_input
1819 2 0 0 $enc and @data
1831 2 0 0 $debug and $debug & 64
1855 4 0 0 $debug and $debug & 64
1861 0 0 4 $cout and vec $rv1, $fnoout, 1
1864 4 0 0 $debug and $debug & 64
1866 0 0 0 $read and $debug & 128
1874 4 0 0 $cerr and vec $rv1, $fnoerr, 1
1876 0 0 0 $debug and $debug & 64
1883 4 0 0 $cin and vec $wv1, $fnoin, 1
1885 0 0 0 $debug and $debug & 64
1887 0 0 0 $written and $debug & 128
1893 0 0 0 defined $data[0] and length $data[0]
1907 0 0 0 $n < 0 and grep(($! == $_), @retriable)
1915 2 0 0 $cin and not $keep_in_open
1924 2 0 0 $debug and $debug & 64
2064 0 0 0 $stdin_keep_open and not defined $stdin_data
2126 0 0 0 $stdin_keep_open and not defined $stdin_data
2159 0 0 0 $stdin_keep_open and not defined $stdin_data
2410 0 0 0 $self->{'_error'} == 5 and $?
2437 0 0 0 defined $fs_encoding and $fs_encoding eq "bytes"
2496 0 0 0 defined $hostname && length $hostname
2520 1 0 0 $debug and $debug & 2

or 2 conditions

line l !l condition
120 1 2 shift() || 0
717 0 0 $self->{'_master_kill_count'} ||= 0
929 2 0 $self->{'_timeout'} || 90
1502 3 0 delete $opts{'_cmd'} || 'ssh'
1831 0 0 $cin || 0
0 0 $cout || 0
0 0 $cerr || 0
1855 0 0 $cin || 0
0 0 $cout || 0
0 0 $cerr || 0
2250 0 0 delete $opts{'glob_flags'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
314 0 0 3 $login_handler or defined $passwd
559 0 0 0 $uid == $> || $uid == 0
0 0 0 ($mode & 18) == 0 || $mode & 512
620 0 0 0 $self->{'_scp_cmd'} ||= do { my $scp = $self->{'_ssh_cmd'}; croak("scp command name not set") unless $scp =~ s/ssh$/scp/i; $scp }
715 0 0 0 $self->{'_master_kill_start'} ||= $now
716 0 0 0 $self->{'_master_kill_last'} ||= $now
719 0 0 0 $async or __has_sigchld_handle()
730 0 0 0 $deceased == $pid or $deceased < 0 and $! == 10
800 0 0 0 $send_ctl || $self->_my_master_pid
940 0 0 2 $self->{'_master_pty_force'} or defined $self->{'_login_handler'}
1037 0 0 0 not $pid or $1 == $pid
1080 0 0 1 $deceased == $pid or $deceased < 0 and $! == 10
1106 0 0 0 defined $self->{'_passwd'} or $self->{'_login_handler'}
1147 0 0 0 $self->{'_master_state'} == 2 || $self->{'_master_state'} == 3
1174 1 0 16 $deceased == $pid or $deceased < 0 and $! == 10
1305 3 0 0 !defined($remote_shell) || $remote_shell eq $self->{'_remote_shell'}
1306 0 3 0 $self->{'remote_quoter'} ||= "Net::OpenSSH::ShellQuoter"->quoter($self->{'_remote_shell'})
1348 0 0 0 $opts->{'stderr_discard'} || $opts->{'stderr_to_stdout'}
1523 3 0 0 $stdin_discard = delete $opts{'stdin_discard'} or $stdin_pipe = delete $opts{'stdin_pipe'}
3 0 0 $stdin_discard = delete $opts{'stdin_discard'} or $stdin_pipe = delete $opts{'stdin_pipe'} or $stdin_fh = delete $opts{'stdin_fh'}
0 0 0 $stdin_discard = delete $opts{'stdin_discard'} or $stdin_pipe = delete $opts{'stdin_pipe'} or $stdin_fh = delete $opts{'stdin_fh'} or $stdin_file = delete $opts{'stdin_file'}
1538 0 0 0 $tunnel or $stdout_pty = delete $opts{'stdout_pty'}
0 3 0 $stdout_discard = delete $opts{'stdout_discard'} or $stdout_pipe = delete $opts{'stdout_pipe'}
3 0 0 $stdout_discard = delete $opts{'stdout_discard'} or $stdout_pipe = delete $opts{'stdout_pipe'} or $stdout_fh = delete $opts{'stdout_fh'}
3 0 0 $stdout_discard = delete $opts{'stdout_discard'} or $stdout_pipe = delete $opts{'stdout_pipe'} or $stdout_fh = delete $opts{'stdout_fh'} or $stdout_file = delete $opts{'stdout_file'}
1548 0 0 3 $stderr_discard = delete $opts{'stderr_discard'} or $stderr_pipe = delete $opts{'stderr_pipe'}
0 0 3 $stderr_discard = delete $opts{'stderr_discard'} or $stderr_pipe = delete $opts{'stderr_pipe'} or $stderr_fh = delete $opts{'stderr_fh'}
0 3 0 $stderr_discard = delete $opts{'stderr_discard'} or $stderr_pipe = delete $opts{'stderr_pipe'} or $stderr_fh = delete $opts{'stderr_fh'} or $stderr_to_stdout = delete $opts{'stderr_to_stdout'}
1660 1 0 0 open $rin, "<", "/dev/null" or POSIX::_exit(255)
1661 0 0 0 open $wout, ">", "/dev/null" or POSIX::_exit(255)
1662 0 0 0 open $werr, ">", "/dev/null" or POSIX::_exit(255)
1680 0 1 0 $rin_fd == 0 or POSIX::dup2($rin_fd, 0)
1683 0 1 0 $wout_fd == 1 or POSIX::dup2($wout_fd, 1)
1686 0 0 0 $werr_fd == 2 or POSIX::dup2($werr_fd, 2)
1830 2 0 2 $cout or $cerr
2 0 2 $cout or $cerr or $cin
1835 2 0 0 $cout or $cerr
1868 2 0 2 $read or grep(($! == $_), @retriable)
1877 0 0 0 $read or grep(($! == $_), @retriable)
2373 0 0 0 defined $quiet or $verbose
2496 0 0 0 not defined $hostname && length $hostname or $hostname =~ /^localhost\b/

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
1668 0 0 0 0 $pid1 xor $stdinout_dpipe_make_parent