diff options
| author | Tiffany Yang <[email protected]> | 2025-07-14 18:53:17 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2025-07-16 12:11:58 +0000 |
| commit | 5e024582f494c6ff5eb2bec5183fd1eb35462500 (patch) | |
| tree | 4961e17ce0052fea9ddbf2bcc657631fcb98e20f /drivers/android/binder_alloc.h | |
| parent | kunit: test: Export kunit_attach_mm() (diff) | |
| download | kernel-5e024582f494c6ff5eb2bec5183fd1eb35462500.tar.gz kernel-5e024582f494c6ff5eb2bec5183fd1eb35462500.zip | |
binder: Scaffolding for binder_alloc KUnit tests
Add setup and teardown for testing binder allocator code with KUnit.
Include minimal test cases to verify that tests are initialized
correctly.
Tested-by: Rae Moar <[email protected]>
Signed-off-by: Tiffany Yang <[email protected]>
Acked-by: Carlos Llamas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/android/binder_alloc.h')
| -rw-r--r-- | drivers/android/binder_alloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h index 552e7a3ba72d..5889b3f0315d 100644 --- a/drivers/android/binder_alloc.h +++ b/drivers/android/binder_alloc.h @@ -184,5 +184,11 @@ int binder_alloc_copy_from_buffer(struct binder_alloc *alloc, binder_size_t buffer_offset, size_t bytes); +#if IS_ENABLED(CONFIG_KUNIT) +void __binder_alloc_init(struct binder_alloc *alloc, struct list_lru *freelist); +size_t binder_alloc_buffer_size(struct binder_alloc *alloc, + struct binder_buffer *buffer); +#endif + #endif /* _LINUX_BINDER_ALLOC_H */ |
