]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Require that "(exit $fail); exit $fail" be last line of each test.
authorJim Meyering <meyering@redhat.com>
Fri, 28 Mar 2008 13:14:04 +0000 (14:14 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 28 Mar 2008 13:21:28 +0000 (14:21 +0100)
* maint.mk (sc_require_test_exit_idiom): New rule to enforce policy.
* tests/cp/acl: Adhere to the new policy.
* tests/cp/preserve-gid: Likewise.
* tests/dd/misc:
* tests/install/create-leading:
* tests/ln/sf-1:
* tests/ls/symlink-slash:
* tests/misc/help-version:
* tests/misc/ls-time:
* tests/misc/nice:
* tests/misc/shred-remove:
* tests/misc/stty:
* tests/misc/stty-row-col:
* tests/mkdir/p-1:
* tests/mkdir/p-2:
* tests/mkdir/p-3:
* tests/mkdir/p-v:
* tests/mkdir/special-1:
* tests/mkdir/writable-under-readonly:
* tests/mv/acl:
* tests/mv/backup-is-src:
* tests/mv/diag:
* tests/mv/dir-file:
* tests/mv/force:
* tests/mv/hard-link-1:
* tests/mv/i-2:
* tests/mv/i-4:
* tests/mv/into-self:
* tests/mv/into-self-2:
* tests/mv/into-self-3:
* tests/mv/partition-perm:
* tests/mv/to-symlink:
* tests/rmdir/ignore:
* tests/tail-2/assert:
* tests/tail-2/assert-2:
* tests/touch/dangling-symlink:
* tests/touch/dir-1:
* tests/touch/empty-file:
* tests/touch/fifo:
* tests/touch/no-rights: Likewise.

Signed-off-by: Jim Meyering <meyering@redhat.com>
40 files changed:
maint.mk
tests/cp/acl
tests/cp/preserve-gid
tests/dd/misc
tests/install/create-leading
tests/ln/sf-1
tests/ls/symlink-slash
tests/misc/help-version
tests/misc/ls-time
tests/misc/nice
tests/misc/shred-remove
tests/misc/stty
tests/misc/stty-row-col
tests/mkdir/p-1
tests/mkdir/p-2
tests/mkdir/p-3
tests/mkdir/p-v
tests/mkdir/special-1
tests/mkdir/writable-under-readonly
tests/mv/acl
tests/mv/backup-is-src
tests/mv/diag
tests/mv/dir-file
tests/mv/force
tests/mv/hard-link-1
tests/mv/i-2
tests/mv/i-4
tests/mv/into-self
tests/mv/into-self-2
tests/mv/into-self-3
tests/mv/partition-perm
tests/mv/to-symlink
tests/rmdir/ignore
tests/tail-2/assert
tests/tail-2/assert-2
tests/touch/dangling-symlink
tests/touch/dir-1
tests/touch/empty-file
tests/touch/fifo
tests/touch/no-rights

index 0371ee98f891eff4dc40cd387821e1327ed40a5d..6933a3c0fe7ef0591970f985299abea67186cb7f 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -1,6 +1,6 @@
 # -*-Makefile-*-
-# This Makefile fragment is shared between the coreutils,
-# CPPI, Bison, and Autoconf.
+# This Makefile fragment tries to be general-purpose enough to be
+# used by at least coreutils, idutils, CPPI, Bison, and Autoconf.
 
 ## Copyright (C) 2001-2008 Free Software Foundation, Inc.
 ##
@@ -336,6 +336,22 @@ sc_system_h_headers: .re-list
                  1>&2;  exit 1; } || :;                                \
        fi
 
+# Require that the final line of each test-lib.sh-using test be this one:
+# (exit $fail); exit $fail
+# Note: this test requires GNU grep's --label= option.
+sc_require_test_exit_idiom:
+       @if test -f $(srcdir)/tests/test-lib.sh; then                   \
+         die=0;                                                        \
+         for i in $$(grep -l -F /../test-lib.sh $$($(VC_LIST) tests)); do \
+           tail -n1 $$i | grep '^(exit \$$fail); exit \$$fail$$' > /dev/null \
+             && : || { die=1; echo $$i; }                              \
+         done;                                                         \
+         test $$die = 1 &&                                             \
+           { echo 1>&2 '$(ME): the final line in each of the above is not:'; \
+             echo 1>&2 '(exit $$fail); exit $$fail';                   \
+             exit 1; } || :;                                           \
+       fi
+
 sc_sun_os_names:
        @grep -nEi \
            'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
