print_ver_ cp
suffix=.b
-file=b1.$$
+file=F
file_backup="$file$suffix"
-temp_files="$file $file_backup"
-rm -f $temp_files
echo test > $file || fail=1
&& remove_these_sed='/^0 -[bf]*l .*sl1 ->/d' \
|| remove_these_sed='/^ELIDE NO TEST OUTPUT/d'
-actual=actual-$$
-expected=expected-$$
-
-exec 3>&1 1> $actual
+exec 3>&1 1> actual
# FIXME: This should be bigger: like more than 8k
contents=XYZ
echo
done
-cat <<\EOF | sed "$remove_these_sed" > $expected
+cat <<\EOF | sed "$remove_these_sed" > expected
1 [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
1 -d [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
1 -f [cp: `foo' and `symlink' are the same file] (foo symlink -> foo)
exec 1>&3 3>&-
-compare $expected $actual 1>&2 || fail=1
+compare expected actual 1>&2 || fail=1
Exit $fail
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ dd
-tmp_in=dd-in.$$
-tmp_in2=dd-in2.$$
-tmp_sym=dd-sym.$$
-tmp_out=dd-out.$$
+tmp_in=dd-in
+tmp_in2=dd-in2
+tmp_sym=dd-sym
+tmp_out=dd-out
warn=0
echo data > $tmp_in || framework_failure
# Exercise those four cases for each of
# cp and mv, with lots of combinations of options.
-actual=actual-$$
-expected=expected-$$
-
-exec 1> $actual
+exec 1> actual
# FIXME: This should be bigger: like more than 8k
contents=XYZ
test $fail = 1 &&
{ (exit 1); exit; }
-cat <<\EOF > $expected
+cat <<\EOF > expected
1 cp loc_reg rem_sl
[cp: `loc_reg' and `rem_sl' are the same file]
(loc_reg) (rem_sl -> dir/loc_reg)
EOF
# Redirect to stderr, since stdout is already taken.
-compare $expected $actual 1>&2 || fail=1
+compare expected actual 1>&2 || fail=1
Exit $fail
rem_file="$other_partition_tmpdir/file"
rem_symlink="$other_partition_tmpdir/symlink"
-file=to-sym-$$
+file=to-sym
-
-rm -f $file || framework_failure
echo local > $file || framework_failure
echo remote > $rem_file || framework_failure
ln -s $rem_file $rem_symlink || framework_failure
print_ver_ touch
skip_if_root_
-d1=no-$$
-dir=/$d1/such-dir
-# Ensure that $d1 doesn't already exist.
-ls -d $d1 2> /dev/null && framework_failure
+file=/no-such-dir/file
-
-touch $dir > out 2>&1 && fail=1
+touch $file > out 2>&1 && fail=1
cat <<EOF > exp
-touch: cannot touch \`$dir': No such file or directory
+touch: cannot touch \`$file': No such file or directory
EOF
compare out exp || fail=1