linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Handle faults in KUnit tests
@ 2024-03-19 10:48 Mickaël Salaün
  2024-03-19 10:48 ` [PATCH v3 1/7] kunit: Handle thread creation error Mickaël Salaün
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Mickaël Salaün @ 2024-03-19 10:48 UTC (permalink / raw)
  To: Brendan Higgins, David Gow, Rae Moar, Shuah Khan
  Cc: Mickaël Salaün, Alan Maguire, Borislav Petkov,
	Dave Hansen, H . Peter Anvin, Ingo Molnar, James Morris,
	Kees Cook, Luis Chamberlain, Madhavan T . Venkataraman,
	Marco Pagani, Paolo Bonzini, Sean Christopherson, Stephen Boyd,
	Thara Gopinath, Thomas Gleixner, Vitaly Kuznetsov, Wanpeng Li,
	Zahra Tarkhani, kvm, linux-hardening, linux-hyperv, linux-kernel,
	linux-security-module, linux-um, x86

Hi,

This patch series teaches KUnit to handle kthread faults as errors, and
it brings a few related fixes and improvements.

Shuah, everything should be OK now, could you please merge this series?

All these tests pass (on top of v6.8):
./tools/testing/kunit/kunit.py run --alltests
./tools/testing/kunit/kunit.py run --alltests --arch x86_64
./tools/testing/kunit/kunit.py run --alltests --arch arm64 \
  --cross_compile=aarch64-linux-gnu-

I added Reviewed-by, Tested-by and Fixes tags according to previous
review.  I improved a commit message and added a comment.

A new test case check NULL pointer dereference, 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

Previous version:
v2: https://lore.kernel.org/r/20240301194037.532117-1-mic@digikod.net
v1: https://lore.kernel.org/r/20240229170409.365386-1-mic@digikod.net

Regards,

Mickaël Salaün (7):
  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 fault

 include/kunit/test.h      | 24 ++++++++++++++++++---
 include/kunit/try-catch.h |  3 ---
 lib/kunit/kunit-test.c    | 45 ++++++++++++++++++++++++++++++++++++++-
 lib/kunit/try-catch.c     | 38 ++++++++++++++++++++++-----------
 lib/kunit_iov_iter.c      | 18 ++++++++--------
 5 files changed, 100 insertions(+), 28 deletions(-)


base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
-- 
2.44.0


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

end of thread, other threads:[~2024-04-23  9:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19 10:48 [PATCH v3 0/7] Handle faults in KUnit tests Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 1/7] kunit: Handle thread creation error Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 2/7] kunit: Fix kthread reference Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 3/7] kunit: Fix timeout message Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 4/7] kunit: Handle test faults Mickaël Salaün
2024-03-23  7:37   ` David Gow
2024-03-26  9:02     ` Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 5/7] kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 6/7] kunit: Print last test location on fault Mickaël Salaün
2024-03-19 10:48 ` [PATCH v3 7/7] kunit: Add tests for fault Mickaël Salaün
2024-04-19 22:33   ` Guenter Roeck
2024-04-19 23:38     ` Guenter Roeck
2024-04-22 13:08       ` Mickaël Salaün
2024-04-22 13:35         ` Guenter Roeck
2024-04-23  9:22           ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).