From: Anand Jain <anand.jain@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, wqu@suse.com
Subject: [PATCHi RFC] fstest: btrfs/158 fix miss-aligned stripe and device
Date: Wed, 11 Dec 2019 14:08:39 +0800 [thread overview]
Message-ID: <1576044519-28313-1-git-send-email-anand.jain@oracle.com> (raw)
In-Reply-To: <010f5b0e-939a-b2be-70a2-d8670d1696ab@suse.com>
We changed the order of the allocation on the devices, and
so the test cases which are hard coded to find specific stripe
on the specific device gets failed. So fix it with the new layout.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
Qu, Right we need to fix the dev in the test case as well.
I saw your patches bit late. Here is what I had.. you may
use it. So I am marking this patch as RFC.
Thanks.
tests/btrfs/158 | 10 +++++-----
tests/btrfs/158.out | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/btrfs/158 b/tests/btrfs/158
index 603e8bea9b7e..7f2066384f55 100755
--- a/tests/btrfs/158
+++ b/tests/btrfs/158
@@ -76,14 +76,14 @@ _scratch_unmount
stripe_0=`get_physical_stripe0`
stripe_1=`get_physical_stripe1`
-dev4=`echo $SCRATCH_DEV_POOL | awk '{print $4}'`
-dev3=`echo $SCRATCH_DEV_POOL | awk '{print $3}'`
+dev1=`echo $SCRATCH_DEV_POOL | awk '{print $1}'`
+dev2=`echo $SCRATCH_DEV_POOL | awk '{print $2}'`
# step 2: corrupt the 1st and 2nd stripe (stripe 0 and 1)
-echo "step 2......simulate bitrot at offset $stripe_0 of device_4($dev4) and offset $stripe_1 of device_3($dev3)" >>$seqres.full
+echo "step 2......simulate bitrot at offset $stripe_0 of device_1($dev1) and offset $stripe_1 of device_2($dev2)" >>$seqres.full
-$XFS_IO_PROG -f -d -c "pwrite -S 0xbb $stripe_0 64K" $dev4 | _filter_xfs_io
-$XFS_IO_PROG -f -d -c "pwrite -S 0xbb $stripe_1 64K" $dev3 | _filter_xfs_io
+$XFS_IO_PROG -f -d -c "pwrite -S 0xbb $stripe_0 64K" $dev1 | _filter_xfs_io
+$XFS_IO_PROG -f -d -c "pwrite -S 0xbb $stripe_1 64K" $dev2 | _filter_xfs_io
# step 3: scrub filesystem to repair the bitrot
echo "step 3......repair the bitrot" >> $seqres.full
diff --git a/tests/btrfs/158.out b/tests/btrfs/158.out
index 1f5ad3f76917..5cdaeb238c62 100644
--- a/tests/btrfs/158.out
+++ b/tests/btrfs/158.out
@@ -1,9 +1,9 @@
QA output created by 158
wrote 131072/131072 bytes at offset 0
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 65536/65536 bytes at offset 9437184
+wrote 65536/65536 bytes at offset 22020096
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-wrote 65536/65536 bytes at offset 9437184
+wrote 65536/65536 bytes at offset 1048576
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
0000000 aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
*
--
1.8.3.1
next prev parent reply other threads:[~2019-12-11 6:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 2:22 [PATCH] fstests: btrfs/157 btrfs/158: Prevent stripe offset to pollute golden output Qu Wenruo
2019-12-11 2:22 ` [PATCH] fstests: common: Allow user to keep $seqres.dmesg for all tests Qu Wenruo
2019-12-11 3:22 ` [PATCH] fstests: btrfs/157 btrfs/158: Prevent stripe offset to pollute golden output Qu WenRuo
2019-12-11 6:08 ` Anand Jain [this message]
2019-12-11 7:08 ` [PATCHi RFC] fstest: btrfs/158 fix miss-aligned stripe and device Qu Wenruo
2019-12-11 7:23 ` Anand Jain
2019-12-11 7:35 ` Qu Wenruo
2019-12-11 13:33 ` David Sterba
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=1576044519-28313-1-git-send-email-anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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