From 39da66f979c206946e5593dbd432e88905a9e383 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 29 Oct 2009 14:40:40 +0100 Subject: tests: don't let a fail=1 env. setting induce unwarranted test failure * cfg.mk (sc_fail_is_initialized): New rule. Fix the offenders: * tests/cp/acl: Set fail=0 * tests/cp/backup-is-src: Likewise. * tests/cp/file-perm-race: Likewise. * tests/cp/reflink-auto: Likewise. * tests/cp/same-file: Likewise. * tests/ln/backup-1: Likewise. * tests/misc/su-fail: Likewise. * tests/misc/truncate-owned-by-other: Likewise. * tests/mkdir/p-3: Likewise. * tests/mkdir/selinux: Likewise. * tests/mkdir/special-1: Likewise. * tests/mv/acl: Likewise. * tests/mv/backup-is-src: Likewise. * tests/mv/diag: Likewise. * tests/mv/force: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/into-self-3: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/touch/now-owned-by-other: Likewise. --- tests/cp/acl | 1 + tests/cp/backup-is-src | 1 + tests/cp/file-perm-race | 1 + tests/cp/reflink-auto | 3 ++- tests/cp/same-file | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/cp') diff --git a/tests/cp/acl b/tests/cp/acl index 2f8742880..059a1e10c 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -45,6 +45,7 @@ acl1=`cd a && getfacl file | grep -v ':bin:' | grep -v 'mask::'` \ test $skip = yes && skip_test_ "'.' is not on a suitable file system for this test" +fail=0 # copy a file without preserving permissions cp a/file b/ || fail=1 diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src index bf03e590a..f226382d0 100755 --- a/tests/cp/backup-is-src +++ b/tests/cp/backup-is-src @@ -26,6 +26,7 @@ fi echo a > a || framework_failure echo a-tilde > a~ || framework_failure +fail=0 # This cp command should exit nonzero. cp --b=simple a~ a > out 2>&1 && fail=1 diff --git a/tests/cp/file-perm-race b/tests/cp/file-perm-race index 1ff2746c2..8ae7cb04e 100755 --- a/tests/cp/file-perm-race +++ b/tests/cp/file-perm-race @@ -23,6 +23,7 @@ fi . $srcdir/test-lib.sh +fail=0 umask 022 mkfifo fifo || skip_test_ "fifos not supported" diff --git a/tests/cp/reflink-auto b/tests/cp/reflink-auto index d1f6b2bca..5e39b7265 100755 --- a/tests/cp/reflink-auto +++ b/tests/cp/reflink-auto @@ -28,8 +28,9 @@ cleanup_() { rm -rf "$other_partition_tmpdir"; } a_other="$other_partition_tmpdir/a" rm -f "$a_other" || framework_failure -echo non_zero_size > "$a_other" +echo non_zero_size > "$a_other" || framework_failure +fail=0 # we shouldn't be able to reflink() files on separate partitions cp --reflink "$a_other" b && fail=1 diff --git a/tests/cp/same-file b/tests/cp/same-file index 6d57ebd6a..d5deb6857 100755 --- a/tests/cp/same-file +++ b/tests/cp/same-file @@ -220,7 +220,7 @@ cat <<\EOF | sed "$remove_these_sed" > $expected EOF -fail=0; +fail=0 compare $expected $actual 1>&2 || fail=1 -- cgit v1.2.3-54-g00ecf