]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfsqa test 166 fails on 64k page machine
authorDave Chinner <dgc@sgi.com>
Tue, 25 Mar 2008 05:19:50 +0000 (05:19 +0000)
committerDave Chinner <dgc@sgi.com>
Tue, 25 Mar 2008 05:19:50 +0000 (05:19 +0000)
test 166 output is dependent on page size (mmap related). Make
the output filter turn the output into something independent of
page size whilst checking that the output is valid.
Merge of master-melb:xfs-cmds:30702a by kenmcd.

  Make the file size and I/O size large enough that 64k pages are
  handled correctly.

166
166.out

diff --git a/166 b/166
index 4562b39a9864c3b74de8348e03f6653618655db1..3094640c74ee1924ab5731546892690611f421d8 100644 (file)
--- a/166
+++ b/166
@@ -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
diff --git a/166.out b/166.out
index c562847d443e66af42813263e0e857656732701b..bf72ecdf7e84b0c0eba0c2b7d22013e27ceb1a8e 100644 (file)
--- a/166.out
+++ b/166.out
@@ -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