]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
punch: skip fpunch tests when op length not congruent with file allocation unit
authorDarrick J. Wong <djwong@kernel.org>
Tue, 19 Jul 2022 21:37:50 +0000 (14:37 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 24 Jul 2022 14:30:58 +0000 (22:30 +0800)
commitce205e9a4a962a5636d1ce9175d0786cf43abaf2
tree3a23ca2d1d199b8ec25a6eb6bcdd7a4918b94560
parenta4acb097a6d1faa484918ea236b6eb437a3ee4cd
punch: skip fpunch tests when op length not congruent with file allocation unit

Skip the generic fpunch tests on a file when the file's allocation unit
size is not congruent with the proposed testing operations.

This can be the case when we're testing reflink and fallocate on the XFS
realtime device.  For those configurations, the file allocation unit is
a realtime extent, which can be any integer multiple of the block size.
If the request length isn't an exact multiple of the allocation unit
size, reflink and fallocate will fail due to alignment issues, so
there's no point in running these tests.

Assuming this edgecase configuration of an edgecase feature is
vanishingly rare, let's just _notrun the tests instead of rewriting a
ton of tests to do their integrity checking by hand.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/punch