summaryrefslogtreecommitdiff
path: root/tests/mkdir
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-29 14:40:40 +0100
committerJim Meyering <meyering@redhat.com>2009-10-29 16:51:07 +0100
commit39da66f979c206946e5593dbd432e88905a9e383 (patch)
treeab796006220074433a99f012d6a67f3b759b6768 /tests/mkdir
parent22776f84cba4102306a36cd06ea4c54282432423 (diff)
downloadcoreutils-39da66f979c206946e5593dbd432e88905a9e383.tar.xz
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.
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-xtests/mkdir/p-31
-rwxr-xr-xtests/mkdir/selinux1
-rwxr-xr-xtests/mkdir/special-11
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3
index df1c56d32..06207b269 100755
--- a/tests/mkdir/p-3
+++ b/tests/mkdir/p-3
@@ -30,6 +30,7 @@ mkdir no-access || framework_failure
mkdir no-acce2s || framework_failure
mkdir -p no-acce3s/d || framework_failure
+fail=0
p=`pwd`
(cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1
test -d "$p/a/b" || fail=1
diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux
index ddd237cdb..d872cb6d1 100755
--- a/tests/mkdir/selinux
+++ b/tests/mkdir/selinux
@@ -33,6 +33,7 @@ require_selinux_enforcing_
c=invalid-selinux-context
msg="failed to set default file creation context to \`$c':"
+fail=0
# Test each of mkdir, mknod, mkfifo with "-Z invalid-context".
for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index 4956c20e9..d1af121da 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -26,6 +26,7 @@ fi
set_mode_string=u=rwx,g=rx,o=w,-s,+t
output_mode_string=drwxr-x-wT
+fail=0
tmp=t
mkdir -m$set_mode_string $tmp || fail=1