Branch Coverage

blib/lib/FusionInventory/Agent/Task/Inventory/Linux/Drives.pm
Criterion Covered Total %
branch 23 50 46.0


line true false branch
11 0 0 if $params{'no_category'}{'drive'}
42 0 0 if (canRun('blkid')) { }
72 0 0 if ($filesystem->{'FILESYSTEM'} =~ /^ext(2|3|4|4dev)/ and $has_dumpe2fs)
77 0 0 unless $handle
79 0 0 if ($line =~ /Filesystem UUID:\s+(\S+)/) { }
0 0 elsif ($line =~ /Filesystem created:\s+\w+\s+(\w+)\s+(\d+)\s+([\d:]+)\s+(\d{4})$/) { }
0 0 elsif ($line =~ /Filesystem volume name:\s*(\S.*)/) { }
84 0 0 unless $1 eq ''
91 0 0 if ($filesystem->{'FILESYSTEM'} eq 'xfs' and $has_xfs_db)
105 0 0 if ($filesystem->{'FILESYSTEM'} eq 'vfat' and $has_dosfslabel)
116 0 0 if (canRun('lshal'))
123 0 0 unless $hal_filesystem
128 0 0 unless $filesystem->{$key}
143 0 2 unless $handle
150 12 3406 if ($line =~ m[^udi = '/org/freedesktop/Hal/devices/(volume|block).*])
155 2986 420 unless defined $device
157 14 406 if ($line =~ /^$/) { }
12 394 elsif ($line =~ /^\s+ block.device \s = \s '([^']+)'/x) { }
8 386 elsif ($line =~ /^\s+ volume.fstype \s = \s '([^']+)'/x) { }
6 380 elsif ($line =~ /^\s+ volume.label \s = \s '([^']+)'/x) { }
7 373 elsif ($line =~ /^\s+ volume.uuid \s = \s '([^']+)'/x) { }
2 371 elsif ($line =~ /^\s+ storage.model \s = \s '([^']+)'/x) { }
10 361 elsif ($line =~ /^\s+ volume.size \s = \s (\S+)/x) { }
10 351 elsif ($line =~ /block.is_volume\s*=\s*true/i) { }
158 10 4 if ($device->{'ISVOLUME'})