linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: david@fromorbit.com, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org, fstests@vger.kernel.org,
	linux-btrfs@vger.kernel.org, xfs@oss.sgi.com
Subject: [PATCH 03/11] generic/32[6-8]: support xfs in addition to btrfs
Date: Mon, 29 Jun 2015 21:15:41 -0700	[thread overview]
Message-ID: <20150630041541.2476.49356.stgit@birch.djwong.org> (raw)
In-Reply-To: <20150630041519.2476.23059.stgit@birch.djwong.org>

Modify the reflink tests to support xfs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 common/rc         |   37 +++++++++++++++++++++++++++++++++++++
 tests/generic/800 |    2 +-
 tests/generic/801 |    2 +-
 tests/generic/802 |    2 +-
 4 files changed, 40 insertions(+), 3 deletions(-)


diff --git a/common/rc b/common/rc
index 51d2fcb..8f20dc8 100644
--- a/common/rc
+++ b/common/rc
@@ -1397,6 +1397,43 @@ _require_xfs_crc()
 	umount $SCRATCH_MNT
 }
 
+# this test requires the test fs support reflink...
+#
+_require_test_reflink()
+{
+    case $FSTYP in
+    xfs)
+	xfs_info "${TEST_DIR}" | grep reflink=1 -c -q || _notrun "Reflink not supported by this filesystem type: $FSTYP"
+	;;
+    btrfs)
+        true
+        ;;
+    *)
+        _notrun "Reflink not supported by this filesystem type: $FSTYP"
+        ;;
+    esac
+}
+
+# this test requires the scratch fs support reflink...
+#
+_require_scratch_reflink()
+{
+    case $FSTYP in
+    xfs)
+	_scratch_mkfs > /dev/null 2>&1
+	_scratch_mount
+	xfs_info "${TEST_DIR}" | grep reflink=1 -c -q || _notrun "$FSTYP does not support reflink"
+	_scratch_unmount
+	;;
+    btrfs)
+        true
+        ;;
+    *)
+        _notrun "Reflink not supported by this filesystem type: $FSTYP"
+        ;;
+    esac
+}
+
 # this test requires the bigalloc feature to be available in mkfs.ext4
 #
 _require_ext4_mkfs_bigalloc()
diff --git a/tests/generic/800 b/tests/generic/800
index a71f11a..954f39d 100755
--- a/tests/generic/800
+++ b/tests/generic/800
@@ -45,7 +45,7 @@ _cleanup()
 . common/filter
 
 # real QA test starts here
-_supported_fs btrfs
+_require_test_reflink
 _supported_os Linux
 
 _require_xfs_io_command "fiemap"
diff --git a/tests/generic/801 b/tests/generic/801
index b21c44b..aedb6e9 100755
--- a/tests/generic/801
+++ b/tests/generic/801
@@ -45,7 +45,7 @@ _cleanup()
 . common/filter
 
 # real QA test starts here
-_supported_fs btrfs
+_require_test_reflink
 _supported_os Linux
 
 _require_xfs_io_command "fiemap"
diff --git a/tests/generic/802 b/tests/generic/802
index afd8513..51d3414 100755
--- a/tests/generic/802
+++ b/tests/generic/802
@@ -43,7 +43,7 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_supported_fs btrfs
+_require_test_reflink
 _supported_os Linux
 
 _require_xfs_io_command "fiemap"

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2015-06-30  4:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30  4:15 [RFC 00/11] xfstests: test the btrfs/xfs reflink/dedupe ioctls Darrick J. Wong
2015-06-30  4:15 ` [PATCH 01/11] fuzz XFS and ext4 filesystems Darrick J. Wong
2015-06-30  4:15 ` [PATCH 02/11] move btrfs reflink tests to generic Darrick J. Wong
2015-06-30  4:15 ` Darrick J. Wong [this message]
2015-06-30  4:15 ` [PATCH 04/11] basic tests of the reflink and dedupe ioctls Darrick J. Wong
2015-06-30  4:15 ` [PATCH 05/11] test CoW behaviors of reflinked files Darrick J. Wong
2015-06-30  4:16 ` [PATCH 06/11] reflink fallocate tests Darrick J. Wong
2015-06-30  4:16 ` [PATCH 07/11] reflink concurrent operations tests Darrick J. Wong
2015-06-30  4:16 ` [PATCH 08/11] test reflink for accuracy in free block counts Darrick J. Wong
2015-06-30  4:16 ` [PATCH 09/11] test error conditions on reflink Darrick J. Wong
2015-06-30  4:16 ` [PATCH 10/11] test xfs-specific reflink pieces Darrick J. Wong
2015-06-30  4:16 ` [PATCH 11/11] reflink: test what happens when we hit resource limits Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150630041541.2476.49356.stgit@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).