Skip to content

tests for btrfs fsverity

Boris Burkov fstests linux-btrfs linux-fscrypt 12 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v13 Latest5 patches 3 repliesIn review
  2. v125 patches 3 repliesSuperseded
  3. v115 patches 0 repliesSuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v105 patches1 replySuperseded
v95 patches6 repliesSuperseded
v85 patches9 repliesSuperseded
v75 patches5 repliesSuperseded
v64 patches5 repliesSuperseded
v54 patches3 repliesSuperseded
v44 patches8 repliesSuperseded
v33 patches3 repliesSuperseded
v23 patches6 repliesSuperseded

Changes in v13 from the cover letter

- Fix quoting of $MOUNT_OPTION in -z check
- Stash $MOUNT_OPTION export for btrfs in _require_scratch_verity
- Change pointless '<f grep foo' to 'grep foo f' in generic/574
- Refactor logwrites orphan test to use logwrites fua hunting functions. It ran in 6 seconds instead of ~30 on my machine, and I was able to verify that it still hit all the interesting cases.
- Add recoveryloop group to orphan test
- Get rid of overly pessimistic "UNKNOWN.3[67]" from verity item grep, rely on a new version of progs (needed for corruption functions and COMPAT_RO flags anyway...)

Patches in v13 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5common/verity: require corruption functionalitycommon/verity tests/generic/574 tests/generic/576+8 -00 replies
2/5common/verity: support btrfs in generic fsverity testscommon/btrfs common/config common/verity +2 more+75 -121 reply
3/5btrfs: test btrfs specific fsverity corruptiontests/btrfs/290 tests/btrfs/290.out+197 -00 replies
4/5btrfs: test verity orphans with dmlogwritestests/btrfs/291 tests/btrfs/291.out+170 -01 reply
5/5generic: test fs-verity EFBIG scenarioscommon/verity tests/generic/692 tests/generic/692.out+82 -00 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosef BacikEric BiggersSweet Tea Dorminy
SeriesR-b
1/5R-b R-b R-b
2/5R-b R-b
3/5R-b
4/5R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v13 thread

Cover letter [PATCH v13 0/5] tests for btrfs fsverity

This patchset provides tests for fsverity support in btrfs.

It includes modifications for generic tests to pass with btrfs as well as new tests.

--
v13:
- Fix quoting of $MOUNT_OPTION in -z check
- Stash $MOUNT_OPTION export for btrfs in _require_scratch_verity
- Change pointless '<f grep foo' to 'grep foo f' in generic/574
- Refactor logwrites orphan test to use logwrites fua hunting functions. It ran in 6 seconds instead of ~30 on my machine, and I was able to verify that it still hit all the interesting cases.
- Add recoveryloop group to orphan test
- Get rid of overly pessimistic "UNKNOWN.3[67]" from verity item grep, rely on a new version of progs (needed for corruption functions and COMPAT_RO flags anyway...)
v12:
- Actually incorporate Sweet Tea's significant improvement to the commit message for the log-writes test.
v11:
- remove unneeded common/btrfs sourcing from common/verity
- fix btrfs/290 prealloc test in case the disk extent actually had zeros.
- make logic a little more consistent in btrfs/291
- make btrfs/291 work regardless of how btrfs-progs prints the Merkle items.
v10:
- rebase
- add nodatasum instead of setting it
- rewrite eof block test to read zap_len at eof and to compare with a zero file instead of using xxd
- add _require_loop to the log_writes test

v9:
- use nodatasum for btrfs corruption tests.
- modify eof block corruption test to allow all zeroes rather than requiring an error.
v8:
- reorganize to have a patch for enabling generic tests followed by the patches with new and specific tests.
- fix some rebasing miscues from v7.
- fix a chunk of space characters instead of a tab in the new requires function.
v7:
- add a new patch to make the new corruption requires more clear
- require corruption in generic/576
- require only btrfs_corrupt_block in btrfs/290
- add missing xfs_io requirements in btrfs/290
- remove unneeded zero byte check from btrfs corruption function
- fix sloppy extras in generic/690
v6:
- refactor "requires" for verity corruption tests so that other verity tests can run on btrfs even without the corruption command available. Also, explictly require xfs_io fiemap for all corruption tests.
- simplify and clarify "non-trivial EFBIG" calculation and documentation per suggestions by Eric Biggers.
- remove unnecessary adjustment to max file size in the new EFBIG test; the bug it worked around has been fixed.
v5:
- more idiomatic requires structure for making efbig test generic
- make efbig test use truncate instead of pwrite for making a big file
- improve documentation for efbig test approximation
- fix underscores vs dashes in btrfs_requires_corrupt_block
- improvements in missing/redundant requires invocations
- move orphan test image file to $TEST_DIR
- make orphan test replay/snapshot device size depend on log device instead of hard-coding it.
- rebase (signicant: no more "groups" file; use preamble) v4:
- mark local variables
- get rid of redundant mounts and syncs
- use '_' in function names correctly
- add a test for the EFBIG case
- reduce usage of requires_btrfs_corrupt_block
- handle variable input when corrupting merkle tree
v3: rebase onto xfstests master branch
v2: pass generic tests, add logwrites test

Boris Burkov (5):
common/verity: require corruption functionality common/verity: support btrfs in generic fsverity tests
btrfs: test btrfs specific fsverity corruption
btrfs: test verity orphans with dmlogwrites
generic: test fs-verity EFBIG scenarios

 common/btrfs          |   5 ++
 common/config         |   1 +
 common/verity         |  48 ++++++++++++
 tests/btrfs/290       | 172 ++++++++++++++++++++++++++++++++++++++++++
 tests/btrfs/290.out   |  25 ++++++
 tests/btrfs/291       | 168 +++++++++++++++++++++++++++++++++++++++++
 tests/btrfs/291.out   |   2 +
 tests/generic/574     |  38 +++++++++-
 tests/generic/574.out |  13 +---
 tests/generic/576     |   1 +
 tests/generic/692     |  64 ++++++++++++++++
 tests/generic/692.out |   7 ++
 12 files changed, 532 insertions(+), 12 deletions(-)
 create mode 100755 tests/btrfs/290
 create mode 100644 tests/btrfs/290.out
 create mode 100755 tests/btrfs/291
 create mode 100644 tests/btrfs/291.out
 create mode 100644 tests/generic/692
 create mode 100644 tests/generic/692.out
Signature · 1 line
2.37.1