Diff for /embedaddon/rsync/testsuite/devices.test between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2013/10/14 07:51:15 version 1.1.1.3, 2021/03/17 00:32:36
Line 16  outfile="$scratchdir/rsync.out" Line 16  outfile="$scratchdir/rsync.out"
   
 case $0 in  case $0 in
 *fake*)  *fake*)
    $RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"    $RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
     RSYNC="$RSYNC --fake-super"      RSYNC="$RSYNC --fake-super"
     TLS_ARGS="$TLS_ARGS --fake-super"      TLS_ARGS="$TLS_ARGS --fake-super"
     case "$HOST_OS" in      case "$HOST_OS" in
Line 50  echo "$mode $maj,$min 0:0" > rsync.%stat Line 50  echo "$mode $maj,$min 0:0" > rsync.%stat
 EOF  EOF
         }          }
         ;;          ;;
       freebsd*)
           mknod() {
               fn="$1"
               case "$2" in
               p) mode=10644 ;;
               c) mode=20644 ;;
               b) mode=60644 ;;
               esac
               maj="${3:-0}"
               min="${4:-0}"
               touch "$fn"
               setextattr -h user "rsync.%stat" "$mode $maj,$min 0:0" "$fn"
           }
           ;;
     *)      *)
         mknod() {          mknod() {
             fn="$1"              fn="$1"
Line 67  EOF Line 81  EOF
     esac      esac
     ;;      ;;
 *)  *)
    case `get_testuid` in    my_uid=`get_testuid`
    '') ;; # If "id" failed, try to continue...    root_uid=`get_rootuid`
    0)  ;;    if test x"$my_uid" = x; then
    *)  if [ -e "$FAKEROOT_PATH" ]; then        : # If "id" failed, try to continue...
     elif test x"$my_uid" != x"$root_uid"; then
         if [ -e "$FAKEROOT_PATH" ]; then
             echo "Let's try re-running the script under fakeroot..."              echo "Let's try re-running the script under fakeroot..."
             exec "$FAKEROOT_PATH" "$SHELL_PATH" $RUNSHFLAGS "$0"              exec "$FAKEROOT_PATH" "$SHELL_PATH" $RUNSHFLAGS "$0"
         fi          fi
         test_skipped "Rsync needs root/fakeroot for device tests"          test_skipped "Rsync needs root/fakeroot for device tests"
        ;;    fi
    esac 
     ;;      ;;
 esac  esac
   
 # TODO: Need to test whether hardlinks are possible on this OS/filesystem  # TODO: Need to test whether hardlinks are possible on this OS/filesystem
   
   $RSYNC --version | grep "[, ] hardlink-special" >/dev/null && CAN_HLINK_SPECIAL=yes || CAN_HLINK_SPECIAL=no
   
 mkdir "$fromdir"  mkdir "$fromdir"
 mkdir "$todir"  mkdir "$todir"
 mknod "$fromdir/char" c 41 67  || test_skipped "Can't create char device node"  mknod "$fromdir/char" c 41 67  || test_skipped "Can't create char device node"
Line 90  mknod "$fromdir/char3" c 42 69  || test_skipped "Can't Line 107  mknod "$fromdir/char3" c 42 69  || test_skipped "Can't
 mknod "$fromdir/block" b 42 69 || test_skipped "Can't create block device node"  mknod "$fromdir/block" b 42 69 || test_skipped "Can't create block device node"
 mknod "$fromdir/block2" b 42 73 || test_skipped "Can't create block device node"  mknod "$fromdir/block2" b 42 73 || test_skipped "Can't create block device node"
 mknod "$fromdir/block3" b 105 73 || test_skipped "Can't create block device node"  mknod "$fromdir/block3" b 105 73 || test_skipped "Can't create block device node"
ln "$fromdir/block3" "$fromdir/block3.5|| echo "Skipping hard-linked device test..."if test "$CAN_HLINK_SPECIAL" = yes; then
     ln "$fromdir/block3" "$fromdir/block3.5"
 else
     echo "Skipping hard-linked device test..."
 fi
 mkfifo "$fromdir/fifo" || mknod "$fromdir/fifo" p || test_skipped "Can't run mkfifo"  mkfifo "$fromdir/fifo" || mknod "$fromdir/fifo" p || test_skipped "Can't run mkfifo"
 # Work around time rounding/truncating issue by touching both files.  # Work around time rounding/truncating issue by touching both files.
 touch -r "$fromdir/block" "$fromdir/block" "$fromdir/block2"  touch -r "$fromdir/block" "$fromdir/block" "$fromdir/block2"
Line 132  cD$all_plus char2 Line 153  cD$all_plus char2
 cD$all_plus char3  cD$all_plus char3
 cS$all_plus fifo  cS$all_plus fifo
 EOT  EOT
if test ! -r "$fromdir/block3.5"; thenif test "$CAN_HLINK_SPECIAL" = no; then
     grep -v block3.5 <"$chkfile" >"$chkfile.new"      grep -v block3.5 <"$chkfile" >"$chkfile.new"
     mv "$chkfile.new" "$chkfile"      mv "$chkfile.new" "$chkfile"
 fi  fi
Line 144  echo "" Line 165  echo ""
 ( cd "$todir" && rsync_ls_lR . ) > "$tmpdir/ls-to"  ( cd "$todir" && rsync_ls_lR . ) > "$tmpdir/ls-to"
 diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to"  diff $diffopt "$tmpdir/ls-from" "$tmpdir/ls-to"
   
if test -r "$fromdir/block3.5"; thenif test "$CAN_HLINK_SPECIAL" = yes; then
     set -x      set -x
     $RSYNC -aii --link-dest="$todir" "$fromdir/" "$chkdir/" \      $RSYNC -aii --link-dest="$todir" "$fromdir/" "$chkdir/" \
         | tee "$outfile"          | tee "$outfile"

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


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