public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Cc: Chandan Rajendra <chandan@linux.vnet.ibm.com>, quwenruo@cn.fujitsu.com
Subject: [PATCH] btrfs/012: Enable test to be executed on non-4k block size filesystems
Date: Mon, 26 Dec 2016 23:02:32 +0530	[thread overview]
Message-ID: <1482773552-15696-1-git-send-email-chandan@linux.vnet.ibm.com> (raw)

To get the test to work on non-4k block sized filesystems, this commit
obtains the block size of the Btrfs filesystem from $TEST_DIR.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
---
 tests/btrfs/012 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/btrfs/012 b/tests/btrfs/012
index b39dec0..cbd3882 100755
--- a/tests/btrfs/012
+++ b/tests/btrfs/012
@@ -63,8 +63,10 @@ _require_command "$E2FSCK_PROG" e2fsck
 
 rm -f $seqres.full
 
+BLOCK_SIZE=`get_block_size $TEST_DIR`
+
 # Create & populate an ext4 filesystem
-$MKFS_EXT4_PROG -F -b 4096 $SCRATCH_DEV > $seqres.full 2>&1 || \
+$MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
 	_notrun "Could not create ext4 filesystem"
 # Manual mount so we don't use -t btrfs or selinux context
 mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
-- 
2.5.5


                 reply	other threads:[~2016-12-26 17:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1482773552-15696-1-git-send-email-chandan@linux.vnet.ibm.com \
    --to=chandan@linux.vnet.ibm.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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