public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 1/2] common/populate: use _require_xfs_io_command() in right place
@ 2016-11-02  4:07 Wang Xiaoguang
  2016-11-02  4:07 ` [PATCH v5 2/2] generic: make 17[1-4] work well when btrfs compression is enabled Wang Xiaoguang
  2016-11-06  4:58 ` [PATCH v5 1/2] common/populate: use _require_xfs_io_command() in right place Eryu Guan
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Xiaoguang @ 2016-11-02  4:07 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, eguan, darrick.wong

In original common/populate codes, we put _require_xfs_io_command "falloc" and
_require_xfs_io_command "fpunch" in the begin of common/populate, but it's
not appropriate, for fs, which does not support falloc and punch, will not
be able to use other helper functions in common/populate, so here I choose
to put _require_xfs_io_command "falloc" or "punch" in helper function which
really use falloc and fpunch.

And xfs/120 uses fpunch, add _require_xfs_io_command "fpunch".

Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
---
 common/populate | 7 ++++---
 tests/xfs/120   | 1 +
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/common/populate b/common/populate
index d0003c5..3b9b531 100644
--- a/common/populate
+++ b/common/populate
@@ -22,9 +22,6 @@
 #  Mountain View, CA 94043, USA, or: http://www.sgi.com
 #-----------------------------------------------------------------------
 
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
-
 _require_xfs_db_blocktrash_z_command() {
 	test "${FSTYP}" = "xfs" || _notrun "cannot run xfs_db on ${FSTYP}"
 	$XFS_DB_PROG -x -f -c 'blocktrash -z' "${TEST_DEV}" | grep -q 'nothing on stack' || _notrun "blocktrash -z not supported"
@@ -90,6 +87,8 @@ __populate_fill_fs() {
 # types of metadata block
 _scratch_xfs_populate() {
 	_scratch_mount
+	_require_xfs_io_command "fpunch"
+
 	blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 	dblksz="$(xfs_info "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')"
 	leaf_lblk="$((32 * 1073741824 / blksz))"
@@ -192,6 +191,8 @@ _scratch_xfs_populate() {
 # types of metadata block
 _scratch_ext4_populate() {
 	_scratch_mount
+	_require_xfs_io_command "fpunch"
+
 	blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
 	dblksz="${blksz}"
 	leaf_lblk="$((32 * 1073741824 / blksz))"
diff --git a/tests/xfs/120 b/tests/xfs/120
index 3deece6..631e2f2 100755
--- a/tests/xfs/120
+++ b/tests/xfs/120
@@ -47,6 +47,7 @@ _cleanup()
 _supported_fs xfs
 _supported_os Linux
 
+_require_xfs_io_command "fpunch"
 _require_scratch
 test -n "${FORCE_FUZZ}" || _require_scratch_xfs_crc
 _require_attrs
-- 
2.9.0




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

end of thread, other threads:[~2016-11-06  4:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02  4:07 [PATCH v5 1/2] common/populate: use _require_xfs_io_command() in right place Wang Xiaoguang
2016-11-02  4:07 ` [PATCH v5 2/2] generic: make 17[1-4] work well when btrfs compression is enabled Wang Xiaoguang
2016-11-06  4:58 ` [PATCH v5 1/2] common/populate: use _require_xfs_io_command() in right place Eryu Guan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox