Condition Coverage

blib/lib/MogileFS/Worker/Query.pm
Criterion Covered Total %
condition 0 187 0.0


and 3 conditions

line !l l&&!r l&&r condition
112 0 0 0 $args->{'zone'} && $args->{'zone'} eq 'alt'
167 0 0 0 defined $domain and length $domain
372 0 0 0 defined $key && length $key
446 0 0 0 $args->{'size'} > -1 and $args->{'size'} != $size
454 0 0 0 $checksum and $args->{'checksumverify'}
497 0 0 0 defined $rv and not $rv
514 0 0 0 defined $rv and not $rv
548 0 0 0 defined $rv and not $rv
588 0 0 0 defined $rv and not $rv
652 0 0 0 defined $rv and not $rv
737 0 0 0 defined $prefix and $prefix ne ''
739 0 0 0 $after and not $after =~ /^$prefix/
750 0 0 0 $keys and @$keys
770 0 0 0 valid_key($fkey) and valid_key($tkey)
789 0 0 0 defined $args->{'hostid'} and $host->id != $args->{'hostid'}
808 0 0 0 defined $args->{'devid'} and $dev->id != $args->{'devid'}
829 0 0 0 $devid and $devid =~ /^\d+$/
834 0 0 0 $args->{'hostid'} and $args->{'hostid'} =~ /^\d+$/
914 0 0 0 $hashtype and $hashtype ne 'NONE'
925 0 0 0 not defined $clsid and $args->{'update'}
0 0 0 not defined $clsid and $args->{'update'} and $class eq 'default'
1094 0 0 0 $memc && $args->{'noverify'}
1102 0 0 0 defined $rv and not $rv
1135 0 0 0 $memc and not $get_from_memc
1158 0 0 0 $memc and not $get_from_memc
1176 0 0 0 $dev and $dev->host
1205 0 0 0 $ret->{'paths'} < $pathcount and @drain_paths
1214 0 0 0 $backup_path and not $ret->{'paths'}
1230 0 0 0 defined $util and $util =~ /\A\d+\Z/
1280 0 0 0 defined $rv and not $rv
1334 0 0 0 defined $util and $util =~ /\A\d+\Z/
1404 0 0 0 $hostname and $devid
0 0 0 $hostname and $devid and $weight >= 0
1425 0 0 0 $hostname and $devid
0 0 0 $hostname and $devid and $dstate
1524 0 0 0 $checked_fid and $final_fid
0 0 0 $checked_fid and $final_fid and $checked_fid >= $final_fid

or 2 conditions

line l !l condition
92 0 0 $1 || undef
179 0 0 $args->{'duration'} || 10
215 0 0 $args->{'key'} || ''
217 0 0 $args->{'size'} || undef
236 0 0 $args->{'class'} || ''
698 0 0 $args->{'from'} || 0
699 0 0 $args->{'to'} || 0
700 0 0 $count ||= 100
743 0 0 $limit ||= 1000
824 0 0 $args->{'state'} || 'alive'
905 0 0 $args->{'replpolicy'} || ''
1007 0 0 $args->{'status'} ||= 'down'
1095 0 0 'MogileFS::Config'->server_setting_cached('memcache_ttl') || 3600
1113 0 0 $args->{'pathcount'} || 2
1232 0 0 $weight ||= 100
1235 0 0 $weight ||= 100
1336 0 0 $weight ||= 100
1339 0 0 $weight ||= 100
1533 0 0 'MogileFS::Config'->server_setting('fsck_highest_fid_checked') || 0
1760 0 0 shift() || {}

or 3 conditions

line l !l&&r !l&&!r condition
438 0 0 0 not defined $size or $size == -1
701 0 0 0 $count > 500 or $count < 0
718 0 0 0 $domains{$r->{'dmid'}} ||= Mgd::domain_factory()->get_by_id($r->{'dmid'})->name
720 0 0 0 $classes{$r->{'dmid'}}{$r->{'classid'}} ||= Mgd::class_factory()->get_by_id($r->{'dmid'}, $r->{'classid'})->name
1017 0 0 0 $hostid ||= $sto->create_host($hostname, $args->{'ip'})
1135 0 0 0 $need_fid_in_memcache or $memc and not $get_from_memc
1158 0 0 0 $need_devids_in_memcache or $memc and not $get_from_memc
1191 0 0 0 $ret->{'paths'} or $args->{'noverify'}
0 0 0 $ret->{'paths'} or $args->{'noverify'} or $dfid->size_matches
1524 0 0 0 $final_fid || $checked_fid
0 0 0 $checked_fid and $final_fid and $checked_fid >= $final_fid or not $final_fid || $checked_fid
1812 0 0 0 shift() || {'dup', 'Duplicate name/number used.', 'after_mismatch', 'Pattern does not match the after-value?', 'bad_params', 'Invalid parameters to command; please see documentation', 'class_exists', 'That class already exists in that domain', 'class_has_files', 'Class still has files, unable to delete', 'class_not_found', 'Class not found', 'db', 'Database error', 'domain_has_files', 'Domain still has files, unable to delete', 'domain_exists', 'That domain already exists', 'domain_not_empty', 'Domain still has classes, unable to delete', 'domain_not_found', 'Domain not found', 'failure', 'Operation failed', 'host_exists', 'That host already exists', 'host_mismatch', q[The device specified doesn't belong to the host specified], 'host_not_empty', 'Unable to delete host; it contains devices still', 'host_not_found', 'Host not found', 'invalid_checker_level', 'Checker level invalid. Please see documentation on this command.', 'invalid_mindevcount', 'The mindevcount must be at least 1', 'key_exists', q[Target key name already exists; can't overwrite.], 'no_class', 'No class provided', 'no_devices', 'No devices found to store file', 'no_device', 'Device not found', 'no_domain', 'No domain provided', 'no_host', 'No host provided', 'no_ip', 'IP required to create host', 'no_port', 'Port required to create host', 'no_temp_file', 'No tempfile or file already closed', 'none_match', 'No keys match that pattern and after-value (if any).', 'plugin_aborted', 'Action aborted by plugin', 'state_too_high', 'Status cannot go from dead to alive; must use down', 'unknown_command', 'Unknown server command', 'unknown_host', 'Host not found', 'unknown_state', 'Invalid/unknown state', 'unreg_domain', 'Domain name invalid/not found', 'rebal_not_started', 'Rebalance not running', 'no_rebal_state', 'No available rebalance status', 'no_rebal_policy', 'No rebalance policy available', 'nodel_default_class', 'Cannot delete the default class'}->{$err_code} || $err_code