Whamcloud - gitweb
tests: add another test for uninit extents past eof
authorEric Whitney <enwlinux@gmail.com>
Fri, 27 Sep 2013 00:17:09 +0000 (20:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Sep 2013 00:17:09 +0000 (20:17 -0400)
commitd45170717a834152b22ca8a72b9e079c80938f65
tree5214ef36b6cb352d8bddc3848c33387fa74f0af6
parent085757fcc22a86168ee6793dfad9a95d88fb09db
tests: add another test for uninit extents past eof

Commit d3f32c2db8 was intended to detect extents found outside their
proper location in the extent tree, including invalid extents at the
end of an extent block.  However, it incorrectly reported legal
uninitialized extents created by fallocate() at the end of file with
the FALLOC_FL_KEEP_SIZE flag as false positives.  xfstests
generic/263 (among others) caught this problem, while the e2fsprogs
test f_uninit_ext_past_eof did not.  The latter test failed to
detect the problem in part because it uses a test file whose i_size
is 0.

Add a test derived from the fsx-based test case in xfstests
generic/263 consisting of a file with non-zero length, more than
four extents total, and two uninitialized extents past EOF to
reliably reproduce commit d3f32c2db8's false positive behavior.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_uninit_ext_past_eof2/expect.1 [new file with mode: 0644]
tests/f_uninit_ext_past_eof2/expect.2 [new file with mode: 0644]
tests/f_uninit_ext_past_eof2/image.gz [new file with mode: 0644]
tests/f_uninit_ext_past_eof2/name [new file with mode: 0644]