]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: cp-parents: don't let a failing chmod go unnoticed
authorJim Meyering <meyering@redhat.com>
Mon, 19 Sep 2011 08:53:45 +0000 (10:53 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 19 Sep 2011 08:53:45 +0000 (10:53 +0200)
* tests/cp/cp-parents: If somehow a chmod set-up command failed,
subsequent tests would fail in a harder-to-diagnose manner.

tests/cp/cp-parents

index fcb5c447a0444e615bc1757f5a82a3e018741576..1a1e3726802fa78fa1d63aa109adbf70001fb26b 100755 (executable)
@@ -46,7 +46,7 @@ cp --parents f/g d 2>/dev/null && fail=1
 test -d d/f && fail=1
 
 # Check that re_protect works.
-chmod go=w d/a
+chmod go=w d/a || framework_failure_
 cp -a --parents d/a/b/c e || fail=1
 cp -a --parents sym/b/c g || fail=1
 p=`ls -ld e/d|cut -b-10`; case $p in drwxr-xr-x);; *) fail=1;; esac