public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/8] fstests: check file block congruency of file range operations
@ 2022-07-13  0:56 Darrick J. Wong
  2022-07-13  0:56 ` [PATCH 1/8] misc: use _get_file_block_size for block (re)mapping tests Darrick J. Wong
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Darrick J. Wong @ 2022-07-13  0:56 UTC (permalink / raw)
  To: djwong, guaneryu, zlang; +Cc: linux-xfs, fstests, guan, tytso, leah.rumancik

Hi all,

I started running fstests with XFS filesystems that don't have the usual
file geometry characteristics -- block sizes larger than 4k, realtime
filesystems with extent sizes that aren't a power of two, etc.  What I
found is that many file operation tests (fallocate, reflink, etc.) that
operate on disk blocks assume that aligning the arguments to 64k is
sufficient to avoid EINVAL.  Unfortunately, this just means that these
tests fail left and right on realtime filesystems where the file
allocation unit is large (~2MB, anyone?) or a weird number (28K).

Add a predicate to all of these tests so that we can _notrun them if
they make assumptions about file size /and/ encode something (usually
file hashes) in the golden output that mean we can't easily accomodate
these corner cases without redesigning each test.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=check-blocksize-congruency
---
 common/filter     |    4 ++--
 common/punch      |    3 ++-
 common/rc         |   18 +++++++++++++++++-
 tests/generic/017 |    2 +-
 tests/generic/031 |    1 +
 tests/generic/064 |    2 +-
 tests/generic/116 |    1 +
 tests/generic/118 |    1 +
 tests/generic/119 |    1 +
 tests/generic/121 |    1 +
 tests/generic/122 |    1 +
 tests/generic/134 |    1 +
 tests/generic/136 |    1 +
 tests/generic/137 |    1 +
 tests/generic/144 |    1 +
 tests/generic/149 |    1 +
 tests/generic/153 |    2 +-
 tests/generic/158 |    2 +-
 tests/generic/162 |    1 +
 tests/generic/163 |    1 +
 tests/generic/164 |    1 +
 tests/generic/165 |    1 +
 tests/generic/168 |    1 +
 tests/generic/170 |    1 +
 tests/generic/181 |    1 +
 tests/generic/183 |    1 +
 tests/generic/185 |    1 +
 tests/generic/186 |    1 +
 tests/generic/187 |    1 +
 tests/generic/188 |    1 +
 tests/generic/189 |    1 +
 tests/generic/190 |    1 +
 tests/generic/191 |    1 +
 tests/generic/194 |    1 +
 tests/generic/195 |    1 +
 tests/generic/196 |    1 +
 tests/generic/197 |    1 +
 tests/generic/199 |    1 +
 tests/generic/200 |    1 +
 tests/generic/201 |    1 +
 tests/generic/284 |    1 +
 tests/generic/287 |    1 +
 tests/generic/289 |    1 +
 tests/generic/290 |    1 +
 tests/generic/291 |    1 +
 tests/generic/292 |    1 +
 tests/generic/293 |    1 +
 tests/generic/295 |    1 +
 tests/generic/352 |    1 +
 tests/generic/358 |    1 +
 tests/generic/359 |    1 +
 tests/generic/372 |    1 +
 tests/generic/404 |    2 +-
 tests/generic/414 |    1 +
 tests/generic/483 |    4 ++++
 tests/generic/495 |    4 ++++
 tests/generic/501 |    1 +
 tests/generic/503 |    4 ++++
 tests/generic/515 |    1 +
 tests/generic/516 |    1 +
 tests/generic/540 |    1 +
 tests/generic/541 |    1 +
 tests/generic/542 |    1 +
 tests/generic/543 |    1 +
 tests/generic/544 |    1 +
 tests/generic/546 |    1 +
 tests/generic/578 |    1 +
 tests/generic/588 |    2 ++
 tests/generic/673 |    1 +
 tests/generic/674 |    1 +
 tests/generic/675 |    1 +
 tests/generic/677 |    4 ++++
 tests/generic/683 |    1 +
 tests/generic/684 |    1 +
 tests/generic/685 |    1 +
 tests/generic/686 |    1 +
 tests/generic/687 |    1 +
 tests/generic/688 |    1 +
 tests/xfs/069     |    1 +
 tests/xfs/114     |    2 ++
 tests/xfs/166     |    4 ++++
 tests/xfs/180     |    1 +
 tests/xfs/182     |    1 +
 tests/xfs/184     |    1 +
 tests/xfs/192     |    1 +
 tests/xfs/193     |    1 +
 tests/xfs/198     |    1 +
 tests/xfs/200     |    1 +
 tests/xfs/203     |    4 ++++
 tests/xfs/204     |    1 +
 tests/xfs/208     |    1 +
 tests/xfs/209     |    1 +
 tests/xfs/210     |    1 +
 tests/xfs/211     |    1 +
 tests/xfs/212     |    1 +
 tests/xfs/215     |    1 +
 tests/xfs/218     |    1 +
 tests/xfs/219     |    1 +
 tests/xfs/221     |    1 +
 tests/xfs/223     |    1 +
 tests/xfs/224     |    1 +
 tests/xfs/225     |    1 +
 tests/xfs/226     |    1 +
 tests/xfs/228     |    1 +
 tests/xfs/230     |    1 +
 tests/xfs/231     |    1 +
 tests/xfs/232     |    1 +
 tests/xfs/237     |    1 +
 tests/xfs/239     |    1 +
 tests/xfs/240     |    1 +
 tests/xfs/241     |    1 +
 tests/xfs/248     |    1 +
 tests/xfs/249     |    1 +
 tests/xfs/251     |    1 +
 tests/xfs/254     |    1 +
 tests/xfs/255     |    1 +
 tests/xfs/256     |    1 +
 tests/xfs/257     |    1 +
 tests/xfs/258     |    1 +
 tests/xfs/280     |    1 +
 tests/xfs/312     |    1 +
 tests/xfs/315     |    1 +
 tests/xfs/322     |    1 +
 tests/xfs/326     |    1 +
 tests/xfs/329     |    1 +
 tests/xfs/346     |    1 +
 tests/xfs/347     |    1 +
 tests/xfs/436     |    1 +
 tests/xfs/507     |    3 +++
 tests/xfs/537     |    2 +-
 130 files changed, 170 insertions(+), 10 deletions(-)


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [PATCHSET v2 0/8] fstests: check file block congruency of file range operations
@ 2022-07-19 21:37 Darrick J. Wong
  2022-07-19 21:37 ` [PATCH 2/8] misc: skip remap/fallocate tests when op length not congruent with file allocation unit Darrick J. Wong
  0 siblings, 1 reply; 20+ messages in thread
