From: Jim Meyering Date: Fri, 28 Mar 2008 13:14:04 +0000 (+0100) Subject: Require that "(exit $fail); exit $fail" be last line of each test. X-Git-Tag: v6.11~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17720c10cd73b71230f309137c437bf3aad7b6f5;p=platform%2Fupstream%2Fcoreutils.git Require that "(exit $fail); exit $fail" be last line of each test. * 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 --- diff --git a/maint.mk b/maint.mk index 0371ee9..6933a3c 100644 --- 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]' \ diff --git a/tests/cp/acl b/tests/cp/acl index 05b4ec6..a7f6a84 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -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 diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index da00056..d785829 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -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 diff --git a/tests/dd/misc b/tests/dd/misc index 76183b3..9172582 100755 --- a/tests/dd/misc +++ b/tests/dd/misc @@ -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 diff --git a/tests/install/create-leading b/tests/install/create-leading index c639dc5..66c3995 100755 --- a/tests/install/create-leading +++ b/tests/install/create-leading @@ -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 diff --git a/tests/ln/sf-1 b/tests/ln/sf-1 index 1532b62..4d69893 100755 --- a/tests/ln/sf-1 +++ b/tests/ln/sf-1 @@ -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 diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash index 8deba05..3d89bd4 100755 --- a/tests/ls/symlink-slash +++ b/tests/ls/symlink-slash @@ -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 diff --git a/tests/misc/help-version b/tests/misc/help-version index b54a7d8..3696736 100755 --- a/tests/misc/help-version +++ b/tests/misc/help-version @@ -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 diff --git a/tests/misc/ls-time b/tests/misc/ls-time index 7aee580..b3f0ca2 100755 --- a/tests/misc/ls-time +++ b/tests/misc/ls-time @@ -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 diff --git a/tests/misc/nice b/tests/misc/nice index 2e9d3c1..0022729 100755 --- a/tests/misc/nice +++ b/tests/misc/nice @@ -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 diff --git a/tests/misc/shred-remove b/tests/misc/shred-remove index f09c6f3..38013d3 100755 --- a/tests/misc/shred-remove +++ b/tests/misc/shred-remove @@ -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 diff --git a/tests/misc/stty b/tests/misc/stty index c9fd67d..6ec67be 100755 --- a/tests/misc/stty +++ b/tests/misc/stty @@ -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 diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col index eb84499..c7e4967 100755 --- a/tests/misc/stty-row-col +++ b/tests/misc/stty-row-col @@ -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 diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1 index 7ef63be..a567274 100755 --- a/tests/mkdir/p-1 +++ b/tests/mkdir/p-1 @@ -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 diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2 index f19a50c..0659a8e 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, 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 diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index 4010911..e868b52 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -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 diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v index 569e9b0..316c1e9 100755 --- a/tests/mkdir/p-v +++ b/tests/mkdir/p-v @@ -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 diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1 index f65d2ae..800d510 100755 --- a/tests/mkdir/special-1 +++ b/tests/mkdir/special-1 @@ -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 diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly index bf2c2ad..92d87ab 100755 --- a/tests/mkdir/writable-under-readonly +++ b/tests/mkdir/writable-under-readonly @@ -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 diff --git a/tests/mv/acl b/tests/mv/acl index 8f9d565..4fc6350 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -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 diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src index f8be007..9315d15 100755 --- a/tests/mv/backup-is-src +++ b/tests/mv/backup-is-src @@ -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 diff --git a/tests/mv/diag b/tests/mv/diag index d7e70f3..3393606 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, 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 diff --git a/tests/mv/dir-file b/tests/mv/dir-file index 61b7dea..0695249 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, 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 diff --git a/tests/mv/force b/tests/mv/force index bc2603e..ad64c22 100755 --- a/tests/mv/force +++ b/tests/mv/force @@ -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 diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1 index 558cfac..b82f252 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, 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 diff --git a/tests/mv/i-2 b/tests/mv/i-2 index 49f9d98..eb0181e 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, 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 diff --git a/tests/mv/i-4 b/tests/mv/i-4 index 288c428..db61aab 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-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 diff --git a/tests/mv/into-self b/tests/mv/into-self index 7c2636e..cbe7df9 100755 --- a/tests/mv/into-self +++ b/tests/mv/into-self @@ -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 diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2 index 7866e69..ad00cb7 100755 --- a/tests/mv/into-self-2 +++ b/tests/mv/into-self-2 @@ -55,4 +55,4 @@ EOF compare out2 exp || fail=1 -exit $fail +(exit $fail); exit $fail diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3 index c8b31ff..ce858a2 100755 --- a/tests/mv/into-self-3 +++ b/tests/mv/into-self-3 @@ -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 diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm index 7c78499..8df9571 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, 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 diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink index 0b25ff9..80e1d13 100755 --- a/tests/mv/to-symlink +++ b/tests/mv/to-symlink @@ -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 diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore index bb3f62f..2555613 100755 --- a/tests/rmdir/ignore +++ b/tests/rmdir/ignore @@ -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 diff --git a/tests/tail-2/assert b/tests/tail-2/assert index 2ab617e..78e0082 100755 --- a/tests/tail-2/assert +++ b/tests/tail-2/assert @@ -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 diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2 index 2911878..6d30a66 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, 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 diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index 3c5cbdc..c69f9d9 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -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 diff --git a/tests/touch/dir-1 b/tests/touch/dir-1 index 383e00d..5b7a86c 100755 --- a/tests/touch/dir-1 +++ b/tests/touch/dir-1 @@ -11,4 +11,4 @@ fi fail=0 touch . || fail=1 -exit $fail +(exit $fail); exit $fail diff --git a/tests/touch/empty-file b/tests/touch/empty-file index 296faae..5368629 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -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 diff --git a/tests/touch/fifo b/tests/touch/fifo index 400c922..00b46f5 100755 --- a/tests/touch/fifo +++ b/tests/touch/fifo @@ -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 diff --git a/tests/touch/no-rights b/tests/touch/no-rights index 7fe9d29..e90fcac 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -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