2 # Make sure that the copying code used in an inter-partition
3 # move unlinks a destination symlink before opening it.
5 if test "$VERBOSE" = yes; then
11 .
$srcdir/..
/envvar-check
13 if test -z "$other_partition_tmpdir"; then
17 rem_file
="$other_partition_tmpdir/file"
18 rem_symlink
="$other_partition_tmpdir/symlink"
23 trap 'rm -fr $file $other_partition_tmpdir; exit $fail' 0 1 2 3 15
26 rm -f $file || framework_failure
=1
27 echo local > $file || framework_failure
=1
28 echo remote
> $rem_file || framework_failure
=1
29 ln -s $rem_file $rem_symlink || framework_failure
=1
31 if test $framework_failure = 1; then
32 echo 'failure in testing framework'
36 # This mv command should succeed, unlinking the symlink
38 mv $file $rem_symlink || fail
=1
40 # Make sure $file is gone.
41 test -f $file && fail
=1
43 # Make sure $rem_file is unmodified.
44 test `cat $rem_file` = remote || fail
=1