fstests: Add more sanity to seek_sanity_test
authorAmir Goldstein <amir73il@gmail.com>
Wed, 3 Apr 2019 05:59:25 +0000 (08:59 +0300)
committerEryu Guan <guaneryu@gmail.com>
Sat, 6 Apr 2019 11:47:53 +0000 (19:47 +0800)
commit34081087748374c5fdfd2a4056d6d832762c763b
treec851af8d498b668739823cf64dab4ef483d025b1
parentcbae878f4110ca6e746756777f774ede788a046d
fstests: Add more sanity to seek_sanity_test

seek_sanity_test checks for one of several SEEK_DATA/HOLE
behaviors and allows for the default behavior of filesystems,
where SEEK_HOLE always returns EOF.

This means that if filesystem has a regression in finding
holes, the sanity test won't catch it. And indeed this regression
happened in overlayfs on kernel v4.19 and went unnoticed.

To improve test coverage, add a flag -f to seek_sanity_test to
indicate that the default behavior is not acceptable.
Whitelist all filesystem types that are expected to detect holes
and use wrapper when invoking seek_sanity_test to add the -f flag
to those filesystems.

Overlayfs inherits expected behavior from base fs type.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
src/seek_sanity_test.c
tests/generic/285
tests/generic/436
tests/generic/445
tests/generic/448
tests/generic/490