Diff for /embedaddon/rsync/testsuite/hardlinks.test between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/17 15:09:30 version 1.1.1.2, 2013/10/14 07:51:15
Line 11 Line 11
   
 . "$suitedir/rsync.fns"  . "$suitedir/rsync.fns"
   
SSH="$scratchdir/src/support/lsh"SSH="$scratchdir/src/support/lsh.sh"
   
 outfile="$scratchdir/rsync.out"  outfile="$scratchdir/rsync.out"
   
Line 33  ln "$name2" "$name3" || fail "Can't create hardlink" Line 33  ln "$name2" "$name3" || fail "Can't create hardlink"
 cp "$name2" "$name4" || fail "Can't copy file"  cp "$name2" "$name4" || fail "Can't copy file"
 cat $srcdir/*.c >"$fromdir/text"  cat $srcdir/*.c >"$fromdir/text"
   
checkit "$RSYNC -aHivv '$fromdir/' '$todir/'" "$fromdir" "$todir"checkit "$RSYNC -aHivv --debug=HLINK5 '$fromdir/' '$todir/'" "$fromdir" "$todir"
   
 echo "extra extra" >>"$todir/name1"  echo "extra extra" >>"$todir/name1"
   
checkit "$RSYNC -aHivv --no-whole-file '$fromdir/' '$todir/'" "$fromdir" "$todir"checkit "$RSYNC -aHivv --debug=HLINK5 --no-whole-file '$fromdir/' '$todir/'" "$fromdir" "$todir"
   
 # Add a new link in a new subdirectory to test that we don't try to link  # Add a new link in a new subdirectory to test that we don't try to link
 # the files before the directory gets created.  We also create a bunch of  # the files before the directory gets created.  We also create a bunch of
Line 56  done Line 56  done
 ln "$name1" "$fromdir/subdir/down/deep/new-file"  ln "$name1" "$fromdir/subdir/down/deep/new-file"
 rm "$todir/text"  rm "$todir/text"
   
checkit "$RSYNC -aHivve '$SSH' --rsync-path='$RSYNC' '$fromdir/' localhost:'$todir/'" "$fromdir" "$todir"checkit "$RSYNC -aHivve '$SSH' --debug=HLINK5 --rsync-path='$RSYNC' '$fromdir/' localhost:'$todir/'" "$fromdir" "$todir"
   
 # Do some duplicate copies using --link-dest and --copy-dest to test that  # Do some duplicate copies using --link-dest and --copy-dest to test that
 # we hard-link all locally-inherited items.  # we hard-link all locally-inherited items.
checkit "$RSYNC -aHivv --link-dest='$todir' '$fromdir/' '$chkdir/'" "$todir" "$chkdir"checkit "$RSYNC -aHivv --debug=HLINK5 --link-dest='$todir' '$fromdir/' '$chkdir/'" "$todir" "$chkdir"
   
 rm -rf "$chkdir"  rm -rf "$chkdir"
checkit "$RSYNC -aHivv --copy-dest='$todir' '$fromdir/' '$chkdir/'" "$fromdir" "$chkdir"checkit "$RSYNC -aHivv --debug=HLINK5 --copy-dest='$todir' '$fromdir/' '$chkdir/'" "$fromdir" "$chkdir"
   
 # Create a hard link that has only one part in the hierarchy.  # Create a hard link that has only one part in the hierarchy.
 echo "This is another file" >"$fromdir/solo"  echo "This is another file" >"$fromdir/solo"
 ln "$fromdir/solo" "$chkdir/solo" || fail "Can't create hardlink"  ln "$fromdir/solo" "$chkdir/solo" || fail "Can't create hardlink"
   
 # Make sure that the checksum data doesn't slide due to an HLINK_BUMP() change.  # Make sure that the checksum data doesn't slide due to an HLINK_BUMP() change.
$RSYNC -aHivc "$fromdir/" "$chkdir/" | tee "$outfile"$RSYNC -aHivc --debug=HLINK5 "$fromdir/" "$chkdir/" | tee "$outfile"
 grep solo "$outfile" && test_fail "Erroneous copy of solo file occurred!"  grep solo "$outfile" && test_fail "Erroneous copy of solo file occurred!"
   
 # Make sure there's nothing wrong with sending a single file with -H  # Make sure there's nothing wrong with sending a single file with -H
 # enabled (this has broken twice so far, so we need this test).  # enabled (this has broken twice so far, so we need this test).
 rm -rf "$todir"  rm -rf "$todir"
$RSYNC -aHivv "$name1" "$todir/"$RSYNC -aHivv --debug=HLINK5 "$name1" "$todir/"
 diff $diffopt "$name1" "$todir" || test_fail "solo copy of name1 failed"  diff $diffopt "$name1" "$todir" || test_fail "solo copy of name1 failed"
   
 # The script would have aborted on error, so getting here means we've won.  # The script would have aborted on error, so getting here means we've won.

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>