From 4175e2b46fd4b9021ef81f18f1be9474b2f45d4a Mon Sep 17 00:00:00 2001 From: Sherry Yang Date: Wed, 23 Aug 2017 08:46:40 -0700 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/android/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/android/Kconfig') diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig index 8a748d4a4167..9801d852bd56 100644 --- a/drivers/android/Kconfig +++ b/drivers/android/Kconfig @@ -44,6 +44,16 @@ config ANDROID_BINDER_IPC_32BIT Note that enabling this will break newer Android user-space. +config ANDROID_BINDER_IPC_SELFTEST + bool "Android Binder IPC Driver Selftest" + depends on ANDROID_BINDER_IPC + ---help--- + This feature allows binder selftest to run. + + Binder selftest checks the allocation and free of binder buffers + exhaustively with combinations of various buffer sizes and + alignments. + endif # if ANDROID endmenu -- cgit v1.2.3