index 05b4ec676a666180e884e4879619d7de867063d4..a7f6a844f5e50181a6e7341c2bfe85e7fc690a7d 100755 (executable)
@@ -61,4 +61,4 @@ cp -p a/file b/ || fail=1
 acl2=`cd b && getfacl file` || framework_failure
 test "$acl1" = "$acl2" || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index da0005612af07a0615d6660906633f082a58e96e..d78582942422ae4e4aa27319946d6e4ea84b48fb 100755 (executable)
@@ -99,4 +99,5 @@ t1 b1 "$nameless_uid" "$nameless_gid2" cp -p
 t1 c0 "$nameless_uid" "$nameless_gid1" cp -p
 t1 c1 "$nameless_uid" "$nameless_gid2" cp -p
 
-(exit 0); exit 0
+fail=0
+(exit $fail); exit $fail
index 76183b3f821fdca882e803b08209d3ca022d1ecb..917258236ee674affdba227b205eeda36124f223 100755 (executable)
@@ -2,7 +2,7 @@
 # Ensure dd treats `--' properly.
 # Also test some flag values.
 
-# Copyright (C) 1999, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2004-2008 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
@@ -82,4 +82,5 @@ outbytes=`echo x | dd bs=3 ibs=10 obs=10 conv=sync 2>/dev/null | wc -c`
 test "$outbytes" -eq 3 || fail=1
 
 test $fail -eq 0 && fail=$warn
-exit $fail
+
+(exit $fail); exit $fail
index c639dc554af47e5c086c847a91336324b07deeeb..66c3995b561d19d9aa3798757693e7eb75489377 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test -D option.
 
-# Copyright (C) 2000, 2001, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2006-2008 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,4 +37,4 @@ ginstall -D $file no-dir1/no-dir2/dest || fail=1
 test -d no-dir1/no-dir2 || fail=1
 test -r no-dir1/no-dir2/dest || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 1532b622ef2b759797136f206e6e480a0c948548..4d69893827dd7902a7404c9c28c9a0629b31ca57 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test "ln -sf".
 
-# Copyright (C) 1997-2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2000, 2007-2008 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
@@ -35,4 +35,4 @@ case `cat err` in
   *) fail=1 ;;
 esac
 
-exit $fail
+(exit $fail); exit $fail
index 8deba05111d9d2aa7104980b1215791ca42be05c..3d89bd42b32999a73ac66a5e6ccea277a296f3a5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Do dereference a symlink arg if its name is written with a trailing slash.
 
-# Copyright (C) 1999, 2000, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999-2000, 2004, 2007-2008 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,4 +33,4 @@ set `ls -l symlink/`
 # Prior to fileutils-4.0k, the following would have output `... symlink -> dir'.
 test "$*" = 'total 0' && : || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index b54a7d8f4c1b57b4c0d368b9ebc79cd55cc497c5..3696736a9989d2496c7974ea06a124e0022c8832 100755 (executable)
@@ -2,7 +2,7 @@
 # Make sure all these programs work properly
 # when invoked with --help or --version.
 
-# Copyright (C) 2000-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2008 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
@@ -197,4 +197,4 @@ for i in $built_programs; do
   rm -rf $tmp_in $tmp_in2 $tmp_out $tmp_dir
 done
 
-exit $fail
+(exit $fail); exit $fail
index 7aee5809f3d249729ecdcebc26bbe958e83f8c0a..b3f0ca2e563b9c5fd32accd218eeff92b84938b1 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
 # Test some of ls's sorting options.
 
-# Copyright (C) 1998, 1999, 2000, 2001, 2004, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 1998-2001, 2004, 2007-2008 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
@@ -124,4 +123,4 @@ EOF
   fail=1
 fi
 
-exit $fail
+(exit $fail); exit $fail
index 2e9d3c14c6b205f6809e67da903f795058a24671..00227293a002b60870154c7efbd3d913916aa849 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test "nice".
 
-# Copyright (C) 2002, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005-2008 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
@@ -80,4 +80,4 @@ while :; do
   shift; shift; shift
 done
 
