Run KUnit tests late and handle faults
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | kunit: Run tests when the kernel is fully setupinit/ lib/ lib/ +4 more | +96 | 3 replies | |
| 2/8 | kunit: Handle thread creation errorlib/ | +1 | 1 reply | |
| 3/8 | kunit: Fix kthread referencelib/ | +6 | 1 reply | |
| 4/8 | kunit: Fix timeout messagelib/ | +2 | 1 reply | |
| 5/8 | kunit: Handle test faultsinclude/ lib/ | +7 | 2 replies | |
| 6/8 | kunit: Fix KUNIT_SUCCESS() calls in iov_iter testslib/ | +9 | 1 reply | |
| 7/8 | kunit: Print last test location on faultinclude/ lib/ | +28 | 1 reply | |
| 8/8 | kunit: Add tests for faultslib/ | +114 | 2 replies |
Reviews trailers per patch
6 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Kees Cook |
|---|---|
| 1/8 | |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/8] Run KUnit tests late and handle faults
Hi,
This patch series moves KUnit test execution at the very end of kernel initialization, just before launching the init process. This opens the way to test any kernel code in its normal state (i.e. fully initialized).
This patch series also teaches KUnit to handle kthread faults as errors, and it brings a few related fixes and improvements.
New tests check NULL pointer dereference and read-only memory, which wasn't possible before.
This is useful to test current kernel self-protection mechanisms or future ones such as Heki: https://github.com/heki-linux
Regards,
Mickaël Salaün (8):
kunit: Run tests when the kernel is fully setup
kunit: Handle thread creation error
kunit: Fix kthread reference
kunit: Fix timeout message
kunit: Handle test faults
kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests
kunit: Print last test location on fault
kunit: Add tests for faults
include/kunit/test.h | 24 +++++- include/kunit/try-catch.h | 3 - init/main.c | 4 +- lib/bitfield_kunit.c | 8 +- lib/checksum_kunit.c | 2 +- lib/kunit/executor.c | 81 ++++++++++++++------ lib/kunit/kunit-example-test.c | 6 +- lib/kunit/kunit-test.c | 115 +++++++++++++++++++++++++++- lib/kunit/try-catch.c | 33 +++++--- lib/kunit_iov_iter.c | 70 ++++++++--------- tools/testing/kunit/kunit_kernel.py | 6 +- 11 files changed, 261 insertions(+), 91 deletions(-)
base-commit: d206a76d7d2726f3b096037f2079ce0bd3ba329b
Signature · 1 line
2.44.0