linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>
Subject: [PATCH 3/3] xfs/300: modify test to work on any fs block size
Date: Wed,  5 Feb 2020 17:48:18 -0500	[thread overview]
Message-ID: <20200205224818.18707-4-jmoyer@redhat.com> (raw)
In-Reply-To: <20200205224818.18707-1-jmoyer@redhat.com>

The test currently assumes a file system block size of 4k.  It will
work just fine on any user-specified block size, though.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
 tests/xfs/300 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/300 b/tests/xfs/300
index 28608b81..4f1c927a 100755
--- a/tests/xfs/300
+++ b/tests/xfs/300
@@ -50,8 +50,9 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 0 4096" $SCRATCH_MNT/attrvals >> $seqres.full
 cat $SCRATCH_MNT/attrvals | attr -s name $SCRATCH_MNT/$seq.test >> $seqres.full 2>&1
 
 # Fragment the file by writing backwards
+bs=$(_get_file_block_size $SCRATCH_MNT)
 for I in `seq 6 -1 0`; do
-	dd if=/dev/zero of=$SCRATCH_MNT/$seq.test seek=$I bs=4k \
+	dd if=/dev/zero of=$SCRATCH_MNT/$seq.test seek=$I bs=${bs} \
 	   oflag=direct count=1 conv=notrunc >> $seqres.full 2>&1
 done
 
-- 
2.19.1


  parent reply	other threads:[~2020-02-05 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 22:48 [PATCH 0/3] fstests: fixes for 64k pages and dax Jeff Moyer
2020-02-05 22:48 ` [PATCH 1/3] dax/dm: disable testing on devices that don't support dax Jeff Moyer
2020-02-05 22:48 ` [PATCH 2/3] t_mmap_collision: fix hard-coded page size Jeff Moyer
2020-02-05 22:48 ` Jeff Moyer [this message]
2020-02-05 23:06 ` [PATCH 0/3] fstests: fixes for 64k pages and dax Dave Chinner
2020-02-06 14:36   ` Jeff Moyer

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=20200205224818.18707-4-jmoyer@redhat.com \
    --to=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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).