-exit $fail
+(exit $fail); exit $fail
index f09c6f3e8c2f65d3cc888b8efcff27c6047ae7a2..38013d3d8ed5319e4b493581a2bd232dc467aadb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Exercise a bug that was fixed in shred-4.0l
 
-# Copyright (C) 1999, 2000, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999-2000, 2003, 2006-2008 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
@@ -38,4 +38,4 @@ fail=0
 # When the command completes, expect it to fail.
 shred -u $file > /dev/null 2>&1 && fail=1 || :
 
-exit $fail
+(exit $fail); exit $fail
index c9fd67d147d37e5c9966455c87bbc6c7a8c73acd..6ec67be0153ce090889f46b89bd72bddd9cc73fc 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Make sure stty can parse most of its options.
 
-# Copyright (C) 1998-2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2004, 2006-2008 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
@@ -100,4 +100,4 @@ fi
 
 stty `cat $saved_state`
 
-exit $fail
+(exit $fail); exit $fail
index eb84499ed4b68ef87fba629cae8ef210bf817192..c7e49675d4fe867609d4e280135e4d6427bd7380 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Test "stty" with rows and columns.
 
-# Copyright (C) 1998-2001, 2003-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001, 2003-2008 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
@@ -82,4 +82,4 @@ done
 set x $saved_size
 stty rows $2 columns $3 || exit 1
 
-exit $fail
+(exit $fail); exit $fail
index 7ef63be528761666646bde9518c2f5c8110f3edc..a5672743af3d659eb8b3fc956e7d0b97bd4b7c0c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test "mkdir -p".
 
-# Copyright (C) 1997, 2000, 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 2006-2008 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,4 +27,4 @@ fail=0
 mkdir --parents "`pwd`/t" || fail=1
 test -d t || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index f19a50cdef5a939b580a61a71ed887b2e4192cde..0659a8e35c0bb2fe78d963819bbe97a63b7077d2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Just like p-1, but with an absolute path.
 
-# Copyright (C) 1997, 2000, 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 2006-2008 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,4 +27,4 @@ fail=0
 mkdir --parents "`pwd`/t/u" || fail=1
 test -d t/u || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 4010911314e5ac216dbaa42e6135e8edfb25d7cc..e868b520f037aa408ddbe9a572d5eb6402b7b8e1 100755 (executable)
@@ -3,7 +3,7 @@
 # causes immediate failure.  Also, ensure that we don't create
 # subsequent, relative command-line arguments in the wrong place.
 
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 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
@@ -52,4 +52,4 @@ b=`ls "$p/a" | tr -d '\n'`
 # With coreutils-5.3.0, this would fail with $b=bu.
 test "x$b" = xb || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 569e9b072b3eabe808c43f4e85679570cd878140..316c1e9392d0bbd01b895828f5b70d037421fed4 100755 (executable)
@@ -24,7 +24,8 @@ fi
 . $srcdir/../lang-default
 . $srcdir/../test-lib.sh
 
-mkdir -pv foo/a/b/c/d >out || exit
+fail=0
+mkdir -pv foo/a/b/c/d >out || fail=1
 
 diff - out <<\EOF
 mkdir: created directory `foo'
@@ -33,3 +34,5 @@ mkdir: created directory `foo/a/b'
 mkdir: created directory `foo/a/b/c'
 mkdir: created directory `foo/a/b/c/d'
 EOF
+
+(exit $fail); exit $fail
index f65d2ae0155ec3dd85898e6d341d7da1556f50cb..800d51065de962143c54aef30c609f8963761c01 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # verify that mkdir honors special bits in MODE
 
-# Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2006-2008 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
@@ -52,4 +52,4 @@ case "$mode" in
   *) fail=1 ;;
 esac
 
-exit $fail
+(exit $fail); exit $fail
index bf2c2ad375d1b9c45bbe817ed081a795e478bca3..92d87ab5ab77f87f0d4d18d6c9d7c92c1ab7124c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # FIXME: convert this to a root-only test.
 
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 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,6 +37,7 @@ skip_test_ temporarily disabled
 
 # FIXME: define cleanup_ to do the umount
 
+fail=0
 # FIXME: use mktemp
 cd /tmp                                    \
   && dd if=/dev/zero of=1 bs=8192 count=50 \
@@ -52,3 +53,5 @@ mkdir -p mnt-ro/rw/sub || fail=1
 # To clean up
 umount /tmp/2
 umount /tmp/1
