diff options
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/cycle | 4 | ||||
-rwxr-xr-x | tests/rm/dangling-symlink | 4 | ||||
-rwxr-xr-x | tests/rm/deep-1 | 2 | ||||
-rwxr-xr-x | tests/rm/dir-no-w | 4 | ||||
-rwxr-xr-x | tests/rm/dir-nonrecur | 4 | ||||
-rwxr-xr-x | tests/rm/dot-rel | 4 | ||||
-rwxr-xr-x | tests/rm/empty-inacc | 2 | ||||
-rwxr-xr-x | tests/rm/f-1 | 4 | ||||
-rwxr-xr-x | tests/rm/fail-2eperm | 4 | ||||
-rwxr-xr-x | tests/rm/hash | 4 | ||||
-rwxr-xr-x | tests/rm/i-1 | 2 | ||||
-rwxr-xr-x | tests/rm/i-no-r | 4 | ||||
-rwxr-xr-x | tests/rm/ignorable | 2 | ||||
-rwxr-xr-x | tests/rm/inaccessible | 8 | ||||
-rwxr-xr-x | tests/rm/interactive-always | 2 | ||||
-rwxr-xr-x | tests/rm/interactive-once | 2 | ||||
-rwxr-xr-x | tests/rm/ir-1 | 2 | ||||
-rwxr-xr-x | tests/rm/isatty | 4 | ||||
-rwxr-xr-x | tests/rm/no-give-up | 6 | ||||
-rwxr-xr-x | tests/rm/r-1 | 2 | ||||
-rwxr-xr-x | tests/rm/r-2 | 2 | ||||
-rwxr-xr-x | tests/rm/r-3 | 6 | ||||
-rwxr-xr-x | tests/rm/r-4 | 4 | ||||
-rwxr-xr-x | tests/rm/readdir-bug | 2 | ||||
-rwxr-xr-x | tests/rm/rm1 | 4 | ||||
-rwxr-xr-x | tests/rm/rm2 | 2 | ||||
-rwxr-xr-x | tests/rm/rm3 | 4 | ||||
-rwxr-xr-x | tests/rm/rm4 | 4 | ||||
-rwxr-xr-x | tests/rm/rm5 | 4 | ||||
-rwxr-xr-x | tests/rm/sunos-1 | 4 | ||||
-rwxr-xr-x | tests/rm/unread2 | 4 | ||||
-rwxr-xr-x | tests/rm/unread3 | 16 |
32 files changed, 63 insertions, 63 deletions
diff --git a/tests/rm/cycle b/tests/rm/cycle index f77f90df9..22936ee00 100755 --- a/tests/rm/cycle +++ b/tests/rm/cycle @@ -1,7 +1,7 @@ #!/bin/sh # rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle. -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink index 388ca1d07..17794e0d1 100755 --- a/tests/rm/dangling-symlink +++ b/tests/rm/dangling-symlink @@ -4,7 +4,7 @@ # But for fileutils-4.1.9, it would do the former and # for fileutils-4.1.10 the latter. -# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index b5ae89754..41928862b 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -33,7 +33,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 umask 022 diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w index 6dd04aa3e..27aba6aa9 100755 --- a/tests/rm/dir-no-w +++ b/tests/rm/dir-no-w @@ -2,7 +2,7 @@ # rm (without -r) must give a diagnostic for any directory. # It must not prompt, even if that directory is unwritable. -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur index fd10ba936..5b09821c0 100755 --- a/tests/rm/dir-nonrecur +++ b/tests/rm/dir-nonrecur @@ -2,7 +2,7 @@ # Ensure that `rm dir' (i.e., without --recursive) gives a reasonable # diagnostic when failing. -# Copyright (C) 2005 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel index 41bea4aaa..2ffa49e4f 100755 --- a/tests/rm/dot-rel +++ b/tests/rm/dot-rel @@ -2,7 +2,7 @@ # Use rm -r to remove two non-empty dot-relative directories. # This would have failed between 2004-10-18 and 2004-10-21. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc index 5db86ad42..bc040689d 100755 --- a/tests/rm/empty-inacc +++ b/tests/rm/empty-inacc @@ -27,7 +27,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/f-1 b/tests/rm/f-1 index bdd41d7ec..33041a350 100755 --- a/tests/rm/f-1 +++ b/tests/rm/f-1 @@ -1,7 +1,7 @@ #!/bin/sh # Test "rm -f" with a nonexistent file. -# Copyright (C) 1997, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 2002, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 test_failure=0 diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index d53747374..076195034 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -2,7 +2,7 @@ # Like fail-eperm, but the failure must be for a file encountered # while trying to remove the containing directory with the sticky bit set. -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/hash b/tests/rm/hash index a07a2b1d0..036240c8c 100755 --- a/tests/rm/hash +++ b/tests/rm/hash @@ -3,7 +3,7 @@ # Before then, rm would fail occasionally, sometimes via # a failed assertion, others with a seg fault. -# Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 || exit $?; exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 || exit $?; exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/i-1 b/tests/rm/i-1 index 0e606a2ab..214292bc4 100755 --- a/tests/rm/i-1 +++ b/tests/rm/i-1 @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 test_failure=0 diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r index c0a0a8104..b23ff5e62 100755 --- a/tests/rm/i-no-r +++ b/tests/rm/i-no-r @@ -3,7 +3,7 @@ # recurse into directory DIR. rm -i (without -r) must fail in that case. # Fixed in coreutils-4.5.2. -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/ignorable b/tests/rm/ignorable index 7c2b2ba9a..6036dd945 100755 --- a/tests/rm/ignorable +++ b/tests/rm/ignorable @@ -27,7 +27,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible index 08c5e3245..721210a2a 100755 --- a/tests/rm/inaccessible +++ b/tests/rm/inaccessible @@ -39,7 +39,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -56,9 +56,9 @@ fail=0 p=$pwd/$tmp set +x -(cd no-access; chmod 0 . && rm -r $p/abs1 rel $p/abs2) 2> out && fail=1 -test -d $p/abs1 && fail=1 -test -d $p/abs2 && fail=1 +(cd no-access; chmod 0 . && rm -r "$p"/abs1 rel "$p"/abs2) 2> out && fail=1 +test -d "$p"/abs1 && fail=1 +test -d "$p"/abs2 && fail=1 cat <<\EOF > exp || fail=1 rm: cannot remove `rel': Permission denied diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always index 6dc623161..7b8166484 100755 --- a/tests/rm/interactive-always +++ b/tests/rm/interactive-always @@ -29,7 +29,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once index 9643eff90..9325e8e70 100755 --- a/tests/rm/interactive-once +++ b/tests/rm/interactive-once @@ -29,7 +29,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/ir-1 b/tests/rm/ir-1 index 4a84ecdf0..71f142004 100755 --- a/tests/rm/ir-1 +++ b/tests/rm/ir-1 @@ -28,7 +28,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 test_failure=0 diff --git a/tests/rm/isatty b/tests/rm/isatty index 488788a5e..202dc0195 100755 --- a/tests/rm/isatty +++ b/tests/rm/isatty @@ -1,7 +1,7 @@ #!/bin/sh # Make sure `chown 0 f; rm f' prompts before removing f. -# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up index cabfc8840..b85132bdb 100755 --- a/tests/rm/no-give-up +++ b/tests/rm/no-give-up @@ -2,7 +2,7 @@ # With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly # give up too early under some conditions. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ PRIV_CHECK_ARG=require-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -47,7 +47,7 @@ fi fail=0 # This must fail, since `.' is not writable by $NON_ROOT_USERNAME. -setuidgid $NON_ROOT_USERNAME env PATH=$PATH rm -rf d 2>/dev/null && fail=1 +setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm -rf d 2>/dev/null && fail=1 # d must remain. test -d d || fail=1 diff --git a/tests/rm/r-1 b/tests/rm/r-1 index 6c03454c2..7b6f187fd 100755 --- a/tests/rm/r-1 +++ b/tests/rm/r-1 @@ -30,7 +30,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/r-2 b/tests/rm/r-2 index 5064413f6..68e61874e 100755 --- a/tests/rm/r-2 +++ b/tests/rm/r-2 @@ -28,7 +28,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 || exit $?; exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 || exit $?; exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/r-3 b/tests/rm/r-3 index 0bd6c4f85..0d85f64d9 100755 --- a/tests/rm/r-3 +++ b/tests/rm/r-3 @@ -1,7 +1,7 @@ #!/bin/sh # Create and remove a directory with more than 254 files. -# Copyright (C) 1997, 2001, 2002, 2003, 2004 Free Software Foundation, +# Copyright (C) 1997, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify @@ -33,7 +33,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_fail=0 @@ -51,7 +51,7 @@ done test -f 0a || framework_fail=1 test -f by || framework_fail=1 -cd $pwd || framework_fail=1 +cd "$pwd" || framework_fail=1 if test $framework_fail = 1; then echo 'failure in testing framework' diff --git a/tests/rm/r-4 b/tests/rm/r-4 index 087e16e9c..355133598 100755 --- a/tests/rm/r-4 +++ b/tests/rm/r-4 @@ -26,7 +26,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -34,7 +34,7 @@ mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 touch a || framework_failure=1 -cd $pwd || framework_failure=1 +cd "$pwd" || framework_failure=1 if test $framework_failure = 1; then echo 'failure in testing framework' diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug index 7298c3868..a82aa955e 100755 --- a/tests/rm/readdir-bug +++ b/tests/rm/readdir-bug @@ -26,7 +26,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/rm1 b/tests/rm/rm1 index 3a73b0a35..8987cd2d5 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -1,7 +1,7 @@ #!/bin/sh # exercise another small part of remove.c -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/rm2 b/tests/rm/rm2 index 7fd5c1716..c64a9f352 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -30,7 +30,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/rm3 b/tests/rm/rm3 index a4c7b68d7..b3caf49ea 100755 --- a/tests/rm/rm3 +++ b/tests/rm/rm3 @@ -1,7 +1,7 @@ #!/bin/sh # exercise another small part of remove.c -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/rm4 b/tests/rm/rm4 index 434ab2d8d..944aaec38 100755 --- a/tests/rm/rm4 +++ b/tests/rm/rm4 @@ -1,7 +1,7 @@ #!/bin/sh # ensure that `rm dir' fails without --recursive -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/rm5 b/tests/rm/rm5 index a08f93f13..297d02afc 100755 --- a/tests/rm/rm5 +++ b/tests/rm/rm5 @@ -1,7 +1,7 @@ #!/bin/sh # a basic test of rm -ri -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1 index abee7a18c..1f6a09cd3 100755 --- a/tests/rm/sunos-1 +++ b/tests/rm/sunos-1 @@ -1,7 +1,7 @@ #!/bin/sh # Make sure that rm -r '' fails. -# Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 1998, 2002, 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/unread2 b/tests/rm/unread2 index 403a89198..e67c9ae38 100755 --- a/tests/rm/unread2 +++ b/tests/rm/unread2 @@ -1,7 +1,7 @@ #!/bin/sh # exercise one small part of remove.c -# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/rm/unread3 b/tests/rm/unread3 index 3d359a770..c8af5cfe7 100755 --- a/tests/rm/unread3 +++ b/tests/rm/unread3 @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that rm works even from an unreadable working directory. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -47,16 +47,16 @@ chmod u=x,go= . t=$pwd/$tmp # With coreutils-5.2.1, this would get a failed assertion. -rm -r $t/a $t/b || fail=1 +rm -r "$t"/a "$t"/b || fail=1 # With coreutils-5.2.1, this would get the following: # rm: cannot get current directory: Permission denied # rm: failed to return to initial working directory: Bad file descriptor -rm -r $t/d $t/e || fail=1 +rm -r "$t"/d "$t"/e || fail=1 -test -d $t/a && fail=1 -test -d $t/b && fail=1 -test -d $t/d && fail=1 -test -d $t/e && fail=1 +test -d "$t"/a && fail=1 +test -d "$t"/b && fail=1 +test -d "$t"/d && fail=1 +test -d "$t"/e && fail=1 (exit $fail); exit $fail |