mbox series

[0/2] usercopy: Convert test_user_copy to KUnit test

Message ID 20240519190422.work.715-kees@kernel.org
Headers show
Series usercopy: Convert test_user_copy to KUnit test | expand

Message

Kees Cook May 19, 2024, 7:12 p.m. UTC
Hi,

This builds on the proposal[1] from Mark and lets me convert the
existing usercopy selftest to KUnit. Besides adding this basic test to
the KUnit collection, it also opens the door for execve testing (which
depends on having a functional current->mm), and should provide the
basic infrastructure for adding Mark's much more complete usercopy tests.

-Kees

[1] https://lore.kernel.org/lkml/20230321122514.1743889-2-mark.rutland@arm.com/

Kees Cook (2):
  kunit: test: Add vm_mmap() allocation resource manager
  usercopy: Convert test_user_copy to KUnit test

 MAINTAINERS                                |   1 +
 include/kunit/test.h                       |  17 ++
 lib/Kconfig.debug                          |  21 +-
 lib/Makefile                               |   2 +-
 lib/kunit/test.c                           | 139 +++++++++++-
 lib/{test_user_copy.c => usercopy_kunit.c} | 252 ++++++++++-----------
 6 files changed, 288 insertions(+), 144 deletions(-)
 rename lib/{test_user_copy.c => usercopy_kunit.c} (52%)