]> git.baikalelectronics.ru Git - kernel.git/commit
android: binder: Add allocator selftest
authorSherry Yang <sherryy@android.com>
Wed, 23 Aug 2017 15:46:40 +0000 (08:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:47:17 +0000 (16:47 +0200)
commitc17133c47fac396b038f6c62e2b4078302c355f3
treef71d84f71001cecc96563950400c15f609375619
parente21971ce23896a51547b6b3a698384788b9646c9
android: binder: Add allocator selftest

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.

Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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]