From: David Chinner <dgc@sgi.com>
To: xfs-dev <xfs-dev@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] XFSQA 166: support varying page sizes
Date: Thu, 20 Mar 2008 17:37:13 +1100 [thread overview]
Message-ID: <20080320063713.GC103491721@sgi.com> (raw)
Make the filter check the resultant output based on
the initial written region size. hence page size of the
machine will not affect the output of the filter.
Modify the golden output to match.
Signed-off-by: Dave Chinner <dgc@sgi.com>
---
xfstests/166 | 38 +++++++++++++++++++++++++++++++-------
xfstests/166.out | 10 +++++-----
2 files changed, 36 insertions(+), 12 deletions(-)
Index: xfs-cmds/xfstests/166.out
===================================================================
--- xfs-cmds.orig/xfstests/166.out 2007-06-20 13:42:46.000000000 +1000
+++ xfs-cmds/xfstests/166.out 2008-03-19 09:40:03.518840554 +1100
@@ -1,6 +1,6 @@
QA output created by 166
-0: [0..31]: XX..YY AG (AA..BB) 32
-1: [32..127]: XX..YY AG (AA..BB) 96 10000
-2: [128..159]: XX..YY AG (AA..BB) 32
-3: [160..223]: XX..YY AG (AA..BB) 64 10000
-4: [224..255]: XX..YY AG (AA..BB) 32
+0: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
+1: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
+2: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
+3: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
+4: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
Index: xfs-cmds/xfstests/166
===================================================================
--- xfs-cmds.orig/xfstests/166 2007-06-20 13:42:46.000000000 +1000
+++ xfs-cmds/xfstests/166 2008-03-19 09:40:03.518840554 +1100
@@ -27,14 +27,38 @@ _cleanup()
. ./common.rc
. ./common.filter
+# assumes 1st, 3rd and 5th blocks are single written blocks,
+# the others are unwritten.
_filter_blocks()
{
- $AWK_PROG '/[0-9]/ {
- if ($7)
- print $1, $2, "XX..YY", "AG", "(AA..BB)", $6, $7;
- else
- print $1, $2, "XX..YY", "AG", "(AA..BB)", $6;
- }'
+ $AWK_PROG '
+/[0-9]/ {
+ if (!written_size) {
+ written_size = $6
+ unwritten1 = ((1048576/512) / 2) - written_size
+ unwritten2 = ((1048576/512) / 2) - 2 * written_size
+ }
+
+ if ($7) {
+ size = "RIGHT"
+ flags = "GOOD"
+ if (unwritten1) {
+ if ($6 != unwritten1)
+ size = "WRONG"
+ unwritten1 = 0;
+ } else if ($6 != unwritten2) {
+ size = "WRONG"
+ }
+ if ($7 < 10000)
+ flags = "BAD"
+ } else {
+ size = "RIGHT"
+ flags = "GOOD"
+ if ($6 != written_size)
+ size = "WRONG"
+ }
+ print $1, "[AA..BB]", "XX..YY", "AG", "(AA..BB)", size, flags
+}'
}
# real QA test starts here
@@ -48,7 +72,7 @@ _scratch_mount
TEST_FILE=$SCRATCH_MNT/test_file
TEST_PROG=$here/src/unwritten_mmap
-FILE_SIZE=131072
+FILE_SIZE=1048576
rm -f $TEST_FILE
$TEST_PROG $FILE_SIZE $TEST_FILE
next reply other threads:[~2008-03-20 6:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 6:37 David Chinner [this message]
2008-03-20 7:46 ` [PATCH] XFSQA 166: support varying page sizes Christoph Hellwig
2008-03-20 20:36 ` Josef 'Jeff' Sipek
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=20080320063713.GC103491721@sgi.com \
--to=dgc@sgi.com \
--cc=xfs-dev@sgi.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