summaryrefslogtreecommitdiffstats
path: root/tests/basic/gfapi/gfapi-copy-file-range.t
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2020-05-06 17:36:20 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2020-05-29 07:02:11 +0000
commit1572f98486bf3204b5d2d89da880b92e26734c3c (patch)
treebebf4463515f79d959305f6e99ed6bcebc14fabc /tests/basic/gfapi/gfapi-copy-file-range.t
parent2ae5b28030b08348ec5e4c08ada8600943db0366 (diff)
tests: skip tests on absence of reflink in xfs
Fixes: #1223 Change-Id: I36cb72d920ffd77405051546615c5262c392daef Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit b85f01abab658d1d704cd6caf84dd64eddafbff7)
Diffstat (limited to 'tests/basic/gfapi/gfapi-copy-file-range.t')
-rw-r--r--tests/basic/gfapi/gfapi-copy-file-range.t16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/basic/gfapi/gfapi-copy-file-range.t b/tests/basic/gfapi/gfapi-copy-file-range.t
index c24c1433edf..a56d3a58e07 100644
--- a/tests/basic/gfapi/gfapi-copy-file-range.t
+++ b/tests/basic/gfapi/gfapi-copy-file-range.t
@@ -5,20 +5,22 @@
cleanup;
+mkfs.xfs 2>&1 | grep reflink
+if [ $? -ne 0 ]; then
+ SKIP_TESTS
+ exit
+fi
+
+
TEST glusterd
+TEST truncate -s 2G $B0/xfs_image
# for now, a xfs filesystem with reflink support is created.
# In future, better to make changes in MKFS_LOOP so that,
# once can create a xfs filesystem with reflink enabled in
# generic and simple way, instead of doing below steps each
# time.
-TEST truncate -s 2G $B0/xfs_image
-mkfs.xfs 2>&1 | grep reflink
-if [ $? -eq 0 ]; then
- mkfs.xfs -f -i size=512 -m reflink=1 $B0/xfs_image;
-else
- mkfs.xfs -f -i size=512 $B0/xfs_image;
-fi
+TEST mkfs.xfs -f -i size=512 -m reflink=1 $B0/xfs_image;
TEST mkdir $B0/bricks
TEST mount -t xfs -o loop $B0/xfs_image $B0/bricks