Branch Coverage

blib/lib/File/RsyncP.pm
Criterion Covered Total %
branch 0 460 0.0


line true false branch
90 0 0 if $$rs{'rsyncArgs'}[$i] eq '--devices'
114 0 0 unless $p->getoptions('exclude=s', sub { optExclude($rs, @_); } , 'exclude-from=s', sub { optExclude($rs, @_); } , 'include=s', sub { optExclude($rs, @_); } , 'include-from=s', sub { optExclude($rs, @_); } , 'cvs-exclude|C', sub { optExclude($rs, @_); } )
126 0 0 unless $p->getoptions($$rs{'rsyncOpts'}, 'block-size=i', 'devices|D', 'from0|0', 'group|g', 'hard-links|H', 'ignore-times|I', 'links|l', 'numeric-ids', 'owner|o', 'perms|p', 'protocol=i', 'recursive|r', 'relative|R', 'timeout', 'verbose|v+')
145 0 0 if defined $$rs{'rsyncOpts'}{'protocol'}
148 0 0 if (not defined $$rs{'fio'}) { }
164 0 0 if ($$rs{'fio_version'} >= 2) { }
171 0 0 if $$rs{'protocol_version'} > 26
230 0 0 if $$rs{'timeout'}
231 0 0 unless socket FH, 2, 1, $proto
233 0 0 unless connect FH, $paddr
237 0 0 if $$rs{'timeout'}
238 0 0 unless ($line =~ /\@RSYNCD:\s*(\d+)/)
242 0 0 if ($$rs{'remote_protocol'} < 20 or $$rs{'remote_protocol'} > 40)
245 0 0 if $$rs{'logLevel'} >= 1
247 0 0 if $$rs{'protocol_version'} > $$rs{'remote_protocol'}
249 0 0 if $$rs{'fio_version'} >= 2
251 0 0 if $$rs{'logLevel'} >= 1
261 0 0 unless defined $$rs{'fh'}
265 0 0 if $$rs{'logLevel'} >= 2
266 0 0 if $line eq '@RSYNCD: EXIT'
277 0 0 unless defined $$rs{'fh'}
280 0 0 if $line =~ /\@ERROR: (.*)/
281 0 0 if ($line =~ /\@RSYNCD: AUTHREQD (.{22})/) { }
0 0 elsif ($authRequired) { }
288 0 0 if $$rs{'logLevel'} >= 2
291 0 0 if $$rs{'logLevel'} >= 5
293 0 0 if $$rs{'logLevel'} >= 2
299 0 0 if $line =~ /\@ERROR: (.*)/
300 0 0 if ($line ne '@RSYNCD: OK')
303 0 0 if $$rs{'logLevel'} >= 1
312 0 0 if $remoteSend
317 0 0 if $$rs{'logLevel'} >= 1
335 0 0 unless socketpair RSYNC, FH, 1, 1, 0
340 0 0 if ref $$rs{'rsyncCmd'} ne 'ARRAY' and ref $$rs{'rsyncCmd'} ne 'CODE'
343 0 0 if ($$rs{'rsyncCmdType'} eq 'full' or ref $$rs{'rsyncCmd'} ne 'ARRAY') { }
347 0 0 if $remoteSend
349 0 0 if ($$rs{'rsyncCmdType'} eq 'shell')
359 0 0 if ($remoteSend) { }
365 0 0 if ref $cmd eq 'ARRAY' and $$rs{'logLevel'} >= 1
367 0 0 unless ($pid = fork)
378 0 0 if (ref $cmd eq 'CODE') { }
390 0 0 if defined $$rs{'pidHandler'}
396 0 0 if $$rs{'logLevel'} >= 3
397 0 0 if $$rs{'logLevel'} >= 5
398 0 0 if $rs->getData(4) < 0
403 0 0 if $$rs{'logLevel'} >= 1
404 0 0 if $$rs{'protocol_version'} > $$rs{'remote_protocol'}
406 0 0 if $$rs{'fio_version'} >= 2
408 0 0 if ($version < 20 or $version > 40)
412 0 0 if $$rs{'logLevel'} >= 1
421 0 0 unless defined $$rs{'fh'}
431 0 0 if $rs->getData(4) < 0
436 0 0 if $$rs{'logLevel'} >= 2
439 0 0 if ($$rs{'remoteSend'}) { }
443 0 0 if ($rs->fileListReceive < 0)
451 0 0 if ($$rs{'rsyncOpts'}{'hard-links'})
460 0 0 if ($$rs{'logLevel'} >= 2)
474 0 0 if $rs->getChunk(4) < 0
481 0 0 if $$rs{'doPartial'}
500 0 0 unless ($pid = fork)
528 0 0 if $$rs{'logLevel'} >= 5
531 0 0 unless $$rs{'abort'}
541 0 0 if $$rs{'abort'}
553 0 0 if (fcntl $$rs{'fh'}, 3, $flags) { }
555 0 0 unless (fcntl $$rs{'fh'}, 4, $flags)
564 0 0 if $$rs{'logLevel'} >= 2
565 0 0 if defined $$rs{'pidHandler'}
583 0 0 if ($$rs{'abort'})
589 0 0 if $$rs{'childDone'} >= 3 or $rs->pollChild(1) < 0
591 0 0 unless defined $$rs{'fatalErrorMsg'}
600 0 0 if defined $$rs{'fatalErrorMsg'}
608 0 0 if $$rs{'fatalError'}
614 0 0 if $$rs{'fatalError'}
620 0 0 if $$rs{'fatalError'}
626 0 0 if $$rs{'abort'}
645 0 0 unless defined $f
646 0 0 if $$rs{'clientCharset'} ne ''
654 0 0 if (not $thisIgnoreAttr and $$f{'size'} == $$attr{'size'} and $$f{'mtime'} == $$attr{'mtime'} and !$$rs{'rsyncOpts'}{'perms'} || $$f{'mode'} == $$attr{'mode'} and !$$rs{'rsyncOpts'}{'group'} || $$f{'gid'} == $$attr{'gid'} and !$$rs{'rsyncOpts'}{'owner'} || $$f{'uid'} == $$attr{'uid'} and !$$rs{'rsyncOpts'}{'hard-links'} || $$f{'hlink_self'} == $$attr{'hlink_self'})
689 0 0 if ($$arg{'name'} eq 'exclude') { }
0 0 elsif ($$arg{'name'} eq 'include') { }
0 0 elsif ($$arg{'name'} eq 'exclude-from') { }
0 0 elsif ($$arg{'name'} eq 'include-from') { }
0 0 elsif ($$arg{'name'} eq 'cvs-exclude') { }
706 0 0 if ($$rs{'logLevel'} >= 1)
708 0 0 if $$rs{'clientCharset'} ne ''
710 0 0 if ($$exc{'flags'} & 16) { }
723 0 0 if $$rs{'chunkData'} eq '' and $rs->getChunk(1) < 0
725 0 0 if $$rs{'fileList'}->fatalError
726 0 0 if ($$rs{'logLevel'} >= 4)
730 0 0 unless defined $f
731 0 0 if $$rs{'clientCharset'} ne ''
737 0 0 if ($cnt > 0)
739 0 0 if not $$rs{'fileList'}->decodeDone and $rs->getChunk(length($$rs{'chunkData'}) + 1) < 0
758 0 0 unless defined $end
761 0 0 unless defined $f
762 0 0 if $$rs{'clientCharset'} ne ''
766 0 0 if ($$rs{'doPartial'} and $$rs{'fileList'}->flagGet($n))
773 0 0 if (($$f{'mode'} & 61440) != 32768) { }
0 0 elsif (defined $$f{'hlink'} and not $$f{'hlink_self'}) { }
777 0 0 if (($$f{'mode'} & 61440) == 16384) { }
778 0 0 if ($$rs{'fio'}->makePath($f))
783 0 0 if ($$rs{'fio'}->makeSpecial($f))
789 0 0 if ($$rs{'fio'}->makeHardLink($f, 0))
799 0 0 $phase == 0 ? :
804 0 0 if $phase == 0
806 0 0 if ($$rs{'logLevel'} >= 2)
811 0 0 if (@{$$rs{'doList'};})
814 0 0 unless defined $f
815 0 0 if $$rs{'clientCharset'} ne ''
818 0 0 if ($$rs{'doPartial'} and $$rs{'fileList'}->flagGet($n))
819 0 0 if $$rs{'logLevel'} >= 3 and ($$f{'mode'} & 61440) == 32768
830 0 0 if (not $ignoreAttr and $phase == 0 and $$f{'size'} == $$attr{'size'} and $$f{'mtime'} == $$attr{'mtime'} and !$$rs{'rsyncOpts'}{'perms'} || $$f{'mode'} == $$attr{'mode'} and !$$rs{'rsyncOpts'}{'group'} || $$f{'gid'} == $$attr{'gid'} and !$$rs{'rsyncOpts'}{'owner'} || $$f{'uid'} == $$attr{'uid'} and !$$rs{'rsyncOpts'}{'hard-links'} || $$f{'hlink_self'} == $$attr{'hlink_self'})
839 0 0 if $$rs{'logLevel'} >= 3 and ($$f{'mode'} & 61440) == 32768
846 0 0 if (($$f{'mode'} & 61440) != 32768) { }
0 0 elsif ($$rs{'rsyncOpts'}{'hard-links'} and defined $$f{'hlink'} and not $$f{'hlink_self'}) { }
0 0 elsif (not defined $$attr{'mode'} or ($$attr{'mode'} & 61440) != 32768) { }
0 0 elsif (($blkSize = $$rs{'fio'}->csumStart($f, 0, $$rs{'blockSize'}, $phase)) < 0) { }
865 0 0 if defined $$attr{'mode'}
866 0 0 if $$rs{'logLevel'} >= 5
874 0 0 if $$rs{'logLevel'} >= 5
887 0 0 if ($blkSize <= 0)
889 0 0 if $blkSize < $$rs{'blockSize'}
891 0 0 if $blkSize > 16384
895 0 0 if $$rs{'logLevel'} >= 5
897 0 0 $blkCnt > 0 ? :
903 0 0 $blkCnt > 256 ? :
909 0 0 if $$rs{'abort'}
916 0 0 if ($nWrite > 0 and not $$rs{'abort'})
922 0 0 if (not @{$$rs{'doList'};} and $phase == 1 and $$rs{'childDone'} == 1)
936 0 0 if $$rs{'abort'}
937 0 0 $phase == 1 && !@{$$rs{'doList'};} ? :
939 0 0 if ($phase == 0)
957 0 0 unless defined $$rs{'childFh'}
958 0 0 if $$rs{'logLevel'} >= 12
964 0 0 unless vec $rout, fileno $$rs{'childFh'}, 1
968 0 0 if $nbytes > 0
969 0 0 if ($nbytes <= 0)
972 0 0 if $$rs{'logLevel'} >= 1
992 0 0 if $$rs{'logLevel'} >= 20
994 0 0 if ($mesg =~ /^done$/) { }
0 0 elsif ($mesg =~ /^stats (\d+) (\d+) (\d+) (\d+) (.*)/) { }
0 0 elsif ($mesg =~ /^exit/) { }
0 0 elsif ($mesg =~ /^redo (\d+)/) { }
0 0 elsif ($mesg =~ /^log (.*)/) { }
995 0 0 if $$rs{'logLevel'} >= 4
1004 0 0 if $$rs{'logLevel'} >= 4
1009 0 0 if $$rs{'logLevel'} >= 4
1012 0 0 if ($$rs{'phase'} == 1) { }
1017 0 0 if $$rs{'logLevel'} >= 4
1030 0 0 $phase == 0 ? :
1037 0 0 if $rs->getChunk(4) < 0
1040 0 0 if ($fileNum == 4294967295)
1041 0 0 if $$rs{'logLevel'} >= 2
1046 0 0 unless defined $f
1047 0 0 if $$rs{'clientCharset'} ne ''
1049 0 0 if ($$rs{'protocol_version'} >= 27) { }
1050 0 0 if $rs->getChunk(16) < 0
1056 0 0 if $rs->getChunk(12) < 0
1060 0 0 if $$rs{'logLevel'} >= 5
1071 0 0 if ($$f{'mode'} & 61440) != 32768
1074 0 0 $blkCnt > 0 ? :
1079 0 0 $cnt > 256 ? :
1081 0 0 if $fileSame
1086 0 0 if $csum ne $csumRem
1087 0 0 if $$rs{'logLevel'} >= 8
1102 0 0 if ($fileSame) { }
1103 0 0 if $$rs{'logLevel'} >= 3
1117 0 0 if not defined $dataR or length $$dataR == 0
1142 0 0 if $rs->getChunk(4) < 0
1145 0 0 if $fileNum == 4294967295
1150 0 0 if $phase == 0
1154 0 0 unless defined $f
1155 0 0 if $$rs{'clientCharset'} ne ''
1157 0 0 if ($$rs{'protocol_version'} >= 27) { }
1158 0 0 if $rs->getChunk(16) < 0
1164 0 0 if $rs->getChunk(12) < 0
1168 0 0 if $$rs{'logLevel'} >= 5
1174 0 0 if $rs->getChunk(4) < 0
1177 0 0 if ($len == 0) { }
0 0 elsif ($len > 2147483648) { }
1178 0 0 if $rs->getChunk(16) < 0
1183 0 0 if ($ret == 1)
1184 0 0 if ($phase == 1)
1188 0 0 if $$rs{'logLevel'} >= 2
1197 0 0 if $rs->getChunk($len) < 0
1207 0 0 if $phase == 1
1212 0 0 if $phase == 0
1214 0 0 if $$rs{'logLevel'} >= 2
1219 0 0 if ($phase == 1 and $$rs{'rsyncOpts'}{'hard-links'})
1223 0 0 unless defined $f
1224 0 0 if not defined $$f{'hlink'} or $$f{'hlink_self'}
1225 0 0 if ($$rs{'clientCharset'} ne '')
1229 0 0 if ($$rs{'fio'}->makeHardLink($f, 1))
1250 0 0 if ($$rs{'rsyncOpts'}{'hard-links'})
1276 0 0 if ($$rs{'logLevel'} >= 4)
1281 0 0 unless defined $f
1282 0 0 if $$rs{'clientCharset'} ne ''
1293 0 0 if ($$rs{'protocol_version'} >= 27) { }
1318 0 0 if defined $timeout
1320 0 0 if defined $$rs{'childPID'}
1322 0 0 if $$rs{'timeout'}
1331 0 0 if ($rs->getChunk(12) >= 0)
1336 0 0 if (defined $fh) { }
1357 0 0 if $$rs{'abort'}
1358 0 0 if $$rs{'timeout'}
1360 0 0 if $$rs{'abort'}
1364 0 0 if $$rs{'abort'}
1366 0 0 if (length $data == 0)
1367 0 0 if $$rs{'logLevel'} >= 1
1368 0 0 if $$rs{'abort'}
1370 0 0 if $$rs{'logLevel'} >= 1
1377 0 0 if ($$rs{'logLevel'} >= 10)
1390 0 0 if $rs->getData(4) < 0
1395 0 0 if $rs->getData($len) < 0
1398 0 0 if ($code == 0) { }
1402 0 0 if $$rs{'clientCharset'} ne ''
1405 0 0 if ($code == 1 or $d =~ /^file has vanished: /)
1419 0 0 if ($$rs{'readData'} =~ /(.*?)[\n\r]+(.*)/s)
1423 0 0 if $rs->getData(length($$rs{'readData'}) + 1) < 0
1432 0 0 if $flush or length $$rs{'writeBuf'} > 32768
1439 0 0 unless defined $$rs{'stats'}{'parentStats'}
1450 0 0 if $$rs{'abort'}
1451 0 0 if $$rs{'timeout'}
1455 0 0 if defined $$rs{'childFh'}
1461 0 0 if (defined $$rs{'childFh'} and vec $rout, fileno $$rs{'childFh'}, 1)
1465 0 0 if $$rs{'abort'}
1466 0 0 if (vec $rwrite, fileno $$rs{'fh'}, 1)
1468 0 0 if ($n <= 0)
1472 0 0 if ($$rs{'logLevel'} >= 10)
1496 0 0 if $str eq ''