xfstests: more 214 updates
authorEric Sandeen <sandeen@redhat.com>
Tue, 12 Jan 2010 23:16:53 +0000 (23:16 +0000)
committerRich Johnston <rjohnston@sgi.com>
Fri, 26 Oct 2012 15:39:57 +0000 (10:39 -0500)
A few more updates for the 214 fallocate test, since
ext4 is having some fallocate trouble these days.

First off, updated 214.out was missing from the previous
commit to this file.

Second, run each test against a new filename and don't
remove it, so that the post-test fs check will have
more work to do.

Third, and a newly-found corruption case for ext4.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
214
214.out

diff --git a/214 b/214
index cef7626e71f7c87e93560148bb14970358db8e6a..dabf4222bbb540a9019ade602125e86372ddfa3a 100755 (executable)
--- a/214
+++ b/214
@@ -58,13 +58,16 @@ _require_xfs_io_falloc
 
 # Ok, off we go.
 
+# We don't remove files after they are written to check
+# for subsequent fs corruption at the end
+rm -f $TEST_DIR/test214-*
+
 # Super-trivial; preallocate a region and read it; get 0s.
 echo "=== falloc & read  ==="
 $XFS_IO_PROG -F -f             \
        -c 'falloc 0 4096'      \
        -c 'pread -v 0 4096'    \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
-rm -f $TEST_DIR/ouch
+       $TEST_DIR/test214-1 | _filter_xfs_io_unique
 
 # Preallocate a chunk, write 1 byte, read it all back.
 # Should get no stale data.  Early ext4 bug.
@@ -74,8 +77,7 @@ $XFS_IO_PROG -F -f            \
        -c 'falloc 0 512'       \
        -c 'pwrite 0 1'         \
        -c 'pread -v 0 512'     \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
-rm -f $TEST_DIR/ouch
+       $TEST_DIR/test214-2 | _filter_xfs_io_unique
 
 # Same but write in the middle of the region
 echo "=== falloc, write middle, read ==="
@@ -83,8 +85,7 @@ $XFS_IO_PROG -F -f            \
        -c 'falloc 0 512'       \
        -c 'pwrite 256 1'       \
        -c 'pread -v 0 512'     \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
-rm -f $TEST_DIR/ouch
+       $TEST_DIR/test214-3 | _filter_xfs_io_unique
 
 # Same but write the end of the region
 echo "=== falloc, write end, read ==="
@@ -92,8 +93,7 @@ $XFS_IO_PROG -F -f            \
        -c 'falloc 0 512'       \
        -c 'pwrite 511 1'       \
        -c 'pread -v 0 512'     \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
-rm -f $TEST_DIR/ouch
+       $TEST_DIR/test214-4 | _filter_xfs_io_unique
 
 # Reported by IBM on ext4.
 #
@@ -112,14 +112,12 @@ $XFS_IO_PROG -F -f                                \
        -c 'pwrite -S 0xAA 0x12000 0x10000'     \
        -c 'fsync'                              \
        -c 'truncate 0x16000'                   \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
+       $TEST_DIR/test214-5 | _filter_xfs_io_unique
 
 # now do a direct read and see what's on-disk
 $XFS_IO_PROG -F -f -d                          \
        -c 'pread -v 0 0x16000'                 \
-       $TEST_DIR/ouch | _filter_xfs_io_unique
-
-rm -f $TEST_DIR/ouch
+       $TEST_DIR/test214-5 | _filter_xfs_io_unique
 
 # Reported by Ted Ts'o on linux-ext4, 12/31/2009
 # double-allocation on ext4 when fallocating over delalloc blocks
@@ -133,7 +131,20 @@ $XFS_IO_PROG -F -f                         \
        -c "pwrite 0 16k"                       \
        -c "falloc 0 16k"                       \
        -c "fsync"                              \
-       $TEST_DIR/ouch2 | _filter_xfs_io_unique
+       $TEST_DIR/test214-6 | _filter_xfs_io_unique
+
+# Another ext4 failure
+
+echo "=== ext4 testcase 2 ==="
+
+$XFS_IO_PROG -F -f \
+        -c "fsync"              \
+        -c "pwrite 551917 41182"        \
+        -c "falloc 917633 392230"       \
+        -c "pwrite 285771 77718"        \
+        -c "pwrite 1136718 104115"      \
+        $TEST_DIR/test214-7 | _filter_xfs_io_unique
+
 
 # success, all done
 status=0
diff --git a/214.out b/214.out
index 9fd6a73e1f1eccaa8c1835dd0b6944e399e11564..45761506bf2fb0793fbeabfdd5c9bba105c4474a 100644 (file)
--- a/214.out
+++ b/214.out
@@ -42,3 +42,10 @@ XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 === delalloc write 16k; fallocate same range ===
 wrote 16384/16384 bytes at offset 0
 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+=== ext4 testcase 2 ===
+wrote 41182/41182 bytes at offset 551917
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 77718/77718 bytes at offset 285771
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 104115/104115 bytes at offset 1136718
+XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)