Branch Coverage

blib/lib/StorageDisplay/Data/RAID.pm
Criterion Covered Total %
branch 29 54 53.7


line true false branch
174 0 24 if ($state =~ /degraded|DGD/i) { }
0 24 elsif ($state =~ /failed|offline/i) { }
24 0 elsif ($state =~ /clean|active|active-idle|optimal|OKY/i) { }
191 0 24 if ($self->has_extra_info)
415 46 0 if (defined $self->state)
598 0 8 if (exists $args->{'raid-container-device'})
638 14 2 if ($self->has_used_dev_size)
748 0 0 if ($hwsize =~ /^[0-9]+$/) { }
0 0 elsif ($hwsize =~ /^([0-9]+)([BKMGTP])$/) { }
791 9 1 unless ($dev->{'ID'} =~ /^c[0-9]+uXpY$/)
796 0 10 if ($devname ne "" and $devname ne "N/A")
811 0 10 if ($block)
831 0 3 if ($dev->{'InProgress'} ne "None")
866 9 1 if ($_->raiddevice =~ /^(c[0-9]+u[0-9]+)p([0-9]+|Y)$/)
908 0 2 if ($status =~ /REPL|error/i) { }
0 2 elsif ($status =~ /missing/i or $status eq '') { }
0 2 elsif ($status =~ /absent/i) { }
2 0 elsif ($status =~ /good/i) { }
1042 0 0 unless $StorageDisplay::Data::RAID::LSI::SASIrcu::a->{'enclosure'} <=> $StorageDisplay::Data::RAID::LSI::SASIrcu::b->{'enclosure'}
1046 0 4 if ($dev->{'state'} =~ /MIS/) { }
1061 0 4 if ($id eq "0:0")
1069 4 0 if ($serial ne "")
1089 2 2 if (defined $block)
1120 0 2 if ($id eq "0:0")
1129 0 1 if ($cur_missing_count != $defined_missing_count)
1132 0 1 $cur_missing_count > $defined_missing_count ? :
1155 2 2 if ($_->has_volume)