FROMLIST: android: binder: Add allocator selftest
authorSherry Yang <sherryy@android.com>
Thu, 22 Jun 2017 21:37:45 +0000 (14:37 -0700)
committerDanny Wood <danwood76@gmail.com>
Tue, 8 Oct 2019 13:44:15 +0000 (14:44 +0100)
commit51c5093fc9cc3f9db2e79ebdc8d82908559cf8b8
tree20865f6df93198af2efd4eda107f5fe1ee24cc01
parente7e98fad4602e7d28c0e566b2d2fece76e60875a
FROMLIST: android: binder: Add allocator selftest

(from https://patchwork.kernel.org/patch/9928609/)

binder_alloc_selftest tests that alloc_new_buf handles page allocation and
deallocation properly when allocate and free buffers. The test allocates 5
buffers of various sizes to cover all possible page alignment cases, and
frees the buffers using a list of exhaustive freeing order.

Test: boot the device with ANDROID_BINDER_IPC_SELFTEST config option
enabled. Allocator selftest passes.

Bug: 36007193
Change-Id: I2fe396232b7dfe4bbc50bdba99ca0de9be63cc37
Signed-off-by: Sherry Yang <sherryy@android.com>
drivers/android/Kconfig
drivers/android/Makefile
drivers/android/binder.c
drivers/android/binder_alloc.h
drivers/android/binder_alloc_selftest.c [new file with mode: 0644]