Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH -v2 00/26] ext4: add lots of KUnit tests!
@ 2026-11-19 15:56 Theodore Ts'o
  2026-11-19 15:56 ` [PATCH -v2 01/26] ext4: add KUinit tests for fs/ext4/extents_status.c Theodore Ts'o
                   ` (25 more replies)
  0 siblings, 26 replies; 53+ messages in thread
From: Theodore Ts'o @ 2026-11-19 15:56 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

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/20261112040638.1576836-1-tytso@mit.edu

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
-- 
2.56.1.708.g77570a6a1d-goog


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

end of thread, other threads:[~2026-11-19 16:19 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 15:56 [PATCH -v2 00/26] ext4: add lots of KUnit tests! Theodore Ts'o
2026-11-19 15:56 ` [PATCH -v2 01/26] ext4: add KUinit tests for fs/ext4/extents_status.c Theodore Ts'o
2026-11-19 16:05   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 02/26] ext4: add KUnit tests for fs/ext4/extents.c Theodore Ts'o
2026-11-19 16:19   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 03/26] ext4: add KUnit tests for fs/ext4/xattr.c Theodore Ts'o
2026-11-19 16:11   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 04/26] ext4: add KUnit tests for fs/ext4/namei.c Theodore Ts'o
2026-11-19 16:11   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 05/26] ext4: expand KUnit tests for fs/ext4/mballoc.c Theodore Ts'o
2026-11-19 16:08   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 06/26] ext4: add KUnit tests for fs/ext4/inline.c Theodore Ts'o
2026-11-19 16:07   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 07/26] ext4: add KUnit tests for fs/ext4/fast_commit.c Theodore Ts'o
2026-11-19 16:07   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 08/26] ext4: expand KUnit tests for fs/ext4/inode.c Theodore Ts'o
2026-11-19 16:07   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 09/26] ext4: add KUnit tests for fs/ext4/ialloc.c Theodore Ts'o
2026-11-19 16:13   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 10/26] ext4: add KUnit tests for fs/ext4/balloc.c Theodore Ts'o
2026-11-19 16:06   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 11/26] ext4: add KUnit tests for fs/ext4/orphan.c Theodore Ts'o
2026-11-19 16:07   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 12/26] ext4: add KUnit tests for fs/ext4/block_validity.c Theodore Ts'o
2026-11-19 16:12   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 13/26] ext4: check multi-block overlap on left traversal in add_system_zone() Theodore Ts'o
2026-11-19 16:00   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 14/26] ext4: enable full feature coverage in fs/ext4/.kunitconfig Theodore Ts'o
2026-11-19 16:12   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 15/26] ext4: add KUnit tests for fs/ext4/super.c Theodore Ts'o
2026-11-19 16:07   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 16/26] ext4: add KUnit tests for fs/ext4/sysfs.c Theodore Ts'o
2026-11-19 16:08   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 17/26] ext4: add KUnit tests for fs/ext4/ioctl.c Theodore Ts'o
2026-11-19 16:12   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 18/26] ext4: add KUnit tests for fs/ext4/resize.c Theodore Ts'o
2026-11-19 16:16   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 19/26] ext4: add KUnit tests for fs/ext4/migrate.c Theodore Ts'o
2026-11-19 16:11   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 20/26] ext4: add KUnit tests for fs/ext4/indirect.c Theodore Ts'o
2026-11-19 16:16   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 21/26] ext4: expand KUnit tests in fs/ext4/extents-test.c for file range operations Theodore Ts'o
2026-11-19 16:12   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 22/26] ext4: add KUnit tests for fs/ext4/fsmap.c Theodore Ts'o
2026-11-19 16:13   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 23/26] ext4: add KUnit tests for fs/ext4/move_extent.c Theodore Ts'o
2026-11-19 16:14   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 24/26] ext4: add KUnit tests for fs/ext4/mmp.c Theodore Ts'o
2026-11-19 16:12   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 25/26] ext4: add KUnit tests for fs/ext4/dir.c Theodore Ts'o
2026-11-19 16:17   ` sashiko-bot
2026-11-19 15:56 ` [PATCH -v2 26/26] ext4: add KUnit regression tests for inode migration fixes Theodore Ts'o
2026-11-19 16:15   ` sashiko-bot

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