Condition Coverage

blib/lib/Sys/CpuAffinity.pm
Criterion Covered Total %
condition 25 148 16.8


and 3 conditions

line !l l&&!r l&&r condition
96 15 0 4 $mask == -1 and $np > 0
109 0 15 2 $maxmask > 1 and $mask >= $maxmask
203 0 0 0 $^O ne 'MSWin32' and $^O ne 'cygwin'
227 0 0 1 $^O ne 'MSWin32' and $^O ne 'cygwin'
262 0 5 0 $XS_LOADED and defined &Sys::CpuAffinity::xs_cpusetGetCPUCount
367 0 0 0 $SOLARIS_HINTS and $Sys::CpuAffinity::SOLARIS_HINTS->{'multicpu'}
370 0 0 0 $? == 0 and $maj > 11 || $maj == 11 && $min >= 2
411 0 0 0 -r '/var/run/dmesg.boot' and open my $fh, '<', '/var/run/dmesg.boot'
551 0 0 0 $Sys::CpuAffinity::IS_TEST and not $Sys::CpuAffinity::HINV_CALLED++
626 0 0 0 defined $sysinfo and defined $sysinfo->{'_ncpu'}
654 0 0 0 $? == 0 and $n < 64
678 0 0 7 $^O ne 'MSWin32' and $^O ne 'cygwin'
818 0 0 7 $^O ne 'MSWin32' and $^O ne 'cygwin'
896 0 0 0 $pbind_output eq '' and $? == 0
950 0 0 0 $ipid ne '' and $ibnd
1142 0 0 16 $^O ne 'MSWin32' and $^O ne 'cygwin'
1219 0 0 0 $^O eq 'MSWin32' and $v < 3.51 || $v >= 6
1390 12 0 0 $^O eq 'cygwin' and defined &Sys::CpuAffinity::xs_win32_setAffinity_thread
1433 0 0 0 $np > 0 and $mask + 1 == &TWO() ** $np
1470 0 0 0 $] >= 5.008 and defined &Cygwin::pid_to_winpid
1514 0 0 1 not $@ and !$version || $version <= $v

or 2 conditions

line l !l condition
59 0 6 _getAffinity_with_xs_sched_getaffinity($pid) || _getAffinity_with_xs_pthread_self_getaffinity($pid) || _getAffinity_with_taskset($pid) || _getAffinity_with_BSD_Process_Affinity($pid) || _getAffinity_with_xs_freebsd_getaffinity($pid) || _getAffinity_with_cpuset($pid) || _getAffinity_with_xs_processor_affinity($pid) || _getAffinity_with_pbind($pid) || _getAffinity_with_xs_processor_bind($pid) || _getAffinity_with_psaix($pid) || _getAffinity_with_xs_win32($pid) || _getAffinity_with_xs_irix_sysmp($pid) || _getAffinity_with_Win32Process($wpid) || _getAffinity_with_Win32API($wpid) || 0
130 0 4 _setAffinity_with_Win32API($pid, $mask) || _setAffinity_with_xs_win32($pid, $mask) || _setAffinity_with_Win32Process($pid, $mask) || _setAffinity_with_xs_sched_setaffinity($pid, $mask) || _setAffinity_with_taskset($pid, $mask) || _setAffinity_with_BSD_Process_Affinity($pid, $mask) || _setAffinity_with_xs_freebsd_setaffinity($pid, $mask) || _setAffinity_with_xs_processor_affinity($pid, $mask) || _setAffinity_with_pbind($pid, $mask) || _setAffinity_with_xs_processor_bind($pid, $mask) || _setAffinity_with_xs_pthread_self_setaffinity($pid, $mask) || _setAffinity_with_bindprocessor($pid, $mask) || _setAffinity_with_cpuset($pid, $mask) || _setAffinity_with_xs_irix_sysmp($pid, $mask) || 0
152 0 0 _getNumCpus_from_xs_Win32API_System_Info() || _getNumCpus_from_xs_cpusetGetCPUCount() || _getNumCpus_from_proc_cpuinfo() || _getNumCpus_from_proc_stat() || _getNumCpus_from_lsdev() || _getNumCpus_from_bindprocessor() || _getNumCpus_from_BSD_Process_Affinity() || _getNumCpus_from_sysctl_freebsd() || _getNumCpus_from_sysctl() || _getNumCpus_from_dmesg_bsd() || _getNumCpus_from_xs_solaris() || _getNumCpus_from_dmesg_solaris() || _getNumCpus_from_psrinfo() || _getNumCpus_from_hinv() || _getNumCpus_from_hwprefs() || _getNumCpus_from_system_profiler() || _getNumCpus_from_Win32API_System_Info() || _getNumCpus_from_Test_Smoke_SysInfo() || _getNumCpus_from_prtconf() || _getNumCpus_from_ENV() || _getNumCpus_from_taskset() || -1
257 0 0 $WIN32_SYSTEM_INFO{'NumberOfProcessors'} || 0
297 5 0 $num_processors || 0
315 1 0 $num_processors || 0
387 0 0 $Sys::CpuAffinity::AIX_HINTS->{'NUM_CORES'} || 0
455 0 0 $ncpus || 0
462 0 0 $n || 0
467 0 0 xs_num_cpus_freebsd() || 0
532 0 0 $ncpus || 0
582 0 0 $result || 0
618 0 0 $ncpus || 0
1509 0 5 shift() || ''

or 3 conditions

line l !l&&r !l&&!r condition
184 0 0 1 $^O eq 'MSWin32' or $^O eq 'cygwin'
370 0 0 0 $maj > 11 || $maj == 11 && $min >= 2
576 0 0 1 $^O =~ /darwin/i or $^O =~ /MacOS/i
586 0 0 1 $^O =~ /darwin/ or $^O =~ /MacOS/i
701 0 0 0 _win32api('OpenProcess', 1024, 0, $pid) || _win32api('OpenProcess', 4096, 0, $pid)
720 0 0 0 _win32api('OpenThread', 96, 0, $thrid) || _win32api('OpenThread', 1536, 0, $thrid) || _win32api('OpenThread', 32, 0, $thrid) || _win32api('OpenThread', 1024, 0, $thrid)
743 0 0 0 _win32api('OpenProcess', 1024, 0, $cpid) || _win32api('OpenProcess', 4096, 0, $cpid)
828 0 0 0 not Win32::Process::Open($processHandle, $pid, 0) or ref $processHandle ne 'Win32::Process'
960 0 0 0 $Sys::CpuAffinity::AIX_HINTS->{'PROC_MAP'}{$bndd} || $bndd
1105 0 0 0 $_NUM_CPUS_CACHED || getNumCpus()
1178 0 0 0 _win32api('OpenThread', 96, 0, -$pid) || _win32api('OpenThread', 1536, 0, -$pid) || _win32api('OpenThread', 64, 0, -$pid) || _win32api('OpenThread', 512, 0, -$pid)
1208 0 0 0 not Win32::Process::Open($processHandle, $pid, 0) or ref $processHandle ne 'Win32::Process'
1219 0 0 0 $v < 3.51 || $v >= 6
1245 0 0 5 $^O ne 'linux' or not _configExternalProgram('taskset')
1514 1 0 0 !$version || $version <= $v
1541 0 0 18 $which =~ / not in / or $which =~ /no \Q$program\E in /
0 0 18 $which =~ / not in / or $which =~ /no \Q$program\E in / or $which =~ /Command not found/
0 11 7 $which =~ / not in / or $which =~ /no \Q$program\E in / or $which =~ /Command not found/ or not -x $which
1621 0 0 0 not defined $WIN32API{$function} or $WIN32API{$function} == 0