Branch Coverage

blib/lib/FusionInventory/Agent/Task/Inventory/Linux/Networks.pm
Criterion Covered Total %
branch 10 60 16.6


line true false branch
13 0 0 if $params{'no_category'}{'network'}
32 0 0 if isSameNetwork($default, $interface->{'IPADDRESS'}, $interface->{'IPMASK'})
64 0 0 if (-d "/sys/class/net/$interface->{'DESCRIPTION'}/device") { }
67 0 0 if $info->{'DRIVER'}
69 0 0 if $info->{'PCI_SLOT_NAME'}
72 0 0 if $info->{'PCI_SUBSYS_ID'} and $info->{'PCI_ID'}
77 0 0 if (-d "/sys/class/net/$interface->{'DESCRIPTION'}/wireless") { }
0 0 elsif (-f "/sys/class/net/$interface->{'DESCRIPTION'}/mode") { }
93 0 0 if ($interface->{'DESCRIPTION'} eq 'lo')
97 0 0 if ($interface->{'DESCRIPTION'} =~ /^ppp/)
102 0 0 if ($interface->{'DESCRIPTION'} =~ /^([\w\d]+)[:.]\d+$/)
107 0 0 if (-d "/sys/class/net/$interface->{'DESCRIPTION'}/brif")
113 0 0 if (-d "/sys/class/net/$interface->{'DESCRIPTION'}/bonding")
120 0 0 if (-d "/sys/class/net/$interface->{'DESCRIPTION'}/bonding_slave")
128 0 0 if (-r "/sys/class/net/$interface->{'DESCRIPTION'}/speed")
132 0 0 if $speed
135 0 0 unless ($interface->{'SPEED'})
141 0 0 if ($infos->{'SPEED'}) { }
165 0 0 if (canRun('/sbin/ip')) { }
171 0 0 if @interfaces
179 0 0 if (canRun('/sbin/ifconfig')) { }
185 0 0 if @interfaces
211 0 0 unless $handle
215 0 0 unless $line =~ /^(\w+)=(\S+)$/
228 0 2 $params{'name'} ? :
230 0 2 unless $handle
234 2 12 if $line =~ /IEEE (\S+)/
236 1 13 if $line =~ /ESSID:"([^"]+)"/
238 2 12 if $line =~ /Mode:(\S+)/
240 1 13 if $line =~ /Access Point: ($FusionInventory::Agent::Task::Inventory::Linux::Networks::mac_address_pattern)/