linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] xfstests: add helper require function _require_btrfs_cloner
@ 2014-05-23  4:05 Filipe David Borba Manana
  2014-05-23  4:05 ` [PATCH 2/2] xfstests: add test for btrfs ioctl clone operation Filipe David Borba Manana
  2014-05-23  9:39 ` [PATCH 1/2] xfstests: add helper require function _require_btrfs_cloner David Disseldorp
  0 siblings, 2 replies; 7+ messages in thread
From: Filipe David Borba Manana @ 2014-05-23  4:05 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, Filipe David Borba Manana

So that the same check (btrfs cloner program presence) can be reused
by other tests.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
---
 common/rc       | 7 +++++++
 tests/btrfs/035 | 4 +---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index d1788d1..f27ee53 100644
--- a/common/rc
+++ b/common/rc
@@ -2085,6 +2085,13 @@ _require_fssum()
 	[ -x $FSSUM_PROG ] || _notrun "fssum not built"
 }
 
+_require_btrfs_cloner()
+{
+	CLONER_PROG=$here/src/cloner
+	[ -x $CLONER_PROG ] || \
+		_notrun "cloner binary not present at $CLONER_PROG"
+}
+
 # Given 2 files, verify that they have the same mapping but different
 # inodes - i.e. an undisturbed reflink
 # Silent if so, make noise if not
diff --git a/tests/btrfs/035 b/tests/btrfs/035
index 6808179..dd303af 100755
--- a/tests/btrfs/035
+++ b/tests/btrfs/035
@@ -45,13 +45,11 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
+_require_btrfs_cloner
 
 _scratch_mkfs > /dev/null 2>&1
 _scratch_mount
 
-CLONER_PROG=$here/src/cloner
-[ -x $CLONER_PROG ] || _notrun "cloner binary not present at $CLONER_PROG"
-
 src_str="aaaaaaaaaa"
 
 echo -n "$src_str" > $SCRATCH_MNT/src
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-26 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-23  4:05 [PATCH 1/2] xfstests: add helper require function _require_btrfs_cloner Filipe David Borba Manana
2014-05-23  4:05 ` [PATCH 2/2] xfstests: add test for btrfs ioctl clone operation Filipe David Borba Manana
2014-05-23  9:44   ` David Disseldorp
2014-05-23 13:19   ` [PATCH 2/2 v2] " Filipe David Borba Manana
2014-05-24 16:50   ` [PATCH 2/2 v3] " Filipe David Borba Manana
2014-05-26 15:48     ` David Disseldorp
2014-05-23  9:39 ` [PATCH 1/2] xfstests: add helper require function _require_btrfs_cloner David Disseldorp

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).