From: Stefan Behrens <sbehrens@giantdisaster.de>
To: xfs@oss.sgi.com
Cc: linux-btrfs@vger.kernel.org
Subject: [PATCH] xfstest: fix btrfs/006 for 10+ devices in SCRATCH_DEV_POOL
Date: Fri, 23 Aug 2013 15:07:13 +0200 [thread overview]
Message-ID: <1377263233-8903-4-git-send-email-sbehrens@giantdisaster.de> (raw)
In-Reply-To: <1377263233-8903-1-git-send-email-sbehrens@giantdisaster.de>
One problem was the output of "uniq -c" which added spaces depending
on the size of the count value (e.g. one space less for 10+ devices).
The second problem was that "btrfs fi show" was doing the same:
"devid %4llu size %s used %s path %s".
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
---
common/filter.btrfs | 4 ++--
tests/btrfs/006.out | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/common/filter.btrfs b/common/filter.btrfs
index e9a2bc2..29512cd 100644
--- a/common/filter.btrfs
+++ b/common/filter.btrfs
@@ -10,7 +10,7 @@ _filter_btrfs_version()
_filter_devid()
{
- sed -e "s/\(devid\s\+\)[0-9]\+/\1 <DEVID>/g"
+ sed -e "s/\(devid\)\s\+[0-9]\+/\1 <DEVID>/g"
}
# If passed a number as first arg, filter that number of devices
@@ -53,7 +53,7 @@ _filter_btrfs_device_stats()
_filter_scratch | _filter_scratch_pool | \
sed -e "s/[0-9]\+$/<NUM>/g" | sort | uniq $UNIQ_OPT | \
- sed -e "s/$NUMDEVS /<NUMDEVS> /g"
+ sed -e "s/ *$NUMDEVS /<NUMDEVS> /g"
}
# make sure this script returns success
diff --git a/tests/btrfs/006.out b/tests/btrfs/006.out
index ab33b7e..22bcb77 100644
--- a/tests/btrfs/006.out
+++ b/tests/btrfs/006.out
@@ -6,21 +6,21 @@ TestLabel.006
== Show filesystem by label
Label: 'TestLabel.006' uuid: <UUID>
Total devices <EXACTNUM> FS bytes used <SIZE>
- devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
+ devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
== Show filesystem by UUID
Label: 'TestLabel.006' uuid: <EXACTUUID>
Total devices <EXACTNUM> FS bytes used <SIZE>
- devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
+ devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
== Sync filesystem
FSSync 'SCRATCH_MNT'
== Show device stats by mountpoint
- <NUMDEVS> [SCRATCH_DEV].corruption_errs <NUM>
- <NUMDEVS> [SCRATCH_DEV].flush_io_errs <NUM>
- <NUMDEVS> [SCRATCH_DEV].generation_errs <NUM>
- <NUMDEVS> [SCRATCH_DEV].read_io_errs <NUM>
- <NUMDEVS> [SCRATCH_DEV].write_io_errs <NUM>
+<NUMDEVS> [SCRATCH_DEV].corruption_errs <NUM>
+<NUMDEVS> [SCRATCH_DEV].flush_io_errs <NUM>
+<NUMDEVS> [SCRATCH_DEV].generation_errs <NUM>
+<NUMDEVS> [SCRATCH_DEV].read_io_errs <NUM>
+<NUMDEVS> [SCRATCH_DEV].write_io_errs <NUM>
== Show device stats by first/scratch dev
[SCRATCH_DEV].corruption_errs <NUM>
[SCRATCH_DEV].flush_io_errs <NUM>
--
1.8.3.4
next prev parent reply other threads:[~2013-08-23 13:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 13:07 [PATCH V4] xfstests: don't remove the two first devices from SCRATCH_DEV_POOL Stefan Behrens
2013-08-23 13:07 ` [PATCH][RESEND] xfstests: add a test for btrfs device replace operation Stefan Behrens
2013-08-23 18:35 ` Josef Bacik
2013-08-28 16:25 ` Rich Johnston
2013-08-23 13:07 ` [PATCH] xfstests: update _filter_size() for Btrfs Stefan Behrens
2013-08-23 18:34 ` Josef Bacik
2013-08-28 15:38 ` Rich Johnston
2013-08-23 13:07 ` Stefan Behrens [this message]
2013-08-23 18:33 ` [PATCH] xfstest: fix btrfs/006 for 10+ devices in SCRATCH_DEV_POOL Josef Bacik
2013-08-28 15:30 ` Rich Johnston
2013-08-23 18:32 ` [PATCH V4] xfstests: don't remove the two first devices from SCRATCH_DEV_POOL Josef Bacik
2013-08-28 15:18 ` Rich Johnston
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=1377263233-8903-4-git-send-email-sbehrens@giantdisaster.de \
--to=sbehrens@giantdisaster.de \
--cc=linux-btrfs@vger.kernel.org \
--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).