Branch Coverage

blib/lib/OSPF/LSDB/gated.pm
Criterion Covered Total %
branch 111 168 66.0


line true false branch
98 28 0 $_[0] eq 'Off' ? :
24 28 $_[0] eq 'On' ? :
103 0 0 if (-e $file)
105 0 0 if $> != 0
109 0 0 if ($self->{'ssh'}) { }
112 0 0 if $> != 0
114 0 0 if system @cmd
117 0 0 if ($self->{'ssh'}) { }
120 0 0 if $?
138 82 82 if (/Type: ([\w ]+)\s+Cost: $DEC$/) { }
0 82 elsif (/RouterID: $SIP\s+Address: $SIP$/) { }
64 18 elsif (/DR: $SIP\s+Address: $SIP$/) { }
18 0 elsif (/Network: $SIP\s+NetMask: $SIP$/) { }
139 0 82 unless defined($type = $typename{$1})
144 0 0 if ($type eq 'pointtopoint' or $type eq 'virtual') { }
151 64 0 if ($type eq 'transit') { }
158 18 0 if ($type eq 'stub') { }
176 74 186 if (/^\w/)
179 26 234 if (/^AdvRtr: $SIP\s+Len: $DEC\s+Age: $TIME\s+Seq: $HEX$/) { }
26 208 elsif (/^RouterID: $SIP\s+Area Border: $OO\s+AS Border: $OO$/) { }
22 186 elsif (/^Nexthops\b/) { }
186 0 elsif (s/^\t//) { }
192 164 22 if ($section eq 'link') { }
22 0 elsif ($section eq 'nexthop') { }
213 142 24 if (/^\w/)
216 26 140 if (/^AdvRtr: $SIP\s+Len: $DEC\s+Age: $TIME\s+Seq: $HEX$/) { }
26 114 elsif (/^Router: $SIP\s+Netmask: $SIP\s+Network: $SIP$/) { }
66 48 elsif (/^Attached Router: $SIP$/) { }
24 24 elsif (/^Nexthops\b/) { }
24 0 elsif (s/^\t//) { }
228 24 0 if ($section eq 'nexthop') { }
246 12 4 if (/^\w/)
249 4 12 if (/^AdvRtr: $SIP\s+Len: $DEC\s+Age: $TIME\s+Seq: $HEX$/) { }
4 8 elsif (/^LSID: $SIP\s+Network: $SIP\s+Netmask: $SIP\s+Cost: $DEC$/) { }
4 4 elsif (/^Nexthops\b/) { }
4 0 elsif (s/^\t//) { }
260 4 0 if ($section eq 'nexthop') { }
278 8 0 if (/^\w/)
281 4 4 if (/^AdvRtr: $SIP\s+Len: $DEC\s+Age: $TIME\s+Seq: $HEX$/) { }
4 0 elsif (/^RouterID: $SIP\s+Cost: $DEC$/) { }
0 0 elsif (/^Nexthops\b/) { }
0 0 elsif (s/^\t//) { }
291 0 0 if ($section eq 'nexthop') { }
315 2 708 if (/^Link State Database:/) { }
600 108 elsif ($lsdb) { }
316 0 2 if $lsdb
319 0 600 if (/^Retransmission List:$/)
320 0 0 unless $type
324 78 522 if (not /^\t/ and @type_lines)
325 60 18 if ($type and $type->[1])
334 78 522 if (s/^(\w+)\t//) { }
444 78 elsif (s/\t//) { }
0 78 elsif (/^Retransmission List:$/) { }
78 0 elsif (/^$/) { }
335 0 78 unless $type = $typename{$1}
339 0 444 unless $type
351 0 2 if (@type_lines)
362 472 212 if (/^\w/)
365 132 552 if (/^AdvRtr: $SIP\s+Len: $DEC\s+Age: $TIME\s+Seq: $HEX$/) { }
132 420 elsif (/^LSID: $SIP\s+Network: $SIP\s+Netmask: $SIP\s+Cost: $DEC$/) { }
132 288 elsif (/^Type: ([1-2])\s+Forward: $SIP\s+Tag: $TAG\b/) { }
76 212 elsif (/^Nexthops\b/) { }
0 212 elsif (/^Retransmission List:$/) { }
76 136 elsif (s/^\t//) { }
136 0 elsif (/^$/) { }
384 76 0 if ($section eq 'nexthop') { }
0 0 elsif ($section eq 'retransmission') { }
415 32 1656 if (/^\w/) { }
417 2 30 if (/^RouterID: $SIP\s+/) { }
2 28 elsif (/^Area $SIP:/) { }
2 26 elsif (/^AS Externals\s+/) { }
428 710 946 if ($section{'area'}) { }
684 262 elsif ($section{'external'}) { }
435 0 2 unless $self->{'ospf'}{'self'}{'routerid'} = $routerid
468 0 2 if ($todo{'dump'}) { }
473 0 2 if $todo{'skip'}
478 0 6904 if ($skip)
479 0 0 if (/^\f$/)
484 30 6874 if (/^\w/)
487 22 6882 if (/^Task (\w+):/) { }
2 6880 elsif (/^Done$/) { }
3210 3670 elsif (defined $task) { }
493 1688 1522 if ($task eq "ospf")
498 0 2 if ($n < @{$self->{'dump'};})