Test 214 and 236 use the same file names for test files in the TEST
filesystem and don't check/create clean initial test state. Hence if
you run 214 then 236, 236 will fail with:
+link: cannot create link `/mnt/test/ouch2' to `/mnt/test/ouch': File exists
+ctime: 1277076527 -> 1277076527
+Fatal error: ctime not updated after link
Ensure that both tests clean up after themselves properly and also
ensure a clean state before they start.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
While most tests use /bin/sh, they are dependent on /bin/sh being a
bash shell. Convert all the tests to execute via /bin/bash as it is
much, much simpler than trying to debug and remove all the bashisms
throughout the test code.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
ext4 had a regression where it double-accounted used blocks
if you fallocated on top of delalloc blocks. Ted sent a
c program to exploit it (see "fsstress-induced corruption reproduced"
on linux-ext4 on 12/31/2009) and it's trivial to do the same thing
within the xfstests framework using xfs_io.
This also changes the handcrafted xfs_io tests to use the
_require_xfs_io_falloc helper, not sure how that got missed.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
New test to test basic mixed fallocate + read & write,
includes a couple regression tests for bugs that ext4
hit. Uses xfs_io to generate fallocate calls, so requires
git xfsprogs and very recent glibc at this point.
Ext4 folks, this is hopefully a reasonable example of
how to add a new test. :)
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>