summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2010-02-01 16:29:27 +0100
committerJim Meyering <meyering@redhat.com>2010-02-01 16:46:34 +0100
commitf53a0e1062e251baf709552cdde73ce4f6ccf6fb (patch)
tree4c8927522494d4b86efa0cca064d4edda944e3e5 /tests
parent628b1d5e7e63958ae01d5e650d4ca7352a6f1859 (diff)
downloadcoreutils-f53a0e1062e251baf709552cdde73ce4f6ccf6fb.tar.xz
tests: cp-a-selinux: skip the test if mounting a loop device fails
* tests/cp/cp-a-selinux: Skip the test (instead of fail) if we fail to mount a loop device (e.g., none available).
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/cp-a-selinux9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux
index 313f13279..770dcc4fc 100755
--- a/tests/cp/cp-a-selinux
+++ b/tests/cp/cp-a-selinux
@@ -48,12 +48,15 @@ ls -Z f | grep $ctx || fail=1
# Create a file system, then mount it with the context=... option.
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 an ext2 file system"
-mount -oloop,context=$ctx blob mnt || framework_failure
+mount -oloop,context=$ctx blob mnt || skip=1
+test $skip = 1 \
+ && skip_test_ "insufficient mount/ext2 support"
+
cd mnt || framework_failure
echo > f || framework_failure