ext4: add lots of KUnit tests!
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest26 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/26 | ext4: add KUinit tests for fs/ext4/extents_status.cfs/ fs/ fs/ +2 more | +1678 | 0 replies | |
| 2/26 | ext4: add KUnit tests for fs/ext4/extents.cfs/ fs/ fs/ +5 more | +2147 | 0 replies | |
| 3/26 | ext4: add KUnit tests for fs/ext4/xattr.cfs/ fs/ fs/ +9 more | +1895 | 0 replies | |
| 4/26 | ext4: add KUnit tests for fs/ext4/namei.cfs/ fs/ fs/ +4 more | +2741 | 0 replies | |
| 5/26 | ext4: expand KUnit tests for fs/ext4/mballoc.cfs/ fs/ fs/ +1 more | +2120 | 0 replies | |
| 6/26 | ext4: add KUnit tests for fs/ext4/inline.cfs/ fs/ fs/ +3 more | +1893 | 0 replies | |
| 7/26 | ext4: add KUnit tests for fs/ext4/fast_commit.cfs/ fs/ fs/ +5 more | +2928 | 0 replies | |
| 8/26 | ext4: expand KUnit tests for fs/ext4/inode.cfs/ fs/ fs/ +3 more | +3689 | 0 replies | |
| 9/26 | ext4: add KUnit tests for fs/ext4/ialloc.cfs/ fs/ fs/ +5 more | +2865 | 0 replies | |
| 10/26 | ext4: add KUnit tests for fs/ext4/balloc.cfs/ fs/ fs/ | +2412 | 0 replies | |
| 11/26 | ext4: add KUnit tests for fs/ext4/orphan.cfs/ fs/ fs/ +2 more | +2381 | 0 replies | |
| 12/26 | ext4: add KUnit tests for fs/ext4/block_validity.cfs/ fs/ fs/ | +1528 | 0 replies | |
| 13/26 | ext4: check multi-block overlap on left traversal in add_system_zone()fs/ fs/ | +72 | 0 replies | |
| 14/26 | ext4: enable full feature coverage in fs/ext4/.kunitconfigfs/ fs/ fs/ +7 more | +121 | 0 replies | |
| 15/26 | ext4: add KUnit tests for fs/ext4/super.cfs/ fs/ fs/ +1 more | +1610 | 0 replies | |
| 16/26 | ext4: add KUnit tests for fs/ext4/sysfs.cfs/ fs/ fs/ +1 more | +744 | 0 replies | |
| 17/26 | ext4: add KUnit tests for fs/ext4/ioctl.cfs/ fs/ fs/ +1 more | +1411 | 0 replies | |
| 18/26 | ext4: add KUnit tests for fs/ext4/resize.cfs/ fs/ fs/ +1 more | +1448 | 0 replies | |
| 19/26 | ext4: add KUnit tests for fs/ext4/migrate.cfs/ fs/ fs/ +1 more | +1079 | 0 replies | |
| 20/26 | ext4: add KUnit tests for fs/ext4/indirect.cfs/ fs/ fs/ +2 more | +1321 | 0 replies | |
| 21/26 | ext4: expand KUnit tests in fs/ext4/extents-test.c for file range operationsfs/ fs/ | +532 | 0 replies | |
| 22/26 | ext4: add KUnit tests for fs/ext4/fsmap.cfs/ fs/ fs/ +1 more | +803 | 0 replies | |
| 23/26 | ext4: add KUnit tests for fs/ext4/move_extent.cfs/ fs/ fs/ +1 more | +1052 | 0 replies | |
| 24/26 | ext4: add KUnit tests for fs/ext4/mmp.cfs/ fs/ fs/ +1 more | +770 | 0 replies | |
| 25/26 | ext4: add KUnit tests for fs/ext4/dir.cfs/ fs/ fs/ +2 more | +1040 | 0 replies | |
| 26/26 | ext4: add KUnit regression tests for inode migration fixesfs/ fs/ fs/ | +334 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH -v2 00/26] ext4: add lots of KUnit tests!
These unit tests were written using the writing-kunit-tests.md prompt[1]. It has received human review, as well as multiple passes with LLM's, especially since the -v1 release.
[1] https://drive.google.com/file/d/1MVZIhlG79kTRX_A65phWiZkTPJEtypsL/view
While the LLM was busily generating these unit tests, it also found around two dozen potential bug fixes[2]. Those will be sent in a separate series.
[2] https://drive.google.com/file/d/1pnTKAVf9pAoCK27619uP4_3_hpE04SkR/view
The patches in this series are available at the ext4.git tree on the branch ext4-kunit-tests[3], which is now based on the ext4.git dev branch[4] (commit 008aad6508e3, on top of v7.4-rc2).
[3] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/log/?h=ext4-kunit-tests
[4] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/log/?h=dev
Changes since v1[5]:
- Rebased from v7.3-rc4 onto the ext4.git dev branch (on top of v7.4-rc2), updating test stubs, teardown helpers, and expectations for upstream and dev changes (ext4_es_destroy_stats(), const struct mnt_idmap *, buffer_write_io_error(), handle_t * zeroout arguments, blkdev_issue_flush() error propagation, sb_find_get_block() inode bitmap lookups, the 2 MiB max orphan file size, flex_bg sibling directory spreading, and stopping cleanly on incomplete fast commit replay).
- Dropped "ext4: zero s_fc_replay_state in ext4_fc_replay_cleanup()", superseded by commit 2d36dbdbf575 ("ext4: free fast commit replay state on failed mounts") in dev.
- Squashed "ext4: add KUnit tests for ext4_ext_split() leaf and index splitting" into "ext4: add KUnit tests for fs/ext4/extents.c".
- Added "ext4: add KUnit regression tests for inode migration fixes" covering the ext4_ext_migrate() fixes now in dev.
- Addressed build, sparse, bisection, portability, and test-lifecycle issues reported by the kernel test robot and sashiko-bot, along with follow-up verification fixes across UML, x86_64, i386, arm, and arm64 (including 16K/64K pages, lockdep, KASAN, sparse C=2, and per-commit CONFIG_EXT4_KUNIT_TESTS=m builds):
* Deduplicated and reordered EXPORT_SYMBOL_FOR_EXT4_TEST() exports, dropped unused mballoc test wrappers, and moved the SB_ENC_STRICT_MODE_FL fix into the namei test patch for clean modular and CONFIG_UNICODE=y bisection.
* Fixed 32-bit 64-bit-division link errors (div_u64/div_u64_rem), big-endian EXT4_EXT_MAGIC checks, sparse warnings (__le16/__le32, __percpu, __bitwise, flexible-array structs, upper_32_bits()), unaligned bitmap word ops, and large stack frames in tests.
* Fixed mock superblock and inode teardown (attaching s_root via d_make_root() so deactivate_super() drains fserror_worker(), moving ext4_es_remove_extent() from .free_inode to .evict_inode, draining RCU callbacks via rcu_barrier(), and registering KUnit cleanup actions for early-abort safety).
* Fixed lockdep key initialization, i_size_ordered_init() on mock inodes, CONFIG_HIGHMEM folio copies, 16K/64K PAGE_SIZE block and buddy-group spacing, SMP/preemption test races, RTC-less i_dtime checks, and !CONFIG_QUOTA / !CONFIG_PRINTK handling.
[5] https://lore.kernel.org/r/[email protected]
Theodore Ts'o (26):
ext4: add KUinit tests for fs/ext4/extents_status.c
ext4: add KUnit tests for fs/ext4/extents.c
ext4: add KUnit tests for fs/ext4/xattr.c
ext4: add KUnit tests for fs/ext4/namei.c
ext4: expand KUnit tests for fs/ext4/mballoc.c
ext4: add KUnit tests for fs/ext4/inline.c
ext4: add KUnit tests for fs/ext4/fast_commit.c
ext4: expand KUnit tests for fs/ext4/inode.c
ext4: add KUnit tests for fs/ext4/ialloc.c
ext4: add KUnit tests for fs/ext4/balloc.c
ext4: add KUnit tests for fs/ext4/orphan.c
ext4: add KUnit tests for fs/ext4/block_validity.c
ext4: check multi-block overlap on left traversal in add_system_zone()
ext4: enable full feature coverage in fs/ext4/.kunitconfig
ext4: add KUnit tests for fs/ext4/super.c
ext4: add KUnit tests for fs/ext4/sysfs.c
ext4: add KUnit tests for fs/ext4/ioctl.c
ext4: add KUnit tests for fs/ext4/resize.c
ext4: add KUnit tests for fs/ext4/migrate.c
ext4: add KUnit tests for fs/ext4/indirect.c
ext4: expand KUnit tests in fs/ext4/extents-test.c for file range
operations
ext4: add KUnit tests for fs/ext4/fsmap.c
ext4: add KUnit tests for fs/ext4/move_extent.c
ext4: add KUnit tests for fs/ext4/mmp.c
ext4: add KUnit tests for fs/ext4/dir.c
ext4: add KUnit regression tests for inode migration fixes
fs/ext4/.kunitconfig | 7 + fs/ext4/Makefile | 12 +- fs/ext4/balloc-test.c | 2403 ++++++++++++++++++++++ fs/ext4/balloc.c | 11 +- fs/ext4/bitmap.c | 5 + fs/ext4/block_validity-test.c | 1598 +++++++++++++++ fs/ext4/block_validity.c | 11 +- fs/ext4/crypto.c | 4 + fs/ext4/dir-test.c | 993 ++++++++++ fs/ext4/dir.c | 37 + fs/ext4/ext4.h | 255 ++- fs/ext4/ext4_extents.h | 21 + fs/ext4/ext4_jbd2.c | 21 + fs/ext4/extents-test.c | 2625 +++++++++++++++++++++++- fs/ext4/extents.c | 99 +- fs/ext4/extents_status-test.c | 1646 ++++++++++++++++ fs/ext4/extents_status.c | 23 + fs/ext4/fast_commit-test.c | 2714 +++++++++++++++++++++++++ fs/ext4/fast_commit.c | 180 +- fs/ext4/fsmap-test.c | 796 ++++++++ fs/ext4/fsmap.c | 3 + fs/ext4/ialloc-test.c | 2731 +++++++++++++++++++++++++ fs/ext4/ialloc.c | 104 +- fs/ext4/indirect-test.c | 1293 ++++++++++++ fs/ext4/indirect.c | 18 +- fs/ext4/inline-test.c | 1866 ++++++++++++++++++ fs/ext4/inline.c | 34 +- fs/ext4/inode-test.c | 3511 ++++++++++++++++++++++++++++++++- fs/ext4/inode.c | 192 +- fs/ext4/ioctl-test.c | 1198 +++++++++++ fs/ext4/ioctl.c | 249 ++- fs/ext4/mballoc-test.c | 1940 +++++++++++++++++- fs/ext4/mballoc.c | 181 +- fs/ext4/mballoc.h | 40 + fs/ext4/migrate-test.c | 1384 +++++++++++++ fs/ext4/migrate.c | 11 + fs/ext4/mmp-test.c | 661 +++++++ fs/ext4/mmp.c | 117 +- fs/ext4/move_extent-test.c | 1023 ++++++++++ fs/ext4/move_extent.c | 22 + fs/ext4/namei-test.c | 2347 ++++++++++++++++++++++ fs/ext4/namei.c | 342 ++-- fs/ext4/namei.h | 213 ++ fs/ext4/orphan-test.c | 2372 ++++++++++++++++++++++ fs/ext4/orphan.c | 12 + fs/ext4/page-io.c | 1 + fs/ext4/resize-test.c | 1336 +++++++++++++ fs/ext4/resize.c | 102 +- fs/ext4/super-test.c | 1345 +++++++++++++ fs/ext4/super.c | 276 ++- fs/ext4/sysfs-test.c | 679 +++++++ fs/ext4/sysfs.c | 55 + fs/ext4/xattr-test.c | 1822 +++++++++++++++++ fs/ext4/xattr.c | 30 +- fs/ext4/xattr.h | 2 + fs/ext4/xattr_hurd.c | 4 + fs/ext4/xattr_security.c | 4 + fs/ext4/xattr_trusted.c | 4 + fs/ext4/xattr_user.c | 4 + 59 files changed, 40569 insertions(+), 420 deletions(-) create mode 100644 fs/ext4/balloc-test.c create mode 100644 fs/ext4/block_validity-test.c create mode 100644 fs/ext4/dir-test.c create mode 100644 fs/ext4/extents_status-test.c create mode 100644 fs/ext4/fast_commit-test.c create mode 100644 fs/ext4/fsmap-test.c create mode 100644 fs/ext4/ialloc-test.c create mode 100644 fs/ext4/indirect-test.c create mode 100644 fs/ext4/inline-test.c create mode 100644 fs/ext4/ioctl-test.c create mode 100644 fs/ext4/migrate-test.c create mode 100644 fs/ext4/mmp-test.c create mode 100644 fs/ext4/move_extent-test.c create mode 100644 fs/ext4/namei-test.c create mode 100644 fs/ext4/namei.h create mode 100644 fs/ext4/orphan-test.c create mode 100644 fs/ext4/resize-test.c create mode 100644 fs/ext4/super-test.c create mode 100644 fs/ext4/sysfs-test.c create mode 100644 fs/ext4/xattr-test.c
base-commit: 008aad6508e30cd1bb6d2c2cf65221ba1f16a065
Signature · 1 line
2.56.1.708.g77570a6a1d-goog