seek_sanity_test: Repair check for unwritten extent support
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 7 Aug 2019 11:25:14 +0000 (13:25 +0200)
committerEryu Guan <guaneryu@gmail.com>
Sun, 11 Aug 2019 14:27:12 +0000 (22:27 +0800)
commit8adf5e71df15c92943b581211d3886dfae437a25
treeda557d737e8687f9085ae9d07c8827f8f31f101f
parent83318f266500cb312b92d7f36e2a28f57a85239f
seek_sanity_test: Repair check for unwritten extent support

In test_basic_support, commit f3c1bca7fb25 ("generic: Test that
SEEK_HOLE can find a punched hole") cleverly punched a hole in the test
file in the middle of the check for unwritten extent support, making
sure we would never detect when unwritten extent support is missing.
Fix that.

While at it, explicitly check for SEEK_DATA support as well:  so far, we
were assuming that SEEK_HOLE support implies SEEK_DATA support, but it
won't hurt to actually check.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/seek_sanity_test.c