Condition Coverage

blib/lib/Sys/CpuAffinity.pm
Criterion Covered Total %
condition 25 151 16.5


and 3 conditions

line !l l&&!r l&&r condition
94 15 0 4 $mask == -1 and $np > 0
107 0 15 2 $maxmask > 1 and $mask >= $maxmask
201 0 0 0 $^O ne "MSWin32" and $^O ne "cygwin"
225 0 0 1 $^O ne "MSWin32" and $^O ne "cygwin"
260 0 5 0 $XS_LOADED and defined &Sys::CpuAffinity::xs_cpusetGetCPUCount
365 0 0 0 $SOLARIS_HINTS and $Sys::CpuAffinity::SOLARIS_HINTS->{'multicpu'}
368 0 0 0 $? == 0 and $maj > 11 || $maj == 11 && $min >= 2
409 0 0 0 -r "/var/run/dmesg.boot" and open my $fh, "<", "/var/run/dmesg.boot"
549 0 0 0 $Sys::CpuAffinity::IS_TEST and not $Sys::CpuAffinity::HINV_CALLED++
624 0 0 0 defined $sysinfo and defined $sysinfo->{'_ncpu'}
652 0 0 0 $? == 0 and $n < 64
676 0 0 7 $^O ne "MSWin32" and $^O ne "cygwin"
816 0 0 7 $^O ne "MSWin32" and $^O ne "cygwin"
894 0 0 0 $pbind_output eq "" and $? == 0
948 0 0 0 $ipid ne "" and $ibnd
1143 0 0 16 $^O ne "MSWin32" and $^O ne "cygwin"
1220 0 0 0 $^O eq "MSWin32" and $v lt '3.51' || $v ge '6.0'
1393 12 0 0 $^O eq "cygwin" and defined &Sys::CpuAffinity::xs_win32_setAffinity_thread
1436 0 0 0 $np > 0 and $mask + 1 == &TWO() ** $np
1473 0 0 0 $] >= "5.008" and defined &Cygwin::pid_to_winpid
1517 0 0 1 not $@ and !$version || $version <= $v

or 2 conditions

line l !l condition
57 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
128 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
150 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
255 0 0 $WIN32_SYSTEM_INFO{'NumberOfProcessors'} || 0
295 5 0 $num_processors || 0
313 1 0 $num_processors || 0
385 0 0 $Sys::CpuAffinity::AIX_HINTS->{'NUM_CORES'} || 0
453 0 0 $ncpus || 0
460 0 0 $n || 0
465 0 0 xs_num_cpus_freebsd() || 0
530 0 0 $ncpus || 0
580 0 0 $result || 0
616 0 0 $ncpus || 0
1512 0 5 shift() || ''

or 3 conditions

line l !l&&r !l&&!r condition
182 0 0 1 $^O eq "MSWin32" or $^O eq "cygwin"
368 0 0 0 $maj > 11 || $maj == 11 && $min >= 2
574 0 0 1 $^O =~ /darwin/i or $^O =~ /MacOS/i
584 0 0 1 $^O =~ /darwin/ or $^O =~ /MacOS/i
699 0 0 0 _win32api('OpenProcess', 1024, 0, $pid) || _win32api('OpenProcess', 4096, 0, $pid)
718 0 0 0 _win32api('OpenThread', 96, 0, $thrid) || _win32api('OpenThread', 1536, 0, $thrid) || _win32api('OpenThread', 32, 0, $thrid) || _win32api('OpenThread', 1024, 0, $thrid)
741 0 0 0 _win32api('OpenProcess', 1024, 0, $cpid) || _win32api('OpenProcess', 4096, 0, $cpid)
826 0 0 0 not Win32::Process::Open($processHandle, $pid, 0) or ref $processHandle ne "Win32::Process"
958 0 0 0 $Sys::CpuAffinity::AIX_HINTS->{'PROC_MAP'}{$bndd} || $bndd
1106 0 0 0 $_NUM_CPUS_CACHED || getNumCpus()
1179 0 0 0 _win32api('OpenThread', 96, 0, -$pid) || _win32api('OpenThread', 1536, 0, -$pid) || _win32api('OpenThread', 64, 0, -$pid) || _win32api('OpenThread', 512, 0, -$pid)
1209 0 0 0 not Win32::Process::Open($processHandle, $pid, 0) or ref $processHandle ne "Win32::Process"
1220 0 0 0 $v lt '3.51' || $v ge '6.0'
1246 0 0 5 $^O ne "linux" or not _configExternalProgram("taskset")
1323 0 0 0 system("'${pbind}' -b $cpus $pid > /dev/null 2>&1") || system("'${pbind}' -b -c $cpus -s $pid > /dev/null 2>&1")
1517 1 0 0 !$version || $version <= $v
1544 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
1625 0 0 0 not defined $WIN32API{$function} or $WIN32API{$function} == 0