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>
Fri, 8 Nov 2019 12:03:12 +0000 (12:03 +0000)
commitb020aa3f67b39517dbe3c33d41d6ce04c174a0e2
tree20865f6df93198af2efd4eda107f5fe1ee24cc01
parentc94e5ffd2c6dfa9010ea7c63951843b1ab63a382
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]