linux/include/kunit
Kees Cook 51104c19d8 kunit: test: Add vm_mmap() allocation resource manager
For tests that need to allocate using vm_mmap() (e.g. usercopy and
execve), provide the interface to have the allocation tracked by KUnit
itself. This requires bringing up a placeholder userspace mm.

This combines my earlier attempt at this with Mark Rutland's version[1].

Normally alloc_mm() and arch_pick_mmap_layout() aren't exported for
modules, so export these only for KUnit testing.

Link: https://lore.kernel.org/lkml/20230321122514.1743889-2-mark.rutland@arm.com/ [1]
Co-developed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-06-14 19:31:33 -06:00
..
assert.h kunit: Cover 'assert.c' with tests 2024-05-30 12:53:47 -06:00
attributes.h kunit: Add ability to filter attributes 2023-07-26 13:29:15 -06:00
device.h kunit: Add APIs for managing devices 2023-12-18 13:28:08 -07:00
resource.h kunit: Add a macro to wrap a deferred action function 2023-12-18 13:21:14 -07:00
skbuff.h kunit: add a convenience allocation wrapper for SKBs 2024-01-03 15:35:07 +01:00
static_stub.h kunit: Allow passing function pointer to kunit_activate_static_stub() 2024-01-03 09:06:52 -07:00
test-bug.h kunit: test-bug.h: include stddef.h for NULL 2023-07-18 15:38:13 -06:00
test.h kunit: test: Add vm_mmap() allocation resource manager 2024-06-14 19:31:33 -06:00
try-catch.h kunit: Handle test faults 2024-05-06 14:22:02 -06:00
visibility.h kunit: add macro to allow conditionally exposing static symbols to tests 2022-12-12 14:13:48 -07:00