Skip to content

ext4: add lots of KUnit tests!

Theodore Ts'o linux-ext4 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest27 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27ext4: add KUinit tests for fs/ext4/extents_status.cfs/ext4/Makefile fs/ext4/extents.c fs/ext4/extents_status-test.c +2 more+1671 -60 replies
2/27ext4: add KUnit tests for fs/ext4/extents.cfs/ext4/ext4_extents.h fs/ext4/ext4_jbd2.c fs/ext4/extents-test.c +3 more+1938 -720 replies
3/27ext4: add KUnit tests for ext4_ext_split() leaf and index splittingfs/ext4/extents-test.c fs/ext4/move_extent.c+203 -80 replies
4/27ext4: add KUnit tests for fs/ext4/xattr.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/ialloc.c +9 more+1886 -40 replies
5/27ext4: add KUnit tests for fs/ext4/namei.cfs/ext4/Makefile fs/ext4/crypto.c fs/ext4/dir.c +4 more+2708 -1650 replies
6/27ext4: expand KUnit tests for fs/ext4/mballoc.cfs/ext4/mballoc-test.c fs/ext4/mballoc.c fs/ext4/mballoc.h+2089 -160 replies
7/27ext4: add KUnit tests for fs/ext4/inline.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/ext4_jbd2.c +3 more+1864 -20 replies
8/27ext4: zero s_fc_replay_state in ext4_fc_replay_cleanup()fs/ext4/fast_commit.c+1 -00 replies
9/27ext4: add KUnit tests for fs/ext4/fast_commit.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/extents_status.c +5 more+2882 -70 replies
10/27ext4: expand KUnit tests for fs/ext4/inode.cfs/ext4/ext4.h fs/ext4/ext4_jbd2.c fs/ext4/ialloc.c +4 more+3640 -120 replies
11/27ext4: add KUnit tests for fs/ext4/ialloc.cfs/ext4/Makefile fs/ext4/bitmap.c fs/ext4/ext4.h +5 more+2844 -80 replies
12/27ext4: add KUnit tests for fs/ext4/balloc.cfs/ext4/Makefile fs/ext4/balloc-test.c fs/ext4/balloc.c+2371 -20 replies
13/27ext4: add KUnit tests for fs/ext4/orphan.cfs/ext4/Makefile fs/ext4/inode.c fs/ext4/orphan-test.c +1 more+2372 -10 replies
14/27ext4: add KUnit tests for fs/ext4/block_validity.cfs/ext4/Makefile fs/ext4/block_validity-test.c fs/ext4/block_validity.c+1525 -10 replies
15/27ext4: check multi-block overlap on left traversal in add_system_zone()fs/ext4/block_validity-test.c fs/ext4/block_validity.c+72 -10 replies
16/27ext4: enable full feature coverage in fs/ext4/.kunitconfigfs/ext4/.kunitconfig fs/ext4/balloc-test.c fs/ext4/block_validity-test.c +7 more+123 -190 replies
17/27ext4: add KUnit tests for fs/ext4/super.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/super-test.c +1 more+1609 -10 replies
18/27ext4: add KUnit tests for fs/ext4/sysfs.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/sysfs-test.c +1 more+718 -10 replies
19/27ext4: add KUnit tests for fs/ext4/ioctl.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/ioctl-test.c +1 more+1382 -710 replies
20/27ext4: add KUnit tests for fs/ext4/resize.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/resize-test.c +1 more+1453 -250 replies
21/27ext4: add KUnit tests for fs/ext4/migrate.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/migrate-test.c +1 more+1080 -10 replies
22/27ext4: add KUnit tests for fs/ext4/indirect.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/indirect-test.c +2 more+1298 -40 replies
23/27ext4: expand KUnit tests in fs/ext4/extents-test.c for file range operationsfs/ext4/extents-test.c fs/ext4/extents.c+522 -30 replies
24/27ext4: add KUnit tests for fs/ext4/fsmap.cfs/ext4/Makefile fs/ext4/fsmap-test.c fs/ext4/fsmap.c +1 more+794 -10 replies
25/27ext4: add KUnit tests for fs/ext4/move_extent.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/move_extent-test.c +1 more+1026 -30 replies
26/27ext4: add KUnit tests for fs/ext4/mmp.cfs/ext4/Makefile fs/ext4/ext4.h fs/ext4/mmp-test.c +1 more+770 -300 replies
27/27ext4: add KUnit tests for fs/ext4/dir.cfs/ext4/Makefile fs/ext4/dir-test.c fs/ext4/dir.c +2 more+1039 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/27] ext4: add lots of KUnit tests!

