summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-23 22:02:12 +0200
committerJim Meyering <meyering@redhat.com>2009-08-23 22:05:58 +0200
commit831acb987e970ca86b72eb594965ff59bfedfd30 (patch)
tree06e67617e2859dc04881b6ce344804360e12dfaf /tests/cp
parent1d651b954fe6e6b5b66da258f0e6331962960c85 (diff)
downloadcoreutils-831acb987e970ca86b72eb594965ff59bfedfd30.tar.xz
tests: skip (don't fail) a cp test, upon mount-related failure
* tests/cp/cp-mv-enotsup-xattr: Upon a set-up failiure, rather than failing the test with a "framework failure" diagnostic, just skip it. Russell Whitaker reported that this test failed on slackware.
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/cp-mv-enotsup-xattr17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr
index 23ec4f372..8f3020bec 100755
--- a/tests/cp/cp-mv-enotsup-xattr
+++ b/tests/cp/cp-mv-enotsup-xattr
@@ -30,16 +30,20 @@ require_root_
cwd=`pwd`
cleanup_() { cd /; umount "$cwd/mnt"; }
+skip=0
# Create a file system without user xattr support, then mount it.
dd if=/dev/zero of=blob bs=8192 count=200 > /dev/null 2>&1 \
- || framework_failure
-mkdir mnt || framework_failure
+ || skip=1
+mkdir mnt || skip=1
mkfs -t ext2 -F blob ||
skip_test_ "failed to create ext2 file system"
-mount -oloop,nouser_xattr blob mnt || framework_failure
-echo test > mnt/f || framework_failure
-test -s mnt/f || framework_failure
+mount -oloop,nouser_xattr blob mnt || skip=1
+echo test > mnt/f || skip=1
+test -s mnt/f || skip=1
+
+test $skip = 1 \
+ && skip_test_ "insufficient mount/ext2 support"
# testing xattr name-value pair
xattr_name="user.foo"
@@ -55,8 +59,7 @@ getfattr -d a >out_a || skip_test_ "failed to get xattr of file"
grep -F "$xattr_pair" out_a >/dev/null \
|| skip_test_ "failed to set xattr of file"
-fail=0 || framework_failure
-
+fail=0
# This should pass without diagnostics
cp -a a mnt/ 2>err || fail=1