diff options
| author | Tiffany Yang <ynaffit@google.com> | 2025-07-14 11:53:17 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-16 14:11:58 +0200 |
| commit | 5e024582f494c6ff5eb2bec5183fd1eb35462500 (patch) | |
| tree | 4961e17ce0052fea9ddbf2bcc657631fcb98e20f /drivers/android/binder_alloc.h | |
| parent | kunit: test: Export kunit_attach_mm() (diff) | |
| download | linux-5e024582f494c6ff5eb2bec5183fd1eb35462500.tar.gz linux-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 <rmoar@google.com>
Signed-off-by: Tiffany Yang <ynaffit@google.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20250714185321.2417234-5-ynaffit@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 */ |