From: Darrick J. Wong @ 2022-07-19 21:37 UTC (permalink / raw)
  To: djwong, guaneryu, zlang; +Cc: linux-xfs, fstests, guan, tytso, leah.rumancik

Hi all,

I started running fstests with XFS filesystems that don't have the usual
file geometry characteristics -- block sizes larger than 4k, realtime
filesystems with extent sizes that aren't a power of two, etc.  What I
found is that many file operation tests (fallocate, reflink, etc.) that
operate on disk blocks assume that aligning the arguments to 64k is
sufficient to avoid EINVAL.  Unfortunately, this just means that these
tests fail left and right on realtime filesystems where the file
allocation unit is large (~2MB, anyone?) or a weird number (28K).

Add a predicate to all of these tests so that we can _notrun them if
they make assumptions about file size /and/ encode something (usually
file hashes) in the golden output that mean we can't easily accomodate
these corner cases without redesigning each test.

v2: skip congruency tests for network filesystems, be more consistent about
    TEST_DIR in the arguments, fix a bug in a helper's callsite reported by
    Zorro.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=check-blocksize-congruency
---
 common/filter     |    4 ++--
 common/punch      |    3 ++-
 common/rc         |   28 +++++++++++++++++++++++++++-
 tests/generic/017 |    2 +-
 tests/generic/031 |    1 +
 tests/generic/064 |    2 +-
 tests/generic/116 |    1 +
 tests/generic/118 |    1 +
 tests/generic/119 |    1 +
 tests/generic/121 |    1 +
 tests/generic/122 |    1 +
 tests/generic/134 |    1 +
 tests/generic/136 |    1 +
 tests/generic/137 |    1 +
 tests/generic/144 |    1 +
 tests/generic/149 |    1 +
 tests/generic/153 |    2 +-
 tests/generic/158 |    2 +-
 tests/generic/162 |    1 +
 tests/generic/163 |    1 +
 tests/generic/164 |    1 +
 tests/generic/165 |    1 +
 tests/generic/168 |    1 +
 tests/generic/170 |    1 +
 tests/generic/181 |    1 +
 tests/generic/183 |    1 +
 tests/generic/185 |    1 +
 tests/generic/186 |    1 +
 tests/generic/187 |    1 +
 tests/generic/188 |    1 +
 tests/generic/189 |    1 +
 tests/generic/190 |    1 +
 tests/generic/191 |    1 +
 tests/generic/194 |    1 +
 tests/generic/195 |    1 +
 tests/generic/196 |    1 +
 tests/generic/197 |    1 +
 tests/generic/199 |    1 +
 tests/generic/200 |    1 +
 tests/generic/201 |    1 +
 tests/generic/284 |    1 +
 tests/generic/287 |    1 +
 tests/generic/289 |    1 +
 tests/generic/290 |    1 +
 tests/generic/291 |    1 +
 tests/generic/292 |    1 +
 tests/generic/293 |    1 +
 tests/generic/295 |    1 +
 tests/generic/352 |    1 +
 tests/generic/358 |    1 +
 tests/generic/359 |    1 +
 tests/generic/372 |    1 +
 tests/generic/404 |    2 +-
 tests/generic/414 |    1 +
 tests/generic/483 |    4 ++++
 tests/generic/495 |    4 ++++
 tests/generic/501 |    1 +
 tests/generic/503 |    4 ++++
 tests/generic/515 |    1 +
 tests/generic/516 |    1 +
 tests/generic/540 |    1 +
 tests/generic/541 |    1 +
 tests/generic/542 |    1 +
 tests/generic/543 |    1 +
 tests/generic/544 |    1 +
 tests/generic/546 |    1 +
 tests/generic/578 |    1 +
 tests/generic/588 |    2 ++
 tests/generic/673 |    1 +
 tests/generic/674 |    1 +
 tests/generic/675 |    1 +
 tests/generic/677 |    4 ++++
 tests/generic/683 |    1 +
 tests/generic/684 |    1 +
 tests/generic/685 |    1 +
 tests/generic/686 |    1 +
 tests/generic/687 |    1 +
 tests/generic/688 |    1 +
 tests/xfs/069     |    1 +
 tests/xfs/114     |    2 ++
 tests/xfs/166     |    4 ++++
 tests/xfs/180     |    1 +
 tests/xfs/182     |    1 +
 tests/xfs/184     |    1 +
 tests/xfs/192     |    1 +
 tests/xfs/193     |    1 +
 tests/xfs/198     |    1 +
 tests/xfs/200     |    1 +
 tests/xfs/203     |    4 ++++
 tests/xfs/204     |    1 +
 tests/xfs/208     |    1 +
 tests/xfs/209     |    1 +
 tests/xfs/210     |    1 +
 tests/xfs/211     |    1 +
 tests/xfs/212     |    1 +
 tests/xfs/215     |    1 +
 tests/xfs/218     |    1 +
 tests/xfs/219     |    1 +
 tests/xfs/221     |    1 +
 tests/xfs/223     |    1 +
 tests/xfs/224     |    1 +
 tests/xfs/225     |    1 +
 tests/xfs/226     |    1 +
 tests/xfs/228     |    1 +
 tests/xfs/230     |    1 +
 tests/xfs/231     |    1 +
 tests/xfs/232     |    1 +
 tests/xfs/237     |    1 +
 tests/xfs/239     |    1 +
 tests/xfs/240     |    1 +
 tests/xfs/241     |    1 +
 tests/xfs/248     |    1 +
 tests/xfs/249     |    1 +
 tests/xfs/251     |    1 +
 tests/xfs/254     |    1 +
 tests/xfs/255     |    1 +
 tests/xfs/256     |    1 +
 tests/xfs/257     |    1 +
 tests/xfs/258     |    1 +
 tests/xfs/280     |    1 +
 tests/xfs/312     |    1 +
 tests/xfs/315     |    1 +
 tests/xfs/322     |    1 +
 tests/xfs/326     |    1 +
 tests/xfs/329     |    1 +
 tests/xfs/346     |    1 +
 tests/xfs/347     |    1 +
 tests/xfs/436     |    1 +
 tests/xfs/507     |    3 +++
 tests/xfs/537     |    2 +-
 130 files changed, 180 insertions(+), 10 deletions(-)


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-07-19 21:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13  0:56 [PATCHSET 0/8] fstests: check file block congruency of file range operations Darrick J. Wong
2022-07-13  0:56 ` [PATCH 1/8] misc: use _get_file_block_size for block (re)mapping tests Darrick J. Wong
2022-07-13 14:26   ` Zorro Lang
2022-07-13  0:56 ` [PATCH 2/8] misc: skip remap/fallocate tests when op length not congruent with file allocation unit Darrick J. Wong
2022-07-15 18:27   ` Zorro Lang
2022-07-15 22:24     ` Darrick J. Wong
2022-07-16 16:24       ` Zorro Lang
2022-07-18 17:30         ` Darrick J. Wong
2022-07-13  0:56 ` [PATCH 3/8] misc: skip extent size hint tests when hint " Darrick J. Wong
2022-07-13  0:56 ` [PATCH 4/8] misc: avoid tests encoding FIEMAP/BMAP golden output with weird file blocksizes Darrick J. Wong
2022-07-13  0:57 ` [PATCH 5/8] punch: use allocation unit to test punching holes Darrick J. Wong
2022-07-13  0:57 ` [PATCH 6/8] punch: skip fpunch tests when op length not congruent with file allocation unit Darrick J. Wong
2022-07-13 17:04   ` Zorro Lang
2022-07-13 17:33     ` Darrick J. Wong
2022-07-13 17:51       ` Zorro Lang
2022-07-18 17:31         ` Darrick J. Wong
2022-07-13  0:57 ` [PATCH 7/8] filter: report data block mappings and od offsets in multiples of allocation units Darrick J. Wong
2022-07-13 17:16   ` Zorro Lang
2022-07-13  0:57 ` [PATCH 8/8] punch: skip fpunch tests when page size not congruent with file allocation unit Darrick J. Wong
  -- strict thread matches above, loose matches on Subject: below --
2022-07-19 21:37 [PATCHSET v2 0/8] fstests: check file block congruency of file range operations Darrick J. Wong
2022-07-19 21:37 ` [PATCH 2/8] misc: skip remap/fallocate tests when op length not congruent with file allocation unit Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox