diff options
214 files changed, 726 insertions, 508 deletions
@@ -1,3 +1,221 @@ +2006-10-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * tests/sample-test: Quote variables containing absolute build + tree paths. In the cleanup trap, make sure `cd' succeeds before + `chmod'ing and `rm'ing the temporary files. + * tests/chgrp/basic: Likewise. + * tests/chgrp/deref: Likewise. + * tests/chgrp/no-x: Likewise. + * tests/chgrp/posix-H: Likewise. + * tests/chgrp/recurse: Likewise. + * tests/chmod/c-option: Likewise. + * tests/chmod/equal-x: Likewise. + * tests/chmod/equals: Likewise. + * tests/chmod/inaccessible: Likewise. + * tests/chmod/no-x: Likewise. + * tests/chmod/octal: Likewise. + * tests/chmod/setgid: Likewise. + * tests/chmod/umask-x: Likewise. + * tests/chmod/usage: Likewise. + * tests/chown/basic: Likewise. + * tests/chown/deref: Likewise. + * tests/chown/separator: Likewise. + * tests/cp/acl: Likewise. + * tests/cp/backup-1: Likewise. + * tests/cp/backup-dir: Likewise. + * tests/cp/backup-is-src: Likewise. + * tests/cp/cp-HL: Likewise. + * tests/cp/cp-deref: Likewise. + * tests/cp/cp-i: Likewise. + * tests/cp/cp-mv-backup: Likewise. + * tests/cp/cp-parents: Likewise. + * tests/cp/deref-slink: Likewise. + * tests/cp/dir-rm-dest: Likewise. + * tests/cp/dir-slash: Likewise. + * tests/cp/dir-vs-file: Likewise. + * tests/cp/fail-perm: Likewise. + * tests/cp/into-self: Likewise. + * tests/cp/link: Likewise. + * tests/cp/link-no-deref: Likewise. + * tests/cp/link-preserve: Likewise. + * tests/cp/no-deref-link1: Likewise. + * tests/cp/no-deref-link2: Likewise. + * tests/cp/no-deref-link3: Likewise. + * tests/cp/perm: Likewise. + * tests/cp/preserve-2: Likewise. + * tests/cp/r-vs-symlink: Likewise. + * tests/cp/same-file: Likewise. + * tests/cp/slink-2-slink: Likewise. + * tests/cp/sparse: Likewise. + * tests/cp/special-bits: Likewise. + * tests/cp/src-base-dot: Likewise. + * tests/cp/symlink-slash: Likewise. + * tests/dd/not-rewound: Likewise. + * tests/dd/skip-seek2: Likewise. + * tests/dd/unblock-sync: Likewise. + * tests/du/2g: Likewise. + * tests/du/8gb: Likewise. + * tests/du/basic: Likewise. + * tests/du/deref: Likewise. + * tests/du/deref-args: Likewise. + * tests/du/exclude: Likewise. + * tests/du/fd-leak: Likewise. + * tests/du/hard-link: Likewise. + * tests/du/inaccessible-cwd: Likewise. + * tests/du/long-from-unreadable: Likewise. + * tests/du/long-sloop: Likewise. + * tests/du/no-deref: Likewise. + * tests/du/no-x: Likewise. + * tests/du/restore-wd: Likewise. + * tests/du/slash: Likewise. + * tests/du/slink: Likewise. + * tests/du/trailing-slash: Likewise. + * tests/du/two-args: Likewise. + * tests/fmt/long-line: Likewise. + * tests/install/basic-1: Likewise. + * tests/install/create-leading: Likewise. + * tests/install/d-slashdot: Likewise. + * tests/install/trap: Likewise. + * tests/ln/misc: Likewise. + * tests/ln/target-1: Likewise. + * tests/ls/color-dtype-dir: Likewise. + * tests/ls/dangle: Likewise. + * tests/ls/dired: Likewise. + * tests/ls/file-type: Likewise. + * tests/ls/follow-slink: Likewise. + * tests/ls/infloop: Likewise. + * tests/ls/inode: Likewise. + * tests/ls/m-option: Likewise. + * tests/ls/no-arg: Likewise. + * tests/ls/recursive: Likewise. + * tests/ls/rt-1: Likewise. + * tests/ls/stat-dtype: Likewise. + * tests/ls/stat-failed: Likewise. + * tests/ls/stat-vs-dirent: Likewise. + * tests/misc/cat-proc: Likewise. + * tests/misc/close-stdout: Likewise. + * tests/misc/csplit: Likewise. + * tests/misc/date-sec: Likewise. + * tests/misc/false-status: Likewise. + * tests/misc/head-c: Likewise. + * tests/misc/head-pos: Likewise. + * tests/misc/mknod: Likewise. + * tests/misc/nl: Likewise. + * tests/misc/nohup: Likewise. + * tests/misc/pathchk1: Likewise. + * tests/misc/printf: Likewise. + * tests/misc/printf-hex: Likewise. + * tests/misc/pwd-long: Likewise. + * tests/misc/shuf: Likewise. + * tests/misc/sort-rand: Likewise. + * tests/misc/split-a: Likewise. + * tests/misc/split-fail: Likewise. + * tests/misc/split-l: Likewise. + * tests/misc/stat-fmt: Likewise. + * tests/misc/tac-continue: Likewise. + * tests/misc/wc-files0: Likewise. + * tests/mkdir/concurrent-1: Likewise. + * tests/mkdir/p-1: Likewise. + * tests/mkdir/p-2: Likewise. + * tests/mkdir/p-3: Likewise. + * tests/mkdir/p-slashdot: Likewise. + * tests/mkdir/p-thru-slink: Likewise. + * tests/mkdir/p-v: Likewise. + * tests/mkdir/parents: Likewise. + * tests/mkdir/perm: Likewise. + * tests/mkdir/t-slash: Likewise. + * tests/mv/acl: Likewise. + * tests/mv/atomic: Likewise. + * tests/mv/backup-dir: Likewise. + * tests/mv/childproof: Likewise. + * tests/mv/diag: Likewise. + * tests/mv/dir-file: Likewise. + * tests/mv/dir2dir: Likewise. + * tests/mv/dup-source: Likewise. + * tests/mv/hard-2: Likewise. + * tests/mv/hard-3: Likewise. + * tests/mv/hard-4: Likewise. + * tests/mv/hard-link-1: Likewise. + * tests/mv/hard-verbose: Likewise. + * tests/mv/i-2: Likewise. + * tests/mv/i-3: Likewise. + * tests/mv/i-4: Likewise. + * tests/mv/i-5: Likewise. + * tests/mv/i-link-no: Likewise. + * tests/mv/into-self-4: Likewise. + * tests/mv/leak-fd: Likewise. + * tests/mv/mv-special-1: Likewise. + * tests/mv/no-target-dir: Likewise. + * tests/mv/part-fail: Likewise. + * tests/mv/part-hardlink: Likewise. + * tests/mv/part-rename: Likewise. + * tests/mv/part-symlink: Likewise. + * tests/mv/partition-perm: Likewise. + * tests/mv/perm-1: Likewise. + * tests/mv/reply-no: Likewise. + * tests/mv/trailing-slash: Likewise. + * tests/mv/update: Likewise. + * tests/od/od-N: Likewise. + * tests/od/x8: Likewise. + * tests/readlink/can-e: Likewise. + * tests/readlink/can-f: Likewise. + * tests/readlink/can-m: Likewise. + * tests/readlink/rl-1: Likewise. + * tests/rm/cycle: Likewise. + * tests/rm/dangling-symlink: Likewise. + * tests/rm/deep-1: Likewise. + * tests/rm/dir-no-w: Likewise. + * tests/rm/dir-nonrecur: Likewise. + * tests/rm/dot-rel: Likewise. + * tests/rm/empty-inacc: Likewise. + * tests/rm/f-1: Likewise. + * tests/rm/fail-2eperm: Likewise. + * tests/rm/hash: Likewise. + * tests/rm/i-1: Likewise. + * tests/rm/i-no-r: Likewise. + * tests/rm/ignorable: Likewise. + * tests/rm/inaccessible: Likewise. + * tests/rm/interactive-always: Likewise. + * tests/rm/interactive-once: Likewise. + * tests/rm/ir-1: Likewise. + * tests/rm/isatty: Likewise. + * tests/rm/no-give-up: Likewise. + * tests/rm/r-1: Likewise. + * tests/rm/r-2: Likewise. + * tests/rm/r-3: Likewise. + * tests/rm/r-4: Likewise. + * tests/rm/readdir-bug: Likewise. + * tests/rm/rm1: Likewise. + * tests/rm/rm2: Likewise. + * tests/rm/rm3: Likewise. + * tests/rm/rm4: Likewise. + * tests/rm/rm5: Likewise. + * tests/rm/sunos-1: Likewise. + * tests/rm/unread2: Likewise. + * tests/rm/unread3: Likewise. + * tests/rmdir/fail-perm: Likewise. + * tests/rmdir/t-slash: Likewise. + * tests/shred/exact: Likewise. + * tests/shred/remove: Likewise. + * tests/sum/sysv: Likewise. + * tests/tail-2/append-only: Likewise. + * tests/tail-2/assert: Likewise. + * tests/tail-2/assert-2: Likewise. + * tests/tail-2/big-4gb: Likewise. + * tests/tail-2/fflush: Likewise. + * tests/tail-2/infloop-1: Likewise. + * tests/tail-2/proc-ksyms: Likewise. + * tests/tail-2/start-middle: Likewise. + * tests/tail-2/tail-n0f: Likewise. + * tests/tee/basic: Likewise. + * tests/tee/dash: Likewise. + * tests/touch/fail-diag: Likewise. + * tests/touch/no-create-missing: Likewise. + * tests/touch/not-owner: Likewise. + * tests/touch/obsolescent: Likewise. + * tests/touch/read-only: Likewise. + * tests/touch/relative: Likewise. + 2006-10-21 Jim Meyering <jim@meyering.net> * NEWS: (cp --backup fix): Fix a typo. diff --git a/tests/chgrp/basic b/tests/chgrp/basic index 5cb8da82f..897900d00 100755 --- a/tests/chgrp/basic +++ b/tests/chgrp/basic @@ -30,7 +30,7 @@ fi pwd=`pwd` tmp=basic.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chgrp/deref b/tests/chgrp/deref index b15d0c380..413ae22f6 100755 --- a/tests/chgrp/deref +++ b/tests/chgrp/deref @@ -1,7 +1,7 @@ #!/bin/sh # see if chgrp can change the group of a symlink -# Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` tmp=slink.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x index d82002c61..b8ebed5f6 100755 --- a/tests/chgrp/no-x +++ b/tests/chgrp/no-x @@ -34,7 +34,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/chgrp/posix-H b/tests/chgrp/posix-H index 907b7da5e..b8d1a8efa 100755 --- a/tests/chgrp/posix-H +++ b/tests/chgrp/posix-H @@ -30,7 +30,7 @@ g2=$2 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/chgrp/recurse b/tests/chgrp/recurse index 23f040d34..871388c10 100755 --- a/tests/chgrp/recurse +++ b/tests/chgrp/recurse @@ -1,7 +1,7 @@ #!/bin/sh # ad-hoc tests of chgrp with -R and -H or -L and symlinks -# Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` tmp=recurse.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chmod/c-option b/tests/chmod/c-option index 0d73ca895..a27165ee4 100755 --- a/tests/chmod/c-option +++ b/tests/chmod/c-option @@ -1,7 +1,7 @@ #!/bin/sh # Verify that chmod's --changes (-c) option works. -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=c-option.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -36,7 +36,7 @@ framework_failure=0 cd $srcdir || framework_failure=1 abs_srcdir=`pwd` -cd $pwd || framework_failure=1 +cd "$pwd" || framework_failure=1 mkdir $tmp || framework_failure=1 cd $tmp || framework_failure=1 diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x index 191f6b6df..3e16ce528 100755 --- a/tests/chmod/equal-x +++ b/tests/chmod/equal-x @@ -1,7 +1,7 @@ #!/bin/sh # Test "chmod =x" and the like. -# Copyright (C) 1999, 2000, 2002, 2004, 2005 Free Software Foundation, +# Copyright (C) 1999, 2000, 2002, 2004, 2005, 2006 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify @@ -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/chmod/equals b/tests/chmod/equals index 152c0af3f..dfaad17e3 100755 --- a/tests/chmod/equals +++ b/tests/chmod/equals @@ -3,7 +3,7 @@ # Before fileutils-4.1.2, some of them didn't. # Also, before coreutils-5.3.1, =[ugo] sometimes didn't work. -# Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, +# Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=equals.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible index 8ff3e60d7..95e91c5b9 100755 --- a/tests/chmod/inaccessible +++ b/tests/chmod/inaccessible @@ -25,7 +25,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/chmod/no-x b/tests/chmod/no-x index 7e5519e4b..b8eed3460 100755 --- a/tests/chmod/no-x +++ b/tests/chmod/no-x @@ -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/chmod/octal b/tests/chmod/octal index e6167c69f..b727f8459 100755 --- a/tests/chmod/octal +++ b/tests/chmod/octal @@ -1,7 +1,7 @@ #!/bin/sh # ensure that chmod diagnoses a certain type of invalid mode string -# 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 @@ -25,7 +25,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/chmod/setgid b/tests/chmod/setgid index 92068b867..d2868f930 100755 --- a/tests/chmod/setgid +++ b/tests/chmod/setgid @@ -29,7 +29,7 @@ fi pwd=`pwd` tmp=setgid.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x index b95d9d588..6bd1e0831 100755 --- a/tests/chmod/umask-x +++ b/tests/chmod/umask-x @@ -1,7 +1,7 @@ #!/bin/sh # Test that chmod -x file reports an error if the result is executable. -# 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` tmp=minus.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chmod/usage b/tests/chmod/usage index eef46668d..a823063f4 100755 --- a/tests/chmod/usage +++ b/tests/chmod/usage @@ -1,7 +1,7 @@ #!/bin/sh # Verify that chmod works correctly with odd option combinations. -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/chown/basic b/tests/chown/basic index 09d86a391..39fad14f3 100755 --- a/tests/chown/basic +++ b/tests/chown/basic @@ -1,7 +1,7 @@ #!/bin/sh # make sure chown --from=... works -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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-root . $srcdir/../priv-check pwd=`pwd` tmp=basic.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/chown/deref b/tests/chown/deref index dc912533b..bae146a4b 100755 --- a/tests/chown/deref +++ b/tests/chown/deref @@ -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/chown/separator b/tests/chown/separator index 6a52b3015..d65b3712c 100755 --- a/tests/chown/separator +++ b/tests/chown/separator @@ -1,7 +1,7 @@ #!/bin/sh # Make sure "chown USER:GROUP FILE" works, and similar tests with separators. -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -25,7 +25,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 'status=$?; (exit $status); exit $status' 1 2 13 15 framework_failure=0 diff --git a/tests/cp/acl b/tests/cp/acl index 02761ced2..3a5eb3376 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -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 diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 index 48247ac4b..befce00a3 100755 --- a/tests/cp/backup-1 +++ b/tests/cp/backup-1 @@ -1,7 +1,7 @@ #!/bin/sh # Test cp backup. -# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -25,7 +25,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/cp/backup-dir b/tests/cp/backup-dir index 03bdfc43a..9bbae3d8e 100755 --- a/tests/cp/backup-dir +++ b/tests/cp/backup-dir @@ -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/cp/backup-is-src b/tests/cp/backup-is-src index e0567b8e2..b4f90c881 100755 --- a/tests/cp/backup-is-src +++ b/tests/cp/backup-is-src @@ -1,7 +1,7 @@ #!/bin/sh # Test cp backup to source file. -# Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, +# Copyright (C) 1998, 1999, 2000, 2002, 2004, 2006 Free Software Foundation, # Inc. # This program is free software; you can redistribute it and/or modify @@ -29,7 +29,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/cp/cp-HL b/tests/cp/cp-HL index 02ebd7c67..2d5fff2df 100755 --- a/tests/cp/cp-HL +++ b/tests/cp/cp-HL @@ -1,7 +1,7 @@ #!/bin/sh # test cp's -H and -L options -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 $?' 1 2 13 15 framework_failure=0 diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref index 80085c263..d90139d3f 100755 --- a/tests/cp/cp-deref +++ b/tests/cp/cp-deref @@ -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/cp/cp-i b/tests/cp/cp-i index 119d8c862..896b0512b 100755 --- a/tests/cp/cp-i +++ b/tests/cp/cp-i @@ -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/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 3dc2c2a7c..cfbee41cc 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -1,7 +1,7 @@ #!/bin/sh # Test basic --backup functionality for both cp and mv. -# Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 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 @@ -36,7 +36,7 @@ umask 022 pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 0081d67c2..fd3e1fcb7 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -2,7 +2,7 @@ # cp -R --parents dir-specified-with-trailing-slash/ other-dir # would get a failed assertion. -# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ umask 022 pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -36,7 +36,7 @@ framework_failure=0 # Record absolute path of srcdir and cd back to current dir. cd $srcdir || framework_failure=1 abs_srcdir=`pwd` -cd $pwd || framework_failure=1 +cd "$pwd" || framework_failure=1 . $srcdir/../envvar-check . $srcdir/../umask-check diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink index 1f9eecb36..6034af6b5 100755 --- a/tests/cp/deref-slink +++ b/tests/cp/deref-slink @@ -2,7 +2,7 @@ # Demonstrate bug when using -d with an existing destination file # that is a symlink. -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ 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/cp/dir-rm-dest b/tests/cp/dir-rm-dest index da55bf660..325b40c2f 100755 --- a/tests/cp/dir-rm-dest +++ b/tests/cp/dir-rm-dest @@ -1,7 +1,7 @@ #!/bin/sh # verify that cp's --remove-destination option works with -R -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -25,7 +25,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/cp/dir-slash b/tests/cp/dir-slash index d34c51ecb..2c5a0bc7c 100755 --- a/tests/cp/dir-slash +++ b/tests/cp/dir-slash @@ -2,7 +2,7 @@ # Make sure that cp -R DIR1 DIR2 does the right thing # when DIR1 is written with a trailing slash. -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -26,7 +26,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/cp/dir-vs-file b/tests/cp/dir-vs-file index ce334fcef..612e297ad 100755 --- a/tests/cp/dir-vs-file +++ b/tests/cp/dir-vs-file @@ -1,7 +1,7 @@ #!/bin/sh # A directory may not replace an existing file. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 framework_failure=0 diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm index bf077e05f..5fff090cd 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -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/cp/into-self b/tests/cp/into-self index dcada77f3..79c727a8d 100755 --- a/tests/cp/into-self +++ b/tests/cp/into-self @@ -1,7 +1,7 @@ #!/bin/sh # Confirm that copying a directory into itself gets a proper diagnostic. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -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_failure=0 diff --git a/tests/cp/link b/tests/cp/link index a1e1f6a3c..f448b5e65 100755 --- a/tests/cp/link +++ b/tests/cp/link @@ -2,7 +2,7 @@ # Make sure cp --link -f works when the target exists. # This failed for 4.0z (due to a bug introduced in that test release). -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -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 diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref index b1ee5004d..39f8bb9c4 100755 --- a/tests/cp/link-no-deref +++ b/tests/cp/link-no-deref @@ -25,7 +25,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/cp/link-preserve b/tests/cp/link-preserve index 8fbeff0d2..8fec65dea 100755 --- a/tests/cp/link-preserve +++ b/tests/cp/link-preserve @@ -2,7 +2,7 @@ # ensure that `cp -d' preserves hard-links between command line arguments # ensure that --preserve=links works with -RH and -RL -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ 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/cp/no-deref-link1 b/tests/cp/no-deref-link1 index b3c1c3532..a8c499e45 100755 --- a/tests/cp/no-deref-link1 +++ b/tests/cp/no-deref-link1 @@ -2,7 +2,7 @@ # FIXME: This test requires ln -s. # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -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 diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2 index 90e615df2..57b4f4194 100755 --- a/tests/cp/no-deref-link2 +++ b/tests/cp/no-deref-link2 @@ -2,7 +2,7 @@ # FIXME: This test requires ln -s. # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -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 diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3 index e93ee7392..98e2ae923 100755 --- a/tests/cp/no-deref-link3 +++ b/tests/cp/no-deref-link3 @@ -2,7 +2,7 @@ # FIXME: This test requires ln -s. # cp from 3.16 fails this test -# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 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 @@ -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 diff --git a/tests/cp/perm b/tests/cp/perm index 2499554bc..502ce70e3 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -1,7 +1,7 @@ #!/bin/sh # Make sure the permission-preserving code in copy.c (mv, cp, install) works. -# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -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/cp/preserve-2 b/tests/cp/preserve-2 index 57816d220..85f9e1e6f 100755 --- a/tests/cp/preserve-2 +++ b/tests/cp/preserve-2 @@ -1,7 +1,7 @@ #!/bin/sh # ensure that cp's --preserve=X,Y option is parsed properly -# 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 @@ -25,7 +25,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/cp/r-vs-symlink b/tests/cp/r-vs-symlink index 3869507d6..9601fb619 100755 --- a/tests/cp/r-vs-symlink +++ b/tests/cp/r-vs-symlink @@ -1,7 +1,7 @@ #!/bin/sh # cp -r should not create symlinks. Fixed in fileutils-4.1.5. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -31,7 +31,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/cp/same-file b/tests/cp/same-file index 05a0e75c0..44d5dd74c 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -36,7 +36,7 @@ VERSION_CONTROL=numbered; export VERSION_CONTROL pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $t0 && exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink index 1d328349f..c36b88205 100755 --- a/tests/cp/slink-2-slink +++ b/tests/cp/slink-2-slink @@ -2,7 +2,7 @@ # `test cp --update A B' where A and B are both symlinks that point # to the same file -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -31,7 +31,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 $?' 1 2 13 15 framework_failure=0 diff --git a/tests/cp/sparse b/tests/cp/sparse index 2842513b0..98d580d21 100755 --- a/tests/cp/sparse +++ b/tests/cp/sparse @@ -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/cp/special-bits b/tests/cp/special-bits index c3217ff58..6a9b0949d 100755 --- a/tests/cp/special-bits +++ b/tests/cp/special-bits @@ -2,7 +2,7 @@ # make sure `cp -p' preserves special bits # This works only when run as root. -# Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 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 @@ -31,7 +31,7 @@ PRIV_CHECK_ARG=require-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/cp/src-base-dot b/tests/cp/src-base-dot index 4b4a586da..1af0e5794 100755 --- a/tests/cp/src-base-dot +++ b/tests/cp/src-base-dot @@ -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/cp/symlink-slash b/tests/cp/symlink-slash index e99dcdfe6..311775a85 100755 --- a/tests/cp/symlink-slash +++ b/tests/cp/symlink-slash @@ -2,7 +2,7 @@ # Make sure that cp -dR dereferences a symlink arg if its name is # written with a trailing slash. -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ 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/dd/not-rewound b/tests/dd/not-rewound index 534d628f9..6caccd08e 100755 --- a/tests/dd/not-rewound +++ b/tests/dd/not-rewound @@ -2,7 +2,7 @@ # Make sure dd does the right thing when the input file descriptor # is not rewound. -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=dd-rw.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2 index bafb7258c..a4fc9abb0 100755 --- a/tests/dd/skip-seek2 +++ b/tests/dd/skip-seek2 @@ -2,7 +2,7 @@ # show how to skip an amount that is smaller than the nominal block size. # There's a more realistic example in the documentation. -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=skip-seek.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync index 73c2b5289..d425091b1 100755 --- a/tests/dd/unblock-sync +++ b/tests/dd/unblock-sync @@ -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/du/2g b/tests/du/2g index 4f0006df7..5ed11e7a6 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -3,7 +3,7 @@ # Before coreutils-5.93, on systems with a signed, 32-bit stat.st_blocks # one of du's computations would overflow. -# 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 @@ -32,7 +32,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/du/8gb b/tests/du/8gb index 0e7cfcdef..400c29d2d 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -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/du/basic b/tests/du/basic index 0427068f5..325e5acff 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -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/du/deref b/tests/du/deref index 8a3db87fe..407797a8b 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -2,7 +2,7 @@ # prior to coreutils-4.5.3, du -D didn't work in some cases # Based on an example from Andreas Schwab and/or Michal Svec. -# 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 @@ -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/du/deref-args b/tests/du/deref-args index 91ce99ff1..1358325de 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -2,7 +2,7 @@ # Ensure that --dereference-args (-D) gives reasonable names. # This test would fail for coreutils-5.0.91. -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/du/exclude b/tests/du/exclude index bf36c4bc3..e197fcd78 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -1,7 +1,7 @@ #!/bin/sh # make sure du's --exclude option works -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/du/fd-leak b/tests/du/fd-leak index af4482cb4..465fcaee0 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -1,7 +1,7 @@ #!/bin/sh # check for file descriptor leak -# 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 @@ 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/du/hard-link b/tests/du/hard-link index 920ae52f1..1e7a5f9c2 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -3,7 +3,7 @@ # Likewise for excluded directories. # Ensure that hard links _are_ listed twice when using --count-links. -# 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 @@ -30,7 +30,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/du/inaccessible-cwd b/tests/du/inaccessible-cwd index e50534cc7..ea4ba7a27 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -2,7 +2,7 @@ # Ensure that even when run from an inaccessible directory, du can still # operate on accessible directories elsewhere. -# 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 @@ -31,7 +31,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 @@ -48,6 +48,6 @@ fi fail=0 -du $pwd/$tmp/a > /dev/null || fail=1 +du "$pwd"/$tmp/a > /dev/null || fail=1 (exit $fail); exit $fail diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 5a84c2e34..16f00e8ec 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -48,7 +48,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 @@ -84,6 +84,6 @@ if test $framework_failure = 1; then fi fail=0 -du -s $pwd/$tmp/$dir > /dev/null || fail=1 +du -s "$pwd"/$tmp/$dir > /dev/null || fail=1 (exit $fail); exit $fail diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 69ce0e0c6..f5f9423f0 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -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/du/no-deref b/tests/du/no-deref index db0f30c32..167f9c22b 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that by default, du doesn't dereference command-line symlinks. -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/du/no-x b/tests/du/no-x index 75b4e4f63..61bd07a0f 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -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/du/restore-wd b/tests/du/restore-wd index c7b623306..3b8a3c97f 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -2,7 +2,7 @@ # due to a bug in glibc's ftw.c, in some cases, nftw w/FTW_CHDIR # would not restore the working directory. -# 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 @@ -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/du/slash b/tests/du/slash index 636e961c6..d3e1335bf 100755 --- a/tests/du/slash +++ b/tests/du/slash @@ -1,7 +1,7 @@ #!/bin/sh # `du /' would omit the `/' on the last line. -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/du/slink b/tests/du/slink index 74f8abf9e..d3d948ee9 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that the size of a long-named-symlink is > 0. -# 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 @@ -25,7 +25,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/du/trailing-slash b/tests/du/trailing-slash index a9785c7db..4d607cd22 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -2,7 +2,7 @@ # Ensure that du works properly for an argument that refers to a # symbolic link, and that is specified with a trailing slash. -# 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 @@ -30,7 +30,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/du/two-args b/tests/du/two-args index 45f911c4c..93700a03b 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -2,7 +2,7 @@ # Make sure `du d/1 d/2' works. # That command failed with du from fileutils-4.0q. -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=du2-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/fmt/long-line b/tests/fmt/long-line index e4aaec8cf..f7e74c8ca 100755 --- a/tests/fmt/long-line +++ b/tests/fmt/long-line @@ -1,7 +1,7 @@ #!/bin/sh # make sure fmt -s works even on long lines -# 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 @@ -25,7 +25,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/install/basic-1 b/tests/install/basic-1 index 84a94343b..bbb30878e 100755 --- a/tests/install/basic-1 +++ b/tests/install/basic-1 @@ -40,7 +40,7 @@ file=file 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 @@ -69,7 +69,7 @@ dd2=dd2$EXEEXT just_built_dd=$pwd/../../src/$dd -test -r $just_built_dd || \ +test -r "$just_built_dd" || \ { cat 1>&2 <<EOF $0: WARNING!!! @@ -79,7 +79,7 @@ EOF exit 77 } -cp $just_built_dd . || fail=1 +cp "$just_built_dd" . || fail=1 cp $dd $dd2 || fail=1 strip $dd2 || \ @@ -117,7 +117,7 @@ test -d newdir3 || fail=1 # hence cannot do anything meaningful with the following relative-named dirs. abs=$pwd/$tmp mkdir sub || fail=1 -(cd sub && chmod 0 . && ginstall -d $abs/xx/yy rel/sub1 rel/sub2 2> /dev/null) && fail=1 +(cd sub && chmod 0 . && ginstall -d "$abs"/xx/yy rel/sub1 rel/sub2 2> /dev/null) && fail=1 chmod 755 sub # Ensure that the first argument-dir has been created. @@ -132,7 +132,7 @@ test -d xx/rel && fail=1 # inaccessible parent. coreutils 5.97 fails this test. mkdir -p sub1/d || fail=1 (cd sub1/d && chmod a-rx .. && chmod a-r . && - ginstall -d $abs/xx/zz rel/a rel/b 2> /dev/null) || fail=1 + ginstall -d "$abs"/xx/zz rel/a rel/b 2> /dev/null) || fail=1 chmod 755 sub1 sub1/d || fail=1 test -d xx/zz || fail=1 test -d sub1/d/rel/a || fail=1 diff --git a/tests/install/create-leading b/tests/install/create-leading index 8cfb0205f..fd7a5f7ff 100755 --- a/tests/install/create-leading +++ b/tests/install/create-leading @@ -1,7 +1,7 @@ #! /bin/sh # Test -D option. -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 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 @@ -31,7 +31,7 @@ fi pwd=`pwd` dir=install-D$$ -trap "cd $pwd; rm -rf $dir" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $dir' 0 1 2 3 15 mkdir $dir diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot index 904769d46..7bf7c5d43 100755 --- a/tests/install/d-slashdot +++ b/tests/install/d-slashdot @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that ginstall -d works with arguments specified with a trailing "/.". -# 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/install/trap b/tests/install/trap index 70f6767e4..3ebaafff3 100755 --- a/tests/install/trap +++ b/tests/install/trap @@ -2,7 +2,7 @@ # Ensure that `install -s' doesn't infloop when its parent # process traps CHLD signal. -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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 @@ -43,10 +43,10 @@ fail=0 # Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. ( # ash doesn't support "trap '' CHLD"; it knows only signal numbers. - sig=`$pwd/../../src/kill -l CHLD 2>/dev/null` && trap '' $sig + sig=`"$pwd"/../../src/kill -l CHLD 2>/dev/null` && trap '' $sig # Before 2004-04-21, install would infloop, in the `while (wait...' loop: - exec ginstall -s $pwd/../../src/ginstall$EXEEXT . + exec ginstall -s "$pwd"/../../src/ginstall$EXEEXT . ) (exit $fail); exit $fail diff --git a/tests/ln/misc b/tests/ln/misc index 51155911a..9fc348a52 100755 --- a/tests/ln/misc +++ b/tests/ln/misc @@ -1,7 +1,7 @@ #!/bin/sh # Miscellaneous tests for "ln". -# Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 1998, 1999, 2000, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=t2-ln.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -106,7 +106,7 @@ touch $f || framework_failure=1 mkdir $d || framework_failure=1 ln -s $d $ld af=`pwd`/$f -ln --no-dereference -fs $af $ld || fail=1 +ln --no-dereference -fs "$af" $ld || fail=1 test -f $ld || fail=1 rm -rf $d $f $ld diff --git a/tests/ln/target-1 b/tests/ln/target-1 index 76da11cae..3efb9879a 100755 --- a/tests/ln/target-1 +++ b/tests/ln/target-1 @@ -1,7 +1,7 @@ #!/bin/sh # Test "ln --target-dir" with one file. -# 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 @@ -30,7 +30,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/ls/color-dtype-dir b/tests/ls/color-dtype-dir index a7169f7c1..f3f9ee9fd 100755 --- a/tests/ls/color-dtype-dir +++ b/tests/ls/color-dtype-dir @@ -30,7 +30,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/ls/dangle b/tests/ls/dangle index f9fc77022..a3bc0d267 100755 --- a/tests/ls/dangle +++ b/tests/ls/dangle @@ -1,7 +1,7 @@ #!/bin/sh # Make sure ls properly handles dangling symlinks vs. ls's -L, -H, options. -# 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 @@ -25,7 +25,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/ls/dired b/tests/ls/dired index 0bac42b60..d6f32b4b9 100755 --- a/tests/ls/dired +++ b/tests/ls/dired @@ -1,7 +1,7 @@ #!/bin/sh # make sure --dired option works -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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` tmp=dired.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/file-type b/tests/ls/file-type index 27f2f7739..80d778af0 100755 --- a/tests/ls/file-type +++ b/tests/ls/file-type @@ -1,7 +1,7 @@ #!/bin/sh # contrast ls -F, ls -p, and ls --indicator-style=file-type -# Copyright (C) 2002, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 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/ls/follow-slink b/tests/ls/follow-slink index cb6a6ed3c..e79896b96 100755 --- a/tests/ls/follow-slink +++ b/tests/ls/follow-slink @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=follow-sl.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/infloop b/tests/ls/infloop index b413b2a71..f7790b895 100755 --- a/tests/ls/infloop +++ b/tests/ls/infloop @@ -2,7 +2,7 @@ # show that the following no longer makes ls infloop # mkdir loop; cd loop; ln -s ../loop sub; ls -RL -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=infloop.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/inode b/tests/ls/inode index 2a39b0262..305eb2226 100755 --- a/tests/ls/inode +++ b/tests/ls/inode @@ -25,7 +25,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/ls/m-option b/tests/ls/m-option index f5b0cfcc5..e002fc47a 100755 --- a/tests/ls/m-option +++ b/tests/ls/m-option @@ -1,7 +1,7 @@ #!/bin/sh # exercise the -m option -# 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 @@ -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/ls/no-arg b/tests/ls/no-arg index 809397c2b..0c56e03b8 100755 --- a/tests/ls/no-arg +++ b/tests/ls/no-arg @@ -1,7 +1,7 @@ #!/bin/sh # make sure ls and `ls -R' do the right thing when invoked with no arguments. -# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=no-args.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/recursive b/tests/ls/recursive index 31e3fe104..c4a27256c 100755 --- a/tests/ls/recursive +++ b/tests/ls/recursive @@ -2,7 +2,7 @@ # 4.1.1 and 4.1.2 had a bug whereby some recursive listings # didn't include a blank line between per-directory groups of files. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=recursive.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/rt-1 b/tests/ls/rt-1 index c7ba4e565..5c0f3c850 100755 --- a/tests/ls/rt-1 +++ b/tests/ls/rt-1 @@ -1,7 +1,7 @@ #!/bin/sh # Make sure name is used as secondary key when sorting on mtime or ctime. -# Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1998, 2001, 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 @@ fi pwd=`pwd` tmp=t-ls.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype index 3f509a2d9..9e903ac60 100755 --- a/tests/ls/stat-dtype +++ b/tests/ls/stat-dtype @@ -32,7 +32,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/ls/stat-failed b/tests/ls/stat-failed index 4b50a6977..fb1cff8b1 100755 --- a/tests/ls/stat-failed +++ b/tests/ls/stat-failed @@ -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/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent index d5d418d65..b71d7dd1c 100755 --- a/tests/ls/stat-vs-dirent +++ b/tests/ls/stat-vs-dirent @@ -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/misc/cat-proc b/tests/misc/cat-proc index d6ff5011b..22f384765 100755 --- a/tests/misc/cat-proc +++ b/tests/misc/cat-proc @@ -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/misc/close-stdout b/tests/misc/close-stdout index a232fd746..01edf32c4 100755 --- a/tests/misc/close-stdout +++ b/tests/misc/close-stdout @@ -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 @@ -56,21 +56,21 @@ mv d e >&- || fail=1 rmdir e >&- || fail=1 touch e >&- || fail=1 sleep 0 >&- || fail=1 -$pwd/../../src/true >&- || fail=1 -$pwd/../../src/printf '' >&- || fail=1 +"$pwd"/../../src/true >&- || fail=1 +"$pwd"/../../src/printf '' >&- || fail=1 # If >&- works, ensure these fail, because stdout is closed and they # *do* generate output. >&- apparently does not work in HP-UX 11.23. # This test is ineffective unless /dev/stdout also works. -if $pwd/../../src/test -w /dev/stdout >/dev/null && - $pwd/../../src/test ! -w /dev/stdout >&-; then - $pwd/../../src/printf 'foo' >&- 2>/dev/null && fail=1 +if "$pwd"/../../src/test -w /dev/stdout >/dev/null && + "$pwd"/../../src/test ! -w /dev/stdout >&-; then + "$pwd"/../../src/printf 'foo' >&- 2>/dev/null && fail=1 cp --verbose a b >&- 2>/dev/null && fail=1 fi # Likewise for /dev/full, if /dev/full works. if test -w /dev/full && test -c /dev/full; then - $pwd/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1 + "$pwd"/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1 cp --verbose a b >/dev/full 2>/dev/null && fail=1 fi diff --git a/tests/misc/csplit b/tests/misc/csplit index 1feea6645..885d6928a 100755 --- a/tests/misc/csplit +++ b/tests/misc/csplit @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=csplit.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/date-sec b/tests/misc/date-sec index aac1e0a98..222b5cfdc 100755 --- a/tests/misc/date-sec +++ b/tests/misc/date-sec @@ -3,7 +3,7 @@ # `date --date="21:04 +0100" +%S' always prints `00'. # Before coreutils-5.2.1, it would print the seconds from the current time. -# 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 @@ 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/misc/false-status b/tests/misc/false-status index 0397c2992..612b5f90c 100755 --- a/tests/misc/false-status +++ b/tests/misc/false-status @@ -25,7 +25,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/misc/head-c b/tests/misc/head-c index 387a5be8f..ba13c32bc 100755 --- a/tests/misc/head-c +++ b/tests/misc/head-c @@ -1,7 +1,7 @@ #!/bin/sh # exercise the fix of 2001-08-18, based on test case from Ian Bruce -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=head-c.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/head-pos b/tests/misc/head-pos index edb334311..9069febf3 100755 --- a/tests/misc/head-pos +++ b/tests/misc/head-pos @@ -2,7 +2,7 @@ # When reading a specified number of lines, ensure that the output # file pointer is positioned just after those lines. -# 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 @@ -26,7 +26,7 @@ fi pwd=`pwd` tmp=head-pos.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/mknod b/tests/misc/mknod index ca15feb8a..12cb0a623 100755 --- a/tests/misc/mknod +++ b/tests/misc/mknod @@ -25,7 +25,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/misc/nl b/tests/misc/nl index 2244ae281..72d2c2132 100755 --- a/tests/misc/nl +++ b/tests/misc/nl @@ -1,7 +1,7 @@ #!/bin/sh # exercise nl functionality -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 @@ -25,7 +25,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/misc/nohup b/tests/misc/nohup index d44d3f986..61664738b 100755 --- a/tests/misc/nohup +++ b/tests/misc/nohup @@ -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/misc/pathchk1 b/tests/misc/pathchk1 index eb7b462ad..9305f0c2d 100755 --- a/tests/misc/pathchk1 +++ b/tests/misc/pathchk1 @@ -1,7 +1,7 @@ #!/bin/sh # pathchk tests -# 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 @@ -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; 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/misc/printf b/tests/misc/printf index 6b29277b0..481cb37a2 100755 --- a/tests/misc/printf +++ b/tests/misc/printf @@ -1,7 +1,7 @@ #!/bin/sh # basic tests for printf -# 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 @@ -22,12 +22,12 @@ prog=`pwd`/../../src/printf if test "$VERBOSE" = yes; then set -x - $prog --version + "$prog" --version 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 @@ -43,7 +43,7 @@ fail=0 # This would fail (by printing the `--') for printf in sh-utils # and in coreutils 4.5.1. -$prog -- 'foo\n' > out || fail=1 +"$prog" -- 'foo\n' > out || fail=1 cat <<\EOF > exp foo EOF @@ -53,46 +53,46 @@ test $fail = 1 && diff out exp 2> /dev/null rm -f out exp # Until coreutils-4.5.10, this would elicit a segfault. -$prog '1 %*sy\n' -3 x > out || fail=1 +"$prog" '1 %*sy\n' -3 x > out || fail=1 # Until coreutils 5.2.2, this would succeed. -if POSIXLY_CORRECT=1 $prog '2 \x' >/dev/null 2>&1; then +if POSIXLY_CORRECT=1 "$prog" '2 \x' >/dev/null 2>&1; then fail=1 else echo '2 failed, as expected' >> out fi # Until coreutils-4.5.12, these would fail. -$prog '3 \x40\n' >> out || fail=1 +"$prog" '3 \x40\n' >> out || fail=1 POSIXLY_CORRECT=1 \ -$prog '4 \x40\n' >> out || fail=1 -$prog '5 % +d\n' 234 >> out || fail=1 +"$prog" '4 \x40\n' >> out || fail=1 +"$prog" '5 % +d\n' 234 >> out || fail=1 # This should print "6 !\n", but don't rely on `!' being the # one-byte representation of octal 041. With printf prior to # coreutils-5.0.1, it would print six bytes: "6 \41\n". -$prog '6 \41\n' | tr '\41' '!' >> out +"$prog" '6 \41\n' | tr '\41' '!' >> out # Note that as of coreutils-5.0.1, printf with a format of '\0002x' # prints a NUL byte followed by the digit `2' and an `x'. # By contrast bash's printf outputs the same thing as $(printf '\2x') does. -$prog '7 \2y \02y \002y \0002y\n' |tr '\0\2' '*=' >> out +"$prog" '7 \2y \02y \002y \0002y\n' |tr '\0\2' '*=' >> out -$prog '8 %b %b %b %b\n' '\1y' '\01y' '\001y' '\0001y'|tr '\1' = >> out +"$prog" '8 %b %b %b %b\n' '\1y' '\01y' '\001y' '\0001y'|tr '\1' = >> out -$prog '9 %*dx\n' -2 0 >>out || fail=1 +"$prog" '9 %*dx\n' -2 0 >>out || fail=1 -$prog '10 %.*dx\n' -2147483648 0 >>out || fail=1 +"$prog" '10 %.*dx\n' -2147483648 0 >>out || fail=1 -$prog '11 %*c\n' 2 x >>out || fail=1 +"$prog" '11 %*c\n' 2 x >>out || fail=1 -$prog '%#d\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%#d\n' 0 >>out 2> /dev/null && fail=1 -$prog '%0s\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%0s\n' 0 >>out 2> /dev/null && fail=1 -$prog '%.9c\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%.9c\n' 0 >>out 2> /dev/null && fail=1 -$prog '%'\''s\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%'\''s\n' 0 >>out 2> /dev/null && fail=1 cat <<\EOF > exp 1 x y diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex index df001cd8d..d3d5d04b2 100755 --- a/tests/misc/printf-hex +++ b/tests/misc/printf-hex @@ -1,7 +1,7 @@ #!/bin/sh # make sure that only two hex. digits are consumed in a \xHHH sequence -# 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 @@ -22,12 +22,12 @@ prog=`pwd`/../../src/printf if test "$VERBOSE" = yes; then set -x - $prog --version + "$prog" --version 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 @@ -41,7 +41,7 @@ fi fail=0 -$prog '\x7e3\n' > out || fail=1 +"$prog" '\x7e3\n' > out || fail=1 cat <<\EOF > exp ~3 EOF diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long index c4af777f3..bf6d00441 100755 --- a/tests/misc/pwd-long +++ b/tests/misc/pwd-long @@ -27,9 +27,9 @@ $PERL -e 1 > /dev/null 2>&1 || { } framework_failure=0 -pwd=`${BUILD_SRC_DIR?}/pwd` || framework_failure=1 +pwd=`"${BUILD_SRC_DIR?}"/pwd` || framework_failure=1 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 mkdir -p $tmp || framework_failure=1 @@ -75,7 +75,7 @@ $build_src_dir my $pwd_binary = "$build_src_dir/pwd"; -x $pwd_binary or die "$ME: $pwd_binary is not an executable file\n"; -chomp (my $actual = `$pwd_binary`); +chomp (my $actual = `"$pwd_binary"`); if ($expected ne $actual) { my $e_len = length $expected; diff --git a/tests/misc/shuf b/tests/misc/shuf index 17a74dd3f..760bd4921 100755 --- a/tests/misc/shuf +++ b/tests/misc/shuf @@ -25,7 +25,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/misc/sort-rand b/tests/misc/sort-rand index 04bcc477f..f9973186e 100755 --- a/tests/misc/sort-rand +++ b/tests/misc/sort-rand @@ -25,7 +25,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/misc/split-a b/tests/misc/split-a index 3ae4736c2..7dfe31954 100755 --- a/tests/misc/split-a +++ b/tests/misc/split-a @@ -1,7 +1,7 @@ #!/bin/sh # Show that split -a works. -# 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=split-a.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/split-fail b/tests/misc/split-fail index 1268190b8..70435b453 100755 --- a/tests/misc/split-fail +++ b/tests/misc/split-fail @@ -1,7 +1,7 @@ #!/bin/sh # split must fail when given length/count of zero. -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/misc/split-l b/tests/misc/split-l index 27c4c3f1b..44916837e 100755 --- a/tests/misc/split-l +++ b/tests/misc/split-l @@ -1,7 +1,7 @@ #!/bin/sh # show that `split --lines=2' works. -# 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 @@ -25,7 +25,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/misc/stat-fmt b/tests/misc/stat-fmt index 560ea1014..435fbbb55 100755 --- a/tests/misc/stat-fmt +++ b/tests/misc/stat-fmt @@ -1,7 +1,7 @@ #!/bin/sh # ensure that stat properly handles a format string ending with % -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -25,7 +25,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/misc/tac-continue b/tests/misc/tac-continue index 41764296b..d8f50ffc4 100755 --- a/tests/misc/tac-continue +++ b/tests/misc/tac-continue @@ -3,7 +3,7 @@ # when it encounters an error with say the first one. # With coreutils-5.2.1 and earlier, this test would fail. -# 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 @@ -41,7 +41,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/misc/wc-files0 b/tests/misc/wc-files0 index 758024aa7..8991e7e12 100755 --- a/tests/misc/wc-files0 +++ b/tests/misc/wc-files0 @@ -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/mkdir/concurrent-1 b/tests/mkdir/concurrent-1 index ff7e96946..790e4ed7a 100755 --- a/tests/mkdir/concurrent-1 +++ b/tests/mkdir/concurrent-1 @@ -1,7 +1,7 @@ #!/bin/sh # Test whether "mkdir -p" works concurrently. -# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 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 @@ -29,10 +29,10 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 -mkdir --parents $pwd/$tmp/a/b/c || fail=1 +mkdir --parents "$pwd"/$tmp/a/b/c || fail=1 test -d $tmp || fail=1 diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1 index 5b9eb5b31..001b8b74c 100755 --- a/tests/mkdir/p-1 +++ b/tests/mkdir/p-1 @@ -25,10 +25,10 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 -mkdir --parents $pwd/$tmp || fail=1 +mkdir --parents "$pwd"/$tmp || fail=1 test -d $tmp || fail=1 diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2 index 38f238072..53ad876e2 100755 --- a/tests/mkdir/p-2 +++ b/tests/mkdir/p-2 @@ -1,7 +1,7 @@ #!/bin/sh # Just like p-1, but with an absolute path. -# Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc. +# Copyright (C) 1997, 2000, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 mkdir --parents $tmp || fail=1 diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index 59bf33781..d9e49d5dc 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -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 @@ -45,20 +45,20 @@ if test $framework_failure = 1; then fi p=$pwd/$tmp -(cd no-access && chmod 0 . && mkdir -p $p/a/b u/v) 2> /dev/null && fail=1 -test -d $p/a/b || fail=1 +(cd no-access && chmod 0 . && mkdir -p "$p"/a/b u/v) 2> /dev/null && fail=1 +test -d "$p"/a/b || fail=1 # Same as above, but with a following *absolute* name, it should succeed -(cd no-acce2s && chmod 0 . && mkdir -p $p/b/b $p/z) || fail=1 -test -d $p/b/b && test -d $p/z || fail=1 +(cd no-acce2s && chmod 0 . && mkdir -p "$p"/b/b "$p"/z) || fail=1 +test -d "$p"/b/b && test -d "$p"/z || fail=1 # Same as above, but a trailing relative name in an unreadable directory # whose parent is inaccessible. coreutils 5.97 fails this test. -(cd no-acce3s/d && chmod a-rx .. && chmod a-r . && mkdir -p a/b $p/b/c d/e && +(cd no-acce3s/d && chmod a-rx .. && chmod a-r . && mkdir -p a/b "$p"/b/c d/e && test -d a/b && test -d d/e) || fail=1 -test -d $p/b/c || fail=1 +test -d "$p"/b/c || fail=1 -b=`ls $p/a|tr -d '\n'` +b=`ls "$p"/a|tr -d '\n'` # With coreutils-5.3.0, this would fail with $b=bu. test "x$b" = xb || fail=1 diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot index db750f655..5a3561d60 100755 --- a/tests/mkdir/p-slashdot +++ b/tests/mkdir/p-slashdot @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that mkdir -p works with arguments specified with a trailing "/.". -# 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink index 26c3d7625..f44be660d 100755 --- a/tests/mkdir/p-thru-slink +++ b/tests/mkdir/p-thru-slink @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory -# 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 @@ -25,7 +25,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/mkdir/p-v b/tests/mkdir/p-v index c80e0acda..267542353 100755 --- a/tests/mkdir/p-v +++ b/tests/mkdir/p-v @@ -33,7 +33,7 @@ export LANG 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/mkdir/parents b/tests/mkdir/parents index 0bb98ccd0..477ac5937 100755 --- a/tests/mkdir/parents +++ b/tests/mkdir/parents @@ -1,7 +1,7 @@ #!/bin/sh # make sure mkdir's -p options works properly -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=parents-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -34,7 +34,7 @@ framework_failure=0 cd $srcdir || framework_failure=1 abs_srcdir=`pwd` -cd $pwd || framework_failure=1 +cd "$pwd" || framework_failure=1 mkdir $tmp || framework_failure=1 cd $tmp || framework_failure=1 mkdir -m 700 e-dir || framework_failure=1 diff --git a/tests/mkdir/perm b/tests/mkdir/perm index 842c881a5..8fdf4b616 100755 --- a/tests/mkdir/perm +++ b/tests/mkdir/perm @@ -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 @@ -35,7 +35,7 @@ framework_failure=0 # Record absolute path of srcdir and cd back to current dir. cd $srcdir || framework_failure=1 abs_srcdir=`pwd` -cd $pwd || framework_failure=1 +cd "$pwd" || framework_failure=1 mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash index de0f17f0c..e002ab21f 100755 --- a/tests/mkdir/t-slash +++ b/tests/mkdir/t-slash @@ -2,7 +2,7 @@ # Ensure that mkdir works with arguments specified with and without # a trailing slash. -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=t-slash.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/acl b/tests/mv/acl index 52c6fe130..b29f0e8ea 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -2,7 +2,7 @@ # move files/directories across file system boundaries # and make sure acls are preserved -# 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 @@ -37,7 +37,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 t0="$t0 $other_partition_tmpdir" diff --git a/tests/mv/atomic b/tests/mv/atomic index a03c4de58..bb761bdc4 100755 --- a/tests/mv/atomic +++ b/tests/mv/atomic @@ -1,7 +1,7 @@ #!/bin/sh # ensure that mv doesn't first unlink its destination in one particular case -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 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 @@ -25,7 +25,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/mv/backup-dir b/tests/mv/backup-dir index ea2c6b7d3..72ffce1eb 100755 --- a/tests/mv/backup-dir +++ b/tests/mv/backup-dir @@ -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/mv/childproof b/tests/mv/childproof index b6101d36e..41cdfce18 100755 --- a/tests/mv/childproof +++ b/tests/mv/childproof @@ -2,7 +2,7 @@ # Ensure that cp/mv don't clobber a just-copied file. # With fileutils-4.1 and earlier, this test would fail. -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -31,7 +31,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` tmp=childproof.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/diag b/tests/mv/diag index c3aaa52e7..63eb3c628 100755 --- a/tests/mv/diag +++ b/tests/mv/diag @@ -1,7 +1,7 @@ #!/bin/sh # make sure we get proper diagnostics: e.g., with --target-dir=d but no args -# Copyright (C) 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ fi pwd=`pwd` tmp=diag-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/dir-file b/tests/mv/dir-file index 417b51d53..9c540b293 100755 --- a/tests/mv/dir-file +++ b/tests/mv/dir-file @@ -1,7 +1,7 @@ #!/bin/sh # mv must fail when src and dest are mismatched directory/non-directory. -# Copyright (C) 2000 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -25,7 +25,7 @@ fi tmp=mv-mismatch-$$ pwd=`pwd` -trap "cd $pwd; rm -rf $tmp" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $tmp' 0 1 2 3 15 framework_failure=0 mkdir $tmp || framework_failure=1 diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir index 28462a44f..8518a6220 100755 --- a/tests/mv/dir2dir +++ b/tests/mv/dir2dir @@ -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/mv/dup-source b/tests/mv/dup-source index b3d86daad..7965c91a5 100755 --- a/tests/mv/dup-source +++ b/tests/mv/dup-source @@ -4,7 +4,7 @@ # made this fail: cp a a d/ # Ensure that mv fails with a similar command. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -33,7 +33,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` tmp=dup-src.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/hard-2 b/tests/mv/hard-2 index 7dcc6c34a..101f334d2 100755 --- a/tests/mv/hard-2 +++ b/tests/mv/hard-2 @@ -2,7 +2,7 @@ # Ensure that moving hard-linked arguments onto existing destinations works. # Likewise when using cp --preserve=link. -# 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 @@ -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/mv/hard-3 b/tests/mv/hard-3 index b51411775..0ab9521fa 100755 --- a/tests/mv/hard-3 +++ b/tests/mv/hard-3 @@ -2,7 +2,7 @@ # Ensure that using `cp --preserve=link' to copy hard-linked arguments # onto existing destinations works, even when one of the link operations fails. -# 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 @@ -42,7 +42,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/mv/hard-4 b/tests/mv/hard-4 index d44df0852..118479af0 100755 --- a/tests/mv/hard-4 +++ b/tests/mv/hard-4 @@ -1,7 +1,7 @@ #!/bin/sh # ensure that mv removes a in this case: touch a; ln a b; mv a b -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -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/mv/hard-link-1 b/tests/mv/hard-link-1 index 03327ad14..dc345f110 100755 --- a/tests/mv/hard-link-1 +++ b/tests/mv/hard-link-1 @@ -2,7 +2,7 @@ # move a directory containing hard-linked files and # make sure the links are preserved -# Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc. +# Copyright (C) 1998, 1999, 2000, 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; 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/mv/hard-verbose b/tests/mv/hard-verbose index b46492e4a..9c02ac14d 100755 --- a/tests/mv/hard-verbose +++ b/tests/mv/hard-verbose @@ -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/mv/i-2 b/tests/mv/i-2 index a3f51102b..ae7c5a135 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -2,7 +2,7 @@ # Test both cp and mv for their behavior with -if and -fi # The standards (POSIX and SuS) dictate annoyingly inconsistent behavior. -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 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 @@ -34,7 +34,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` tmp=cp-mv-if-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/i-3 b/tests/mv/i-3 index cd59e66ad..937479e42 100755 --- a/tests/mv/i-3 +++ b/tests/mv/i-3 @@ -2,7 +2,7 @@ # Make sure that `mv file unwritable-file' prompts the user # and that `mv -f file unwritable-file' doesn't. -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` tmp=mv-i.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/i-4 b/tests/mv/i-4 index 7d547a1bd..594c155fb 100755 --- a/tests/mv/i-4 +++ b/tests/mv/i-4 @@ -1,7 +1,7 @@ #!/bin/sh # make sure `mv -i a b' does its job with a positive response -# Copyright (C) 2001, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 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` tmp=mv-i4-$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap 'exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/i-5 b/tests/mv/i-5 index 8b29545d8..2fec7edf7 100755 --- a/tests/mv/i-5 +++ b/tests/mv/i-5 @@ -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/mv/i-link-no b/tests/mv/i-link-no index 70208317d..2931af60e 100755 --- a/tests/mv/i-link-no +++ b/tests/mv/i-link-no @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=i-link-no.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4 index 4c94f20d9..13357b78d 100755 --- a/tests/mv/into-self-4 +++ b/tests/mv/into-self-4 @@ -2,7 +2,7 @@ # confirm that `mv symlink symlink' doesn't remove symlink # Based on an example from David Luyer. -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ fi pwd=`pwd` tmp=mv-slink2.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd index 347aacfd9..5e5bb1a83 100755 --- a/tests/mv/leak-fd +++ b/tests/mv/leak-fd @@ -36,7 +36,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 if test -z "$other_partition_tmpdir"; then diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1 index b4b42c5c6..dadcd697d 100755 --- a/tests/mv/mv-special-1 +++ b/tests/mv/mv-special-1 @@ -1,7 +1,7 @@ #! /bin/sh # Test "mv" with special files. -# Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005 Free Software +# Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005, 2006 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ fi pwd=`pwd` tmp=mv-spec.$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 . $srcdir/setup diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir index 36c2e0e86..cf4891c58 100755 --- a/tests/mv/no-target-dir +++ b/tests/mv/no-target-dir @@ -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/mv/part-fail b/tests/mv/part-fail index c4aae78e4..2bbd9d247 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -4,7 +4,7 @@ # This is a bit fragile since it relies on the string used # for EPERM: `permission denied'. -# 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 @@ -33,7 +33,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 if test -z "$other_partition_tmpdir"; then diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink index 9fb6c00cd..9a8eac770 100755 --- a/tests/mv/part-hardlink +++ b/tests/mv/part-hardlink @@ -4,7 +4,7 @@ # For additional constraints, see the comment in copy.c. # Before coreutils-5.2.1, this test would fail. -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -31,7 +31,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 if test -z "$other_partition_tmpdir"; then diff --git a/tests/mv/part-rename b/tests/mv/part-rename index 50df1c265..a4b361010 100755 --- a/tests/mv/part-rename +++ b/tests/mv/part-rename @@ -3,7 +3,7 @@ # another, and giving it a different name at the destination would cause mv # to get a failed assertion. -# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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; 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 if test -z "$other_partition_tmpdir"; then diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index c7c6132ef..eb66779c6 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -2,7 +2,7 @@ # make sure cp and mv can handle many combinations of local and # other-partition regular/symlink'd files. -# Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` tmp=part-sl.$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 pwd_tmp=$pwd/$tmp @@ -98,8 +98,8 @@ for copy in cp mv; do case "$args" in *loc_sl*) slink=$loc_sl ;; esac case "$args" in *rem_sl*) slink=$rem_sl ;; esac - echo $contents > $reg_abs || fail=1 - ln -nsf $reg_abs $slink || fail=1 + echo $contents > "$reg_abs" || fail=1 + ln -nsf "$reg_abs" $slink || fail=1 actual_args=`echo $args|sed 's,^,$,;s/ / $/'` actual_args=`eval echo $actual_args` @@ -124,13 +124,13 @@ for copy in cp mv; do | sed \ -e '/^total /d' \ -e s,$other_partition_tmpdir/,, \ - -e s,$pwd_tmp/,, \ + -e "s,$pwd_tmp/,," \ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`" ls2="`cd $other_partition_tmpdir && ls -gG --ignore=.err . \ | sed \ -e '/^total /d' \ -e s,$other_partition_tmpdir/,, \ - -e s,$pwd_tmp/,, \ + -e "s,$pwd_tmp/,," \ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`" echo "($ls) ($ls2)" diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm index cf68aabd4..f510edf08 100755 --- a/tests/mv/partition-perm +++ b/tests/mv/partition-perm @@ -1,7 +1,7 @@ #!/bin/sh # Make sure permissions are preserved when moving from one partition to another. -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 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 @@ -33,7 +33,7 @@ fi pwd=`pwd` dir=p-perm-$$ -trap "cd $pwd; rm -rf $dir $other_partition_tmpdir" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $dir $other_partition_tmpdir' 0 1 2 3 15 mkdir $dir diff --git a/tests/mv/perm-1 b/tests/mv/perm-1 index d1b5276b8..1b9ab289a 100755 --- a/tests/mv/perm-1 +++ b/tests/mv/perm-1 @@ -2,7 +2,7 @@ # ensure that mv gives one diagnostic, not two, when failing # due to lack of permissions -# 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 @@ -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/mv/reply-no b/tests/mv/reply-no index ba45cc056..fa338c893 100755 --- a/tests/mv/reply-no +++ b/tests/mv/reply-no @@ -1,7 +1,7 @@ #!/bin/sh # Ensure that `mv --reply=no f1 f2' works. -# 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 @@ -25,7 +25,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/mv/trailing-slash b/tests/mv/trailing-slash index 96201cf12..b734624de 100755 --- a/tests/mv/trailing-slash +++ b/tests/mv/trailing-slash @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=mv-tslash.$$ -trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 . $srcdir/../envvar-check diff --git a/tests/mv/update b/tests/mv/update index 78bb7d2f8..6bf161efa 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -1,7 +1,7 @@ #!/bin/sh # make sure --update works as advertised -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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` tmp=mv-update.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/od/od-N b/tests/od/od-N index 7c5684525..0fbe3ead5 100755 --- a/tests/od/od-N +++ b/tests/od/od-N @@ -1,7 +1,7 @@ #!/bin/sh # Verify that `od -N N' reads no more than N bytes of input. -# Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=od-N.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/od/x8 b/tests/od/x8 index 6b971994a..c92fcab71 100755 --- a/tests/od/x8 +++ b/tests/od/x8 @@ -2,7 +2,7 @@ # verify that od -t x8 works properly # This would fail before coreutils-4.5.2. -# Copyright (C) 2002, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 @@ -31,7 +31,7 @@ od -t x8 /dev/null >/dev/null || { 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/readlink/can-e b/tests/readlink/can-e index 9cb3d475c..d2777aa49 100755 --- a/tests/readlink/can-e +++ b/tests/readlink/can-e @@ -1,7 +1,7 @@ #!/bin/sh # tests for canonicalize-existing mode (readlink -e). -# 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 @@ -25,13 +25,13 @@ 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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=1 while :; do - bindir=`cd ../../src; pwd`|| break - my_pwd=`$bindir/pwd` || break + bindir=`cd ../../src && pwd`|| break + my_pwd=`"$bindir"/pwd` || break mkdir -p $tmp || break cd $tmp || break @@ -76,58 +76,58 @@ fi for p in "" "$pwd/$tmp/"; do fail=1 - v=`readlink -e ${p}regfile` || break + v=`readlink -e "${p}"regfile` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -e ${p}./regfile/` && break + v=`readlink -e "${p}"./regfile/` && break test -z "$v" || break - v=`readlink -e ${p}subdir` || break + v=`readlink -e "${p}"subdir` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -e ${p}./subdir/` || break + v=`readlink -e "${p}"./subdir/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -e ${p}missing` && break + v=`readlink -e "${p}"missing` && break test -z "$v" || break - v=`readlink -e ${p}./missing/` && break + v=`readlink -e "${p}"./missing/` && break test -z "$v" || break - v=`readlink -e ${p}link1` || break + v=`readlink -e "${p}"link1` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -e ${p}./link1/` && break + v=`readlink -e "${p}"./link1/` && break test -z "$v" || break - v=`readlink -e ${p}link1/more` && break + v=`readlink -e "${p}"link1/more` && break test -z "$v" || break - v=`readlink -e ${p}link2` || break + v=`readlink -e "${p}"link2` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -e ${p}./link2/` || break + v=`readlink -e "${p}"./link2/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -e ${p}link2/more` && break + v=`readlink -e "${p}"link2/more` && break test -z "$v" || break - v=`readlink -e ${p}link3` && break + v=`readlink -e "${p}"link3` && break test -z "$v" || break - v=`readlink -e ${p}./link3/` && break + v=`readlink -e "${p}"./link3/` && break test -z "$v" || break - v=`readlink -e ${p}link3/more` && break + v=`readlink -e "${p}"link3/more` && break test -z "$v" || break - v=`readlink -e ${p}link4` && break + v=`readlink -e "${p}"link4` && break test -z "$v" || break - v=`readlink -e ${p}./link4/` && break + v=`readlink -e "${p}"./link4/` && break test -z "$v" || break - v=`readlink -e ${p}link4/more` && break + v=`readlink -e "${p}"link4/more` && break test -z "$v" || break fail=0 diff --git a/tests/readlink/can-f b/tests/readlink/can-f index 03b54f4b0..51ebda88d 100755 --- a/tests/readlink/can-f +++ b/tests/readlink/can-f @@ -1,7 +1,7 @@ #!/bin/sh # tests for canonicalize mode (readlink -f). -# 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 @@ -25,13 +25,13 @@ 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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=1 while :; do - bindir=`cd ../../src; pwd`|| break - my_pwd=`$bindir/pwd` || break + bindir=`cd ../../src && pwd`|| break + my_pwd=`"$bindir"/pwd` || break mkdir -p $tmp || break cd $tmp || break @@ -76,91 +76,91 @@ fi for p in "" "$pwd/$tmp/"; do fail=1 - v=`readlink -f ${p}regfile` || break + v=`readlink -f "${p}"regfile` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -f ${p}./regfile/` && break + v=`readlink -f "${p}"./regfile/` && break test -z "$v" || break - v=`readlink -f ${p}regfile/more` && break + v=`readlink -f "${p}"regfile/more` && break test -z "$v" || break - v=`readlink -f ${p}./regfile/more/` && break + v=`readlink -f "${p}"./regfile/more/` && break test -z "$v" || break - v=`readlink -f ${p}subdir` || break + v=`readlink -f "${p}"subdir` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -f ${p}./subdir/` || break + v=`readlink -f "${p}"./subdir/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -f ${p}subdir/more` || break + v=`readlink -f "${p}"subdir/more` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -f ${p}./subdir/more/` && break + v=`readlink -f "${p}"./subdir/more/` && break test -z "$v" || break - v=`readlink -f ${p}missing` || break + v=`readlink -f "${p}"missing` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -f ${p}./missing/` && break + v=`readlink -f "${p}"./missing/` && break test -z "$v" || break - v=`readlink -f ${p}missing/more` && break + v=`readlink -f "${p}"missing/more` && break test -z "$v" || break - v=`readlink -f ${p}./missing/more/` && break + v=`readlink -f "${p}"./missing/more/` && break test -z "$v" || break - v=`readlink -f ${p}link1` || break + v=`readlink -f "${p}"link1` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -f ${p}./link1/` && break + v=`readlink -f "${p}"./link1/` && break test -z "$v" || break - v=`readlink -f ${p}link1/more` && break + v=`readlink -f "${p}"link1/more` && break test -z "$v" || break - v=`readlink -f ${p}./link1/more/` && break + v=`readlink -f "${p}"./link1/more/` && break test -z "$v" || break - v=`readlink -f ${p}link2` || break + v=`readlink -f "${p}"link2` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -f ${p}./link2/` || break + v=`readlink -f "${p}"./link2/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -f ${p}link2/more` || break + v=`readlink -f "${p}"link2/more` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -f ${p}./link2/more/` && break + v=`readlink -f "${p}"./link2/more/` && break test -z "$v" || break - v=`readlink -f ${p}link2/more/more2` && break + v=`readlink -f "${p}"link2/more/more2` && break test -z "$v" || break - v=`readlink -f ${p}./link2/more/more2/` && break + v=`readlink -f "${p}"./link2/more/more2/` && break test -z "$v" || break - v=`readlink -f ${p}link3` || break + v=`readlink -f "${p}"link3` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -f ${p}./link3/` && break + v=`readlink -f "${p}"./link3/` && break test -z "$v" || break - v=`readlink -f ${p}link3/more` && break + v=`readlink -f "${p}"link3/more` && break test -z "$v" || break - v=`readlink -f ${p}./link3/more/` && break + v=`readlink -f "${p}"./link3/more/` && break test -z "$v" || break - v=`readlink -f ${p}link4` || break + v=`readlink -f "${p}"link4` || break test "$v" = "$my_pwd/$tmp/subdir/missing" || break - v=`readlink -f ${p}./link4/` && break + v=`readlink -f "${p}"./link4/` && break test -z "$v" || break - v=`readlink -f ${p}link4/more` && break + v=`readlink -f "${p}"link4/more` && break test -z "$v" || break fail=0 diff --git a/tests/readlink/can-m b/tests/readlink/can-m index af59e5bde..78771c800 100755 --- a/tests/readlink/can-m +++ b/tests/readlink/can-m @@ -1,7 +1,7 @@ #!/bin/sh # tests for canonicalize-missing mode (readlink -m). -# 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 @@ -25,13 +25,13 @@ 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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=1 while :; do - bindir=`cd ../../src; pwd`|| break - my_pwd=`$bindir/pwd` || break + bindir=`cd ../../src && pwd`|| break + my_pwd=`"$bindir"/pwd` || break mkdir -p $tmp || break cd $tmp || break @@ -76,94 +76,94 @@ fi for p in "" "$pwd/$tmp/"; do fail=1 - v=`readlink -m ${p}regfile` || break + v=`readlink -m "${p}"regfile` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -m ${p}./regfile/` || break + v=`readlink -m "${p}"./regfile/` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -m ${p}regfile/more` || break + v=`readlink -m "${p}"regfile/more` || break test "$v" = "$my_pwd/$tmp/regfile/more" || break - v=`readlink -m ${p}./regfile/more/` || break + v=`readlink -m "${p}"./regfile/more/` || break test "$v" = "$my_pwd/$tmp/regfile/more" || break - v=`readlink -m ${p}subdir` || break + v=`readlink -m "${p}"subdir` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -m ${p}./subdir/` || break + v=`readlink -m "${p}"./subdir/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -m ${p}subdir/more` || break + v=`readlink -m "${p}"subdir/more` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -m ${p}./subdir/more/` || break + v=`readlink -m "${p}"./subdir/more/` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -m ${p}missing` || break + v=`readlink -m "${p}"missing` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -m ${p}./missing/` || break + v=`readlink -m "${p}"./missing/` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -m ${p}missing/more` || break + v=`readlink -m "${p}"missing/more` || break test "$v" = "$my_pwd/$tmp/missing/more" || break - v=`readlink -m ${p}./missing/more/` || break + v=`readlink -m "${p}"./missing/more/` || break test "$v" = "$my_pwd/$tmp/missing/more" || break - v=`readlink -m ${p}link1` || break + v=`readlink -m "${p}"link1` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -m ${p}./link1/` || break + v=`readlink -m "${p}"./link1/` || break test "$v" = "$my_pwd/$tmp/regfile" || break - v=`readlink -m ${p}link1/more` || break + v=`readlink -m "${p}"link1/more` || break test "$v" = "$my_pwd/$tmp/regfile/more" || break - v=`readlink -m ${p}./link1/more/` || break + v=`readlink -m "${p}"./link1/more/` || break test "$v" = "$my_pwd/$tmp/regfile/more" || break - v=`readlink -m ${p}link2` || break + v=`readlink -m "${p}"link2` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -m ${p}./link2/` || break + v=`readlink -m "${p}"./link2/` || break test "$v" = "$my_pwd/$tmp/subdir" || break - v=`readlink -m ${p}link2/more` || break + v=`readlink -m "${p}"link2/more` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -m ${p}./link2/more/` || break + v=`readlink -m "${p}"./link2/more/` || break test "$v" = "$my_pwd/$tmp/subdir/more" || break - v=`readlink -m ${p}link2/more/more2` || break + v=`readlink -m "${p}"link2/more/more2` || break test "$v" = "$my_pwd/$tmp/subdir/more/more2" || break - v=`readlink -m ${p}./link2/more/more2/` || break + v=`readlink -m "${p}"./link2/more/more2/` || break test "$v" = "$my_pwd/$tmp/subdir/more/more2" || break - v=`readlink -m ${p}link3` || break + v=`readlink -m "${p}"link3` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -m ${p}./link3/` || break + v=`readlink -m "${p}"./link3/` || break test "$v" = "$my_pwd/$tmp/missing" || break - v=`readlink -m ${p}link3/more` || break + v=`readlink -m "${p}"link3/more` || break test "$v" = "$my_pwd/$tmp/missing/more" || break - v=`readlink -m ${p}./link3/more/` || break + v=`readlink -m "${p}"./link3/more/` || break test "$v" = "$my_pwd/$tmp/missing/more" || break - v=`readlink -m ${p}link4` || break + v=`readlink -m "${p}"link4` || break test "$v" = "$my_pwd/$tmp/subdir/missing" || break - v=`readlink -m ${p}./link4/` || break + v=`readlink -m "${p}"./link4/` || break test "$v" = "$my_pwd/$tmp/subdir/missing" || break - v=`readlink -m ${p}link4/more` || break + v=`readlink -m "${p}"link4/more` || break test "$v" = "$my_pwd/$tmp/subdir/missing/more" || break - v=`readlink -m ${p}./link4/more/` || break + v=`readlink -m "${p}"./link4/more/` || break test "$v" = "$my_pwd/$tmp/subdir/missing/more" || break fail=0 diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1 index eec0d91ff..d9c891341 100755 --- a/tests/readlink/rl-1 +++ b/tests/readlink/rl-1 @@ -1,7 +1,7 @@ #!/bin/sh # test for readlink mode. -# 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 @@ -25,7 +25,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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=1 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 diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm index 2fa83ceda..3b4440f36 100755 --- a/tests/rmdir/fail-perm +++ b/tests/rmdir/fail-perm @@ -2,7 +2,7 @@ # For unwritable directory `d', `rmdir -p d d/e/f' would emit # diagnostics but would not fail. Fixed in 5.1.2. -# 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-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/rmdir/t-slash b/tests/rmdir/t-slash index 7bcd91eed..e81c4db3d 100755 --- a/tests/rmdir/t-slash +++ b/tests/rmdir/t-slash @@ -1,7 +1,7 @@ #!/bin/sh # make sure rmdir -p works on a directory specified with a trailing slash -# 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 @@ -25,7 +25,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/sample-test b/tests/sample-test index ac100f294..85b7a32a1 100644 --- a/tests/sample-test +++ b/tests/sample-test @@ -1,7 +1,7 @@ #!/bin/sh # FIXME -# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 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 @@ -30,7 +30,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/shred/exact b/tests/shred/exact index bef320584..3f04d73ce 100755 --- a/tests/shred/exact +++ b/tests/shred/exact @@ -1,7 +1,7 @@ #!/bin/sh # make sure that neither --exact nor --zero gobbles a command line argument -# Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=exact.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/shred/remove b/tests/shred/remove index be6cf173e..1f1a398f3 100755 --- a/tests/shred/remove +++ b/tests/shred/remove @@ -1,7 +1,7 @@ #!/bin/sh # Exercise a bug that was fixed in shred-4.0l -# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 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 @@ -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/sum/sysv b/tests/sum/sysv index bdd317ab0..93dff3d36 100755 --- a/tests/sum/sysv +++ b/tests/sum/sysv @@ -1,7 +1,7 @@ #!/bin/sh # make sure `sum -s' works for input whose sum of bytes is larger than 2^32 -# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -37,7 +37,7 @@ export LC_ALL pwd=`pwd` tmp=sum-s.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only index f5dcb17cd..ee7924540 100755 --- a/tests/tail-2/append-only +++ b/tests/tail-2/append-only @@ -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 diff --git a/tests/tail-2/assert b/tests/tail-2/assert index 4d46904fd..31148e929 100755 --- a/tests/tail-2/assert +++ b/tests/tail-2/assert @@ -32,7 +32,7 @@ fi tmp=tail-assert.$$ pwd=`pwd` -trap "cd $pwd; rm -rf $tmp" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $tmp' 0 1 2 3 15 test_failure=0 mkdir $tmp || test_failure=1 diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2 index 10f3f1961..cf9e2629c 100755 --- a/tests/tail-2/assert-2 +++ b/tests/tail-2/assert-2 @@ -3,7 +3,7 @@ # Due to a race condition in the test, the `assert' script would get # the UMR on Solaris only some of the time, and not at all on Linux/GNU. -# Copyright (C) 2000 Free Software Foundation, Inc. +# Copyright (C) 2000, 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 tmp=tail-as2.$$ pwd=`pwd` -trap "cd $pwd; rm -rf $tmp" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $tmp' 0 1 2 3 15 test_failure=0 mkdir $tmp || test_failure=1 diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb index 5f94cb68f..b0ca79d28 100755 --- a/tests/tail-2/big-4gb +++ b/tests/tail-2/big-4gb @@ -2,7 +2,7 @@ # Demonstrate a bug in `tail -cN' when operating on files of size 4G and larger # Fixed in coreutils-4.5.2. -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 @@ 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/tail-2/fflush b/tests/tail-2/fflush index e78de66e8..0aa80afd4 100755 --- a/tests/tail-2/fflush +++ b/tests/tail-2/fflush @@ -3,7 +3,7 @@ # The problem was that using the solaris5.7 setvbuf function to turn off # buffering doesn't flush stdout. -# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 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 @@ -33,7 +33,7 @@ fi tmp=tail-flush.$$ pwd=`pwd` -trap "cd $pwd; rm -rf $tmp" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $tmp' 0 1 2 3 15 test_failure=0 mkdir $tmp || test_failure=1 diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1 index ff6e712bf..580ec59a3 100755 --- a/tests/tail-2/infloop-1 +++ b/tests/tail-2/infloop-1 @@ -1,7 +1,7 @@ #!/bin/sh # This test would fail with tail from pre-1.22i textutils. -# Copyright (C) 1999, 2002 Free Software Foundation, Inc. +# Copyright (C) 1999, 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 @@ -25,7 +25,7 @@ fi tmp=tail-inf1.$$ pwd=`pwd` -trap "cd $pwd; rm -rf $tmp" 0 1 2 3 15 +trap 'cd "$pwd" && rm -rf $tmp' 0 1 2 3 15 test_failure=0 mkdir $tmp || test_failure=1 diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms index 9733a1cbc..ba9fccd6e 100755 --- a/tests/tail-2/proc-ksyms +++ b/tests/tail-2/proc-ksyms @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=proc-ksyms.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 fail=0 diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle index 3d3dd10da..92a939a9d 100755 --- a/tests/tail-2/start-middle +++ b/tests/tail-2/start-middle @@ -2,7 +2,7 @@ # Verify that tail works even when it's reading from a file # that is not at its beginning. Based on a report from John Roll. -# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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 @@ -26,7 +26,7 @@ fi pwd=`pwd` tmp=tail-mid.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index c5692dccc..298fca4b4 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -2,7 +2,7 @@ # Make sure that `tail -n0 -f' and `tail -c0 -f' sleep # rather than doing what amounted to a busy-wait. -# 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 @@ -41,7 +41,7 @@ kill $pid 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/tee/basic b/tests/tee/basic index 2c2702bc8..77651408d 100755 --- a/tests/tee/basic +++ b/tests/tee/basic @@ -1,7 +1,7 @@ #!/bin/sh # test for basic tee functionality. -# 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 @@ -25,7 +25,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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=0 diff --git a/tests/tee/dash b/tests/tee/dash index 6be774d4a..c6b9e817a 100755 --- a/tests/tee/dash +++ b/tests/tee/dash @@ -1,7 +1,7 @@ #!/bin/sh # test for "tee -". -# 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 @@ -25,7 +25,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 'status=$?; (exit $status); exit $status' 1 2 13 15 fail=0 diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index 50b19d41d..082f75454 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -1,7 +1,7 @@ #!/bin/sh # make sure touch gives reasonable diagnostics -# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 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` tmp=fail-diag.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing index cdba337e9..3f3452ebd 100755 --- a/tests/touch/no-create-missing +++ b/tests/touch/no-create-missing @@ -25,7 +25,7 @@ fi pwd=`pwd` tmp=`echo "$0"|sed 's,.*/,,'`.tmp -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 @@ -46,8 +46,8 @@ touch -ca no-file > /dev/null 2>&1 || fail=1 # If >&- works, test "touch -c -" etc. # >&- apparently does not work in HP-UX 11.23. # This test is ineffective unless /dev/stdout also works. -if $pwd/../../src/test -w /dev/stdout >/dev/null && - $pwd/../../src/test ! -w /dev/stdout >&-; then +if "$pwd"/../../src/test -w /dev/stdout >/dev/null && + "$pwd"/../../src/test ! -w /dev/stdout >&-; then touch -c - >&- 2> /dev/null || fail=1 touch -cm - >&- 2> /dev/null || fail=1 touch -ca - >&- 2> /dev/null || fail=1 diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 59282caef..4d63ad7a3 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -2,7 +2,7 @@ # Make sure that touch gives reasonable diagnostics when applied # to an unwritable directory owned by some other user. -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 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 @@ -41,7 +41,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/touch/obsolescent b/tests/touch/obsolescent index 000ccf558..0f9921002 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -1,7 +1,7 @@ #!/bin/sh # Test touch with obsolescent 8- or 10-digit time stamps. -# Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2000, 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` tmp=obsol.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/touch/read-only b/tests/touch/read-only index de59f0762..0a12ec7e6 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -1,7 +1,7 @@ #!/bin/sh # ensure that touch can operate on read-only files -# 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 @@ -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/touch/relative b/tests/touch/relative index 35d1d4d46..dc1e49e5b 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -2,7 +2,7 @@ # Demonstrate using a combination of --reference and --date to # set the time of a file back by an arbitrary amount. -# 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 @@ 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 |