+
+(exit $fail); exit $fail
index 8f9d565be3f28f70a9f9a1fb5ec9e40513dd840a..4fc6350b17160dc96dd27e848eb6a2a4e296334f 100755 (executable)
@@ -70,4 +70,4 @@ mv dir2 $other_partition_tmpdir || fail=1
 acl2=`cd $other_partition_tmpdir && getfacl dir2` || framework_failure
 test "$acl1" = "$acl2" || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index f8be007a85bc6820f90cefb19276631257ab28b9..9315d15a0cee26f85feda9c373ea618fdbc9bb83 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Force mv to use the copying code.
 
-# Copyright (C) 1998, 1999, 2000, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 2004, 2007-2008 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
@@ -48,4 +48,4 @@ EOF
 
 compare out2 exp || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index d7e70f3d63bed72f1665d9fd44aa5307aafa97e3..3393606c31de9b57287ec1e4def7616f62baaaff 100755 (executable)
@@ -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, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2004, 2006-2008 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
@@ -51,5 +51,4 @@ EOF
 
 compare out exp || fail=1
 
-(exit $fail)
-exit $fail
+(exit $fail); exit $fail
index 61b7deaea446427ad07012086db1ee2bcbc629ff..0695249645cbc73856161f681d6f6896f0f006ba 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # mv must fail when src and dest are mismatched directory/non-directory.
 
-# Copyright (C) 2000, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2006-2008 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,4 +32,4 @@ fail=0
 mv dir file > /dev/null 2>&1 && fail=1
 mv file dir > /dev/null 2>&1 && fail=1
 
-exit $fail
+(exit $fail); exit $fail
index bc2603ecf98b15926d0d4bcfa5d1613d1b3f35ce..ad64c229082a14e569bd270de60f5f6d9df7bf85 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # move a file onto itself
 
-# Copyright (C) 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2007-2008 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
@@ -44,4 +44,4 @@ test `cat $ff` = force-contents || fail=1
 # device and inodes are the same.
 mv $ff $ff2 || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 558cfac048f334eb90199feb529d8f809f37b927..b82f2526d12f4901714a77355bbf044c1ea45a1e 100755 (executable)
@@ -2,7 +2,7 @@
 # move a directory containing hard-linked files and
 # make sure the links are preserved
 
-# Copyright (C) 1998, 1999, 2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2004, 2006-2008 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
@@ -43,4 +43,4 @@ a=`sed -n 's/ a$//p' out`
 b=`sed -n 's/ b$//p' out`
 test "$a" = "$b" || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 49f9d985f997e01ff6e55f32690fc17a815f4f6a..eb0181e1ad8775b58b68c1f815ae31a72e56d5ce 100755 (executable)
@@ -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, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2006-2008 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
@@ -58,4 +58,4 @@ test -f g || fail=1
 test -f h || fail=1
 compare g h || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 288c428304ca40806abac7928b1a83e84ba4b384..db61aab86c28ea46758753ecb425f33af0f5854d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # make sure `mv -i a b' does its job with a positive response
 
-# Copyright (C) 2001, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2005-2008 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
@@ -52,4 +52,4 @@ mv -i a b < y >/dev/null 2>&1 || fail=1
 test -r a && fail=1
 test -r b || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 7c2636ee9153fca1a8f50931ad62d677e2656396..cbe7df9c58396ccdc12c61cdb256d818635d36b4 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Demonstrate how mv fails when it tries to move a directory into itself.
 
-# Copyright (C) 1998, 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998-2000, 2002, 2007-2008 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
@@ -56,4 +56,4 @@ test -d $dir/$dir && fail=1
 # Make sure the file has been moved to the right place.
 test -f $dir/$file || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 7866e6952121415614f200dce816ff1e17f16114..ad00cb787766de5a7dcb0dee447858289e185a8d 100755 (executable)
@@ -55,4 +55,4 @@ EOF
 
 compare out2 exp || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index c8b31ff3d174b290174771042dd635b50a3f6eeb..ce858a234b8574700c3a6f1f6e2051a7dd0b0c58 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # move a directory into itself, with a twist
 
-# Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2007-2008 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
@@ -43,4 +43,4 @@ EOF
 
 compare out2 exp || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 7c784994742156251e3ee0f7c1babf6be8f75a6f..8df9571d90fad09dce769e31201f3680814f5b7f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Make sure permissions are preserved when moving from one partition to another.
 
-# Copyright (C) 1999, 2000, 2001, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2006-2008 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
@@ -40,4 +40,4 @@ test -f $other_partition_tmpdir/file || fail=1
 mode=`ls -l $other_partition_tmpdir/file|cut -b-10`
 test "$mode" = "-rwxrwxrwx" || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 0b25ff92c4fb40caf0ea7159e0c405515d9b2193..80e1d138f026349c306e15bc2f39f5e142dbb380 100755 (executable)
@@ -2,7 +2,7 @@
 # Make sure that the copying code used in an inter-partition
 # move unlinks a destination symlink before opening it.
 
-# Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2007-2008 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
@@ -47,4 +47,4 @@ test -f $file && fail=1
 # Make sure $rem_file is unmodified.
 test `cat $rem_file` = remote || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index bb3f62f2e1f34509b3335ed38376df339adc9f09..2555613dd7fd0c1a06ff59646bbd55d6496282f0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # make sure rmdir's --ignore-fail-on-non-empty option works
 
-# Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2007-2008 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,4 +34,4 @@ test -d "$cwd/a/x" || fail=1
 test -d "$cwd/a/b" && fail=1
 test -d "$cwd/a/b/c" && fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 2ab617e77bec644326e3190a37b14554807218f2..78e0082b4340c3f61c4f811d8833a700ff947454 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test for assertion failure in "test".
 
-# Copyright (C) 1999, 2000, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2004, 2006-2008 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
@@ -61,4 +61,4 @@ esac
 
 test $fail = 1 && cat err
 
-exit $fail
+(exit $fail); exit $fail
index 2911878a125e4e90d4f7f9d45983b1bf82015083..6d30a665aaa1da88b1bb0dc8dfe5d4d1c33ec73d 100755 (executable)
@@ -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, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2006-2008 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
@@ -49,4 +49,4 @@ esac
 
 test $fail = 1 && cat err
 
-exit $fail
+(exit $fail); exit $fail
index 3c5cbdcec320908c121df37375c9497f58fc6cc2..c69f9d9bc55e801917dc42096b53ba8632988b6b 100755 (executable)
@@ -2,7 +2,7 @@
 # Make sure touch can create a file through a dangling symlink.
 # This was broken in the 4.0[e-i] test releases.
 
-# Copyright (C) 1999, 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2007-2008 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
@@ -51,4 +51,4 @@ when operating on dangling symlinks.
   esac
 fi
 
-exit $fail
+(exit $fail); exit $fail
index 383e00df448771a773d8a7cb0f88de9e8c9b2ad7..5b7a86c1997859c2373da67c9294dcf55d587777 100755 (executable)
@@ -11,4 +11,4 @@ fi
 
 fail=0
 touch . || fail=1
-exit $fail
+(exit $fail); exit $fail
index 296faae273dc014040d3d92aae48694d310f0f71..5368629b45c08791571c4d4759fe276da94b953b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Make sure touch can set the mtime on an empty file.
 
-# Copyright (C) 1998, 1999, 2000, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2005-2008 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
@@ -82,4 +82,4 @@ if test $fail != 0; then
 EOF
 fi
 
-exit $fail
+(exit $fail); exit $fail
index 400c922c8476271093b77f93fc7f4989e3440a61..00b46f5c584ac628435416fda2f9021274a9b543 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Make sure touch works on fifos without hanging.
 
-# Copyright (C) 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2007-2008 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
@@ -35,4 +35,4 @@ fail=0
 
 touch fifo || fail=1
 
-exit $fail
+(exit $fail); exit $fail
index 7fe9d29c6b660ffe98dc101cce3bc4b08335c587..e90fcac5072a5df85e2250a1acda95be989fae5a 100755 (executable)
@@ -2,7 +2,7 @@
 # Make sure touch can update the times on a file that is neither
 # readable nor writable.
 
-# Copyright (C) 1999, 2000, 2002, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2002, 2006-2008 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,4 +42,4 @@ test "$*" = "x t1 t2" || fail=1
 # Also test the combination of --no-create and -a.
 touch -a --no-create t1 || fail=1
 
-exit $fail
+(exit $fail); exit $fail