linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chandan <chandan@linux.vnet.ibm.com>
To: linux-btrfs@vger.kernel.org, xfs@oss.sgi.com
Cc: david@fromorbit.com, sekharan@linux.vnet.ibm.com
Subject: [PATCH] xfstests: generic/255: Execute only if blocksize <= 4096
Date: Sun, 25 Aug 2013 20:36 +0530	[thread overview]
Message-ID: <2909046.09LYLQvZ6q@localhost.localdomain> (raw)

The patch adds the function _require_le_4k_blocksize to perform the
block size check on $TEST_DEV and $SCRATCH_DEV.

Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
---
 common/rc         | 10 ++++++++++
 tests/generic/255 |  1 +
 2 files changed, 11 insertions(+)

diff --git a/common/rc b/common/rc
index ae80b12..d8ee132 100644
--- a/common/rc
+++ b/common/rc
@@ -2106,6 +2106,16 @@ _require_dumpe2fs()
 	fi
 }
 
+_require_le_4k_blocksize()
+{
+	test_dev_bs=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
+	scratch_dev_bs=`stat -f $SCRATCH_DEV | grep "Block size" | cut -d " " -f3`
+
+	if (( $test_dev_bs > 4096 || $scratch_dev_bs > 4096 )); then
+		_notrun "This test requires a filesystem with a block size less than or equal to 4k."
+	fi
+}
+
 _create_loop_device()
 {
 	file=$1
diff --git a/tests/generic/255 b/tests/generic/255
index dd329b4..763e861 100755
--- a/tests/generic/255
+++ b/tests/generic/255
@@ -49,6 +49,7 @@ _supported_os Linux
 _require_xfs_io_falloc_punch
 _require_xfs_io_falloc
 _require_xfs_io_fiemap
+_require_le_4k_blocksize
 
 testfile=$TEST_DIR/255.$$
 
-- 
1.8.3.1



             reply	other threads:[~2013-08-25 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25 15:06 chandan [this message]
2013-08-25 16:54 ` [PATCH] xfstests: generic/255: Execute only if blocksize <= 4096 Eric Sandeen
2013-08-26  5:38   ` chandan
2013-08-26 14:29     ` Eric Sandeen
2013-08-27 12:16       ` chandan

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=2909046.09LYLQvZ6q@localhost.localdomain \
    --to=chandan@linux.vnet.ibm.com \
    --cc=david@fromorbit.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sekharan@linux.vnet.ibm.com \
    --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).