diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-05-06 02:37:43 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-05-07 00:06:00 +0100 |
commit | 8840a00cd79b8beae72b1a0ec6b9e64912633c13 (patch) | |
tree | 32cba40c4c2d88a8cf75c7721742e367bd9a0398 /tests/cp/cp-mv-enotsup-xattr.sh | |
parent | 0b04ff22edcd7b75f0929f5bede7d814d100e2f1 (diff) | |
download | coreutils-8840a00cd79b8beae72b1a0ec6b9e64912633c13.tar.xz |
tests: improve diagnostics when asserting empty files
* tests/chmod/c-option.sh: Use `compare /dev/null ... || fail=1`
rather than `test -s ... && fail=1`, so that the file contents
are output, thus improving diagnostics for failing tests.
* tests/cp/acl.sh: Likewise.
* tests/cp/cp-a-selinux.sh: Likewise.
* tests/cp/cp-mv-enotsup-xattr.sh: Likewise.
* tests/cp/reflink-perm.sh: Likewise.
* tests/dd/misc.sh: Likewise.
* tests/misc/env-null.sh: Likewise.
* tests/misc/env.sh: Likewise.
* tests/misc/nice.sh: Likewise.
* tests/misc/nohup.sh: Likewise.
* tests/misc/printenv.sh: Likewise.
* tests/misc/xattr.sh: Likewise.
* tests/mv/update.sh: Likewise.
* tests/rm/deep-2.sh: Likewise.
* tests/rm/read-only.sh: Likewise.
* tests/split/r-chunk.sh: Likewise.
* tests/tail-2/follow-stdin.sh: Likewise.
* tests/tail-2/inotify-race.sh: Likewise.
* tests/tail-2/wait.sh: Likewise.
* tests/touch/no-dereference.sh: Likewise.
* cfg.mk (sc_prohibit_test_empty:): New syntax-check.
* tests/cp/proc-zero-len.sh: Adjust to avoid false syntax-check failure.
* tests/cp/proc-zero-len.sh: Likewise.
* tests/mv/part-symlink.sh: Likewise.
* tests/tail-2/infloop-1.sh: Likewise.
Diffstat (limited to 'tests/cp/cp-mv-enotsup-xattr.sh')
-rwxr-xr-x | tests/cp/cp-mv-enotsup-xattr.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/cp/cp-mv-enotsup-xattr.sh b/tests/cp/cp-mv-enotsup-xattr.sh index 11809892a..f46977b60 100755 --- a/tests/cp/cp-mv-enotsup-xattr.sh +++ b/tests/cp/cp-mv-enotsup-xattr.sh @@ -69,19 +69,19 @@ grep -F "$xattr_pair" out_a >/dev/null \ # This should pass without diagnostics cp -a xattr/a noxattr/ 2>err || fail=1 test -s noxattr/a || fail=1 # destination file must not be empty -test -s err && fail=1 # there must be no stderr output +compare /dev/null err || fail=1 rm -f err noxattr/a # This should pass without diagnostics (new file) cp --preserve=all xattr/a noxattr/ 2>err || fail=1 test -s noxattr/a || fail=1 # destination file must not be empty -test -s err && fail=1 # there must be no stderr output +compare /dev/null err || fail=1 # This should pass without diagnostics (existing file) cp --preserve=all xattr/a noxattr/ 2>err || fail=1 test -s noxattr/a || fail=1 # destination file must not be empty -test -s err && fail=1 # there must be no stderr output +compare /dev/null err || fail=1 rm -f err noxattr/a @@ -104,7 +104,7 @@ rm -f err noxattr/a # This should pass without diagnostics mv xattr/a noxattr/ 2>err || fail=1 test -s noxattr/a || fail=1 # destination file must not be empty -test -s err && fail=1 # there must be no stderr output +compare /dev/null err || fail=1 # This should pass and copy xattrs of the symlink # since the xattrs used here are not in the 'user.' namespace. |