Branch Coverage

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


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")
144 0 0 if (canRun('/sbin/ip')) { }
150 0 0 if @interfaces
158 0 0 if (canRun('/sbin/ifconfig')) { }
164 0 0 if @interfaces
190 0 0 unless $handle
194 0 0 unless $line =~ /^(\w+)=(\S+)$/
207 0 2 $params{'name'} ? :
209 0 2 unless $handle
213 2 12 if $line =~ /IEEE (\S+)/
215 1 13 if $line =~ /ESSID:"([^"]+)"/
217 2 12 if $line =~ /Mode:(\S+)/
219 1 13 if $line =~ /Access Point: ($FusionInventory::Agent::Task::Inventory::Linux::Networks::mac_address_pattern)/