These unit tests were written using the writing-kunit-tests.md prompt[1], and then lightly reviewed by a human with only a few fix-ups needed.

[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

Hopefully extending ext4's Kunit coverage will make it easier to sanity check the flood of AI generated patch submissions. IOW, since these tests were created Gemeni Pro, I'm hoping that we can use fire to fight fire. :-)

So as I process the AI slop backlog, my plan is to do trial merges to determine whether the patches break the unit tests or not. Which to be fair, might be an indication of breakage of the unit tests, and not necessarily a bug in the patches under review.

The patches in this series are available at the ext4.git tree on the branch ext4-kunit-tests[3]. The patch series was originally based on v7.3-rc4, so you want to try merging with with v7.4-rc2 or later, use the branch ext4-kinit-tests-merge[4].

[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=ext4-kunit-tests-merge

Theodore Ts'o (27):
ext4: add KUinit tests for fs/ext4/extents_status.c
ext4: add KUnit tests for fs/ext4/extents.c
ext4: add KUnit tests for ext4_ext_split() leaf and index splitting
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: zero s_fc_replay_state in ext4_fc_replay_cleanup()
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

 fs/ext4/.kunitconfig          |    7 +
 fs/ext4/Makefile              |   12 +-
 fs/ext4/balloc-test.c         | 2362 ++++++++++++++++++++++
 fs/ext4/balloc.c              |   11 +-
 fs/ext4/bitmap.c              |    5 +
 fs/ext4/block_validity-test.c | 1595 +++++++++++++++
 fs/ext4/block_validity.c      |   11 +-
 fs/ext4/crypto.c              |    4 +
 fs/ext4/dir-test.c            |  992 ++++++++++
 fs/ext4/dir.c                 |   37 +
 fs/ext4/ext4.h                |  251 ++-
 fs/ext4/ext4_extents.h        |   21 +
 fs/ext4/ext4_jbd2.c           |   17 +
 fs/ext4/extents-test.c        | 2601 ++++++++++++++++++++++++-
 fs/ext4/extents.c             |   94 +-
 fs/ext4/extents_status-test.c | 1640 ++++++++++++++++
 fs/ext4/extents_status.c      |   22 +
 fs/ext4/fast_commit-test.c    | 2668 +++++++++++++++++++++++++
 fs/ext4/fast_commit.c         |  181 +-
 fs/ext4/fsmap-test.c          |  787 ++++++++
 fs/ext4/fsmap.c               |    3 +
 fs/ext4/ialloc-test.c         | 2714 ++++++++++++++++++++++++++
 fs/ext4/ialloc.c              |   96 +-
 fs/ext4/indirect-test.c       | 1270 ++++++++++++
 fs/ext4/indirect.c            |   18 +-
 fs/ext4/inline-test.c         | 1839 ++++++++++++++++++
 fs/ext4/inline.c              |   34 +-
 fs/ext4/inode-test.c          | 3460 ++++++++++++++++++++++++++++++++-
 fs/ext4/inode.c               |  191 +-
 fs/ext4/ioctl-test.c          | 1169 +++++++++++
 fs/ext4/ioctl.c               |  249 ++-
 fs/ext4/mballoc-test.c        | 1868 +++++++++++++++++-
 fs/ext4/mballoc.c             |  214 +-
 fs/ext4/mballoc.h             |   49 +
 fs/ext4/migrate-test.c        | 1064 ++++++++++
 fs/ext4/migrate.c             |   11 +
 fs/ext4/mmp-test.c            |  661 +++++++
 fs/ext4/mmp.c                 |  117 +-
 fs/ext4/move_extent-test.c    |  997 ++++++++++
 fs/ext4/move_extent.c         |   22 +
 fs/ext4/namei-test.c          | 2314 ++++++++++++++++++++++
 fs/ext4/namei.c               |  342 ++--
 fs/ext4/namei.h               |  213 ++
 fs/ext4/orphan-test.c         | 2364 ++++++++++++++++++++++
 fs/ext4/orphan.c              |   12 +
 fs/ext4/page-io.c             |    1 +
 fs/ext4/resize-test.c         | 1341 +++++++++++++
 fs/ext4/resize.c              |  102 +-
 fs/ext4/super-test.c          | 1341 +++++++++++++
 fs/ext4/super.c               |  276 ++-
 fs/ext4/sysfs-test.c          |  653 +++++++
 fs/ext4/sysfs.c               |   55 +
 fs/ext4/xattr-test.c          | 1813 +++++++++++++++++
 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, 39827 insertions(+), 412 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: 93f51579e7df248780214094418f205253383cc5

Signature · 1 line
2.56.0.542.g3ef89b7020-goog