summaryrefslogtreecommitdiff
path: root/tests/chmod
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-30 10:50:21 +0100
committerJim Meyering <meyering@redhat.com>2009-10-30 12:50:12 +0100
commit3c88587b2eadee11413f4207abbbf13af07c438d (patch)
tree79d45c03b5c6ba2520eeeb236170dbafef49fac7 /tests/chmod
parent12a0a583f6fe3303bd9dfb30de4a5fe46e8e486f (diff)
downloadcoreutils-3c88587b2eadee11413f4207abbbf13af07c438d.tar.xz
tests: factor 350 fail=0 initializations into test-lib.sh
Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake.
Diffstat (limited to 'tests/chmod')
-rwxr-xr-xtests/chmod/c-option1
-rwxr-xr-xtests/chmod/equal-x1
-rwxr-xr-xtests/chmod/equals1
-rwxr-xr-xtests/chmod/inaccessible1
-rwxr-xr-xtests/chmod/no-x1
-rwxr-xr-xtests/chmod/octal1
-rwxr-xr-xtests/chmod/setgid1
-rwxr-xr-xtests/chmod/silent1
-rwxr-xr-xtests/chmod/thru-dangling1
-rwxr-xr-xtests/chmod/umask-x1
-rwxr-xr-xtests/chmod/usage1
11 files changed, 0 insertions, 11 deletions
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index 8d5979a3a..f00ef4bf8 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -30,7 +30,6 @@ chmod 444 $file || framework_failure
skip_if_setgid_
-fail=0
chmod u=rwx $file || fail=1
chmod -c g=rwx $file > out || fail=1
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x
index 97823e090..d74dcc3be 100755
--- a/tests/chmod/equal-x
+++ b/tests/chmod/equal-x
@@ -26,7 +26,6 @@ fi
file=f
touch $file || framework_failure
-fail=0
umask 005
for mode in =x =xX =Xx =x,=X =X,=x; do
chmod a=r,$mode $file || fail=1
diff --git a/tests/chmod/equals b/tests/chmod/equals
index fc0243c51..71c2b7db7 100755
--- a/tests/chmod/equals
+++ b/tests/chmod/equals
@@ -27,7 +27,6 @@ fi
touch f || framework_failure
-fail=0
expected_u=-rwx------
expected_g=----rwx---
diff --git a/tests/chmod/inaccessible b/tests/chmod/inaccessible
index d0d739ef4..2ee6c01a7 100755
--- a/tests/chmod/inaccessible
+++ b/tests/chmod/inaccessible
@@ -26,7 +26,6 @@ fi
mkdir -p d/e || framework_failure
chmod 0 d/e d || framework_failure
-fail=0
chmod u+rwx d d/e || fail=1
diff --git a/tests/chmod/no-x b/tests/chmod/no-x
index 24cc01e7d..82aeb5fa5 100755
--- a/tests/chmod/no-x
+++ b/tests/chmod/no-x
@@ -28,7 +28,6 @@ skip_if_root_
mkdir -p d/no-x/y a/b || framework_failure
chmod u=rw d/no-x || framework_failure
-fail=0
# This must exit nonzero.
chmod -R o=r d >/dev/null 2>out && fail=1
diff --git a/tests/chmod/octal b/tests/chmod/octal
index 36423cb20..044cf3c8a 100755
--- a/tests/chmod/octal
+++ b/tests/chmod/octal
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
# Before coreutils-5.92, this would mistakenly succeed,
# and act like `chmod 0 .'.
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index 5fe74ee1a..4b117f875 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -44,7 +44,6 @@ chmod g+s d 2> /dev/null && env -- test -g d ||
env -- test -g d ||
skip_test_ 'cannot create setgid directories'
-fail=0
chmod 755 d
diff --git a/tests/chmod/silent b/tests/chmod/silent
index e0e984680..9f2d08e02 100755
--- a/tests/chmod/silent
+++ b/tests/chmod/silent
@@ -25,7 +25,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
chmod -f 0 no-such 2> out && fail=1
chgrp -f 0 no-such 2>> out && fail=1
chown -f 0:0 no-such 2>> out && fail=1
diff --git a/tests/chmod/thru-dangling b/tests/chmod/thru-dangling
index 6ecf64311..6a7742750 100755
--- a/tests/chmod/thru-dangling
+++ b/tests/chmod/thru-dangling
@@ -25,7 +25,6 @@ fi
ln -s non-existent dangle || framework_failure
-fail=0
# This operation cannot succeed since the symbolic link dangles.
chmod 644 dangle 2> out && fail=1
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x
index 32d815be1..ae0e51c9a 100755
--- a/tests/chmod/umask-x
+++ b/tests/chmod/umask-x
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
touch file
chmod 755 file
(umask 77 && chmod -x file) 2>/dev/null && fail=1
diff --git a/tests/chmod/usage b/tests/chmod/usage
index 1f1894427..9dd90ad35 100755
--- a/tests/chmod/usage
+++ b/tests/chmod/usage
@@ -23,7 +23,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
# Each line in this list is a set of arguments, followed by :,
# followed by the set of files it will attempt to chmod,