Branch Coverage

blib/lib/FusionInventory/Agent/Tools/Linux.pm
Criterion Covered Total %
branch 0 132 0.0


line true false branch
55 0 0 unless $handle
59 0 0 if ($line =~ /^S:.*-scsi-(\d+):(\d+):(\d+):(\d+)/) { }
0 0 elsif ($line =~ /^E:ID_VENDOR=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_MODEL=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_REVISION=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_SERIAL=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_SERIAL_SHORT=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_TYPE=(.*)/) { }
0 0 elsif ($line =~ /^E:ID_BUS=(.*)/) { }
82 0 0 unless ($$result{'SERIALNUMBER'})
102 0 0 if ($line =~ /^([^:]+\S) \s* : \s (.+)/x) { }
0 0 elsif ($line =~ /^$/) { }
107 0 0 if $cpu and _isValidCPU($cpu)
114 0 0 if $cpu and _isValidCPU($cpu)
137 0 0 if ($line =~ m[^udi = '/org/freedesktop/Hal/devices/(storage|legacy_floppy|block)])
142 0 0 unless defined $device
144 0 0 if ($line =~ /^$/) { }
0 0 elsif ($line =~ /^\s+ storage.serial \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ storage.firmware_version \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ block.device \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ info.vendor \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ storage.model \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ storage.drive_type \s = \s '([^']+)'/x) { }
0 0 elsif ($line =~ /^\s+ storage.size \s = \s (\S+)/x) { }
179 0 0 unless $file =~ /([shv]d[a-z]|fd\d)$/
183 0 0 getFirstLine('command', '/sbin/fdisk -v') =~ /^GNU/ ? :
192 0 0 unless $handle
195 0 0 unless $line =~ m[^/dev/([shv]d[a-z])]
207 0 0 _getValueFromSysProc($logger, $name, 'removable') ? :
228 0 0 -f "/proc/ide/$device/$key" ? :
0 0 -f "/sys/block/$device/device/$key" ? :
233 0 0 unless $file
236 0 0 unless $handle
250 0 0 $params{'device'} ? :
254 0 0 unless $handle
262 0 0 if ($line =~ /^Vendor: +(\S+)/i)
267 0 0 if ($line =~ /^Product: +(\S+)/i)
272 0 0 if ($line =~ /^Revision: +(\S+)/i)
277 0 0 if ($line =~ /^User Capacity: +(\S.+\S)/i)
282 0 0 if ($line =~ /^Transport protocol: +(\S+)/i)
287 0 0 if ($line =~ /^Device type: +(\S+)/i)
292 0 0 if ($line =~ /^Serial number: +(\S+)/i)
308 0 0 unless $handle
318 0 0 if ($line =~ /^$/)
320 0 0 if $interface
324 0 0 if ($line =~ /^([\w\d.]+)/)
333 0 0 if ($line =~ / inet \s ($FusionInventory::Agent::Tools::Linux::ip_address_pattern) \s+ netmask \s ($FusionInventory::Agent::Tools::Linux::ip_address_pattern) \s+ broadcast \s $FusionInventory::Agent::Tools::Linux::ip_address_pattern /x)
342 0 0 if ($line =~ / ether \s ($FusionInventory::Agent::Tools::Linux::mac_address_pattern) .+ \( Ethernet \) /x)
351 0 0 if ($line =~ /inet6 \s (\S+)/x)
355 0 0 if ($line =~ /inet addr:($FusionInventory::Agent::Tools::Linux::ip_address_pattern)/i)
359 0 0 if ($line =~ /Mask:($FusionInventory::Agent::Tools::Linux::ip_address_pattern)/)
363 0 0 if ($line =~ /inet6 addr: (\S+)/i)
367 0 0 if ($line =~ /hwadd?r\s+($FusionInventory::Agent::Tools::Linux::mac_address_pattern)/i)
371 0 0 if ($line =~ /^\s+UP\s/)
375 0 0 if ($line =~ /flags=.*[<,]UP[>,]/)
379 0 0 if ($line =~ /Link encap:(\S+)/)
395 0 0 unless $handle
400 0 0 if ($line =~ /^\d+:\s+(\S+): <([^>]+)>/) { }
0 0 elsif ($line =~ m[link/\S+ ($FusionInventory::Agent::Tools::Linux::any_mac_address_pattern)?]) { }
0 0 elsif ($line =~ m[inet6 (\S+)/(\d{1,2})]) { }
0 0 elsif ($line =~ m[ inet \s ($FusionInventory::Agent::Tools::Linux::ip_address_pattern)(?:/(\d{1,3}))? \s .* \s (\S+)$ ]x) { }
402 0 0 if (@addresses) { }
0 0 elsif ($interface) { }
411 0 0 any(sub { $_ eq 'UP'; } , split(/,/, $flags, 0)) ? :
456 0 0 if (@addresses) { }
0 0 elsif ($interface) { }