2 # Ensure that cp --link --no-dereference works properly
4 if test "$VERBOSE" = yes; then
10 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
11 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
12 trap '(exit $?); exit $?' 1 2 13 15
15 mkdir -p $tmp || framework_failure=1
16 cd $tmp || framework_failure=1
18 ln -s no-such-file dangling-slink || framework_failure=1
20 if test $framework_failure = 1; then
21 echo "$0: failure in testing framework" 1>&2
27 # Prior to coreutils-6.0, this would fail on non-Linux kernels,
28 # with link being applied to the dangling symlink.
29 cp --link --no-dereference dangling-slink d2 || fail=1
31 (exit $fail); exit $fail