Branch Coverage

blib/lib/Test/SSH/Backend/OpenSSH.pm
Criterion Covered Total %
branch 4 42 9.5


line true false branch
15 0 2 unless ($sshd->{'run_server'})
20 2 0 unless my $exe = $sshd->_sshd_executable
21 0 0 unless $sshd->_create_keys
46 0 0 if (defined $v) { }
52 0 0 unless $sshd->_write_config(%Config)
56 0 0 unless ($sshd->{'server_pid'} = $sshd->_run_cmd({'out_name', 'server', 'async', 1}, $exe, '-D', '-e', '-f', $sshd->{'config_file'}))
73 0 0 if ($sshd->_test_server)
84 0 0 if (open my $fn, '>', $fn)
90 0 0 if close $fn
98 0 0 if (defined(my $pid = $sshd->{'server_pid'}))
100 0 0 if $rc <= 0
112 2 0 if (defined(my $run_dir = $sshd->_run_dir))
114 2 0 unless open my $fh, '<', "$run_dir/sshd.pid"
116 0 0 unless defined $pid
118 0 0 unless $pid
134 0 0 if -f $fn and -f "$fn.pub"
137 0 0 if ($sshd->_run_cmd({'search_binary', 1}, 'ssh_keygen', -'t', 'rsa', -'b', 1024, -'f', $tmpfn, -'P', ''))
141 0 0 if (rename $tmpfn, $fn and rename "$tmpfn.pub", "$fn.pub")
160 0 0 unless my $kdir = $sshd->_private_dir('openssh/keys')
164 0 0 if $sshd->_create_key($user_key)
173 0 0 unless ('IO::Socket::INET'->new('PeerAddr', "localhost:$port", 'Proto', 'tcp', 'Timeout', $sshd->{'timeout'}))