summaryrefslogtreecommitdiff
path: root/tests/touch
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-03-28 14:14:04 +0100
committerJim Meyering <meyering@redhat.com>2008-03-28 14:21:28 +0100
commit17720c10cd73b71230f309137c437bf3aad7b6f5 (patch)
treef5df1dac6af0eedd44cc94f3c065f67d4147aa17 /tests/touch
parent818dbee8dc1a50f6dbc1ba85f7f25a47ded09930 (diff)
downloadcoreutils-17720c10cd73b71230f309137c437bf3aad7b6f5.tar.xz
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 <meyering@redhat.com>
Diffstat (limited to 'tests/touch')
-rwxr-xr-xtests/touch/dangling-symlink4
-rwxr-xr-xtests/touch/dir-12
-rwxr-xr-xtests/touch/empty-file4
-rwxr-xr-xtests/touch/fifo4
-rwxr-xr-xtests/touch/no-rights4
5 files changed, 9 insertions, 9 deletions
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
index 3c5cbdcec..c69f9d9bc 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 383e00df4..5b7a86c19 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 296faae27..5368629b4 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 400c922c8..00b46f5c5 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 7fe9d29c6..e90fcac50 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