diff options
author | Sherry Yang <sherryy@android.com> | 2017-06-22 14:37:45 -0700 |
---|---|---|
committer | Mengjiao Yang <sherryy@google.com> | 2017-08-31 17:29:30 -0700 |
commit | 3de14ff34cd4a21a7890e3d41f3532ab97424ae3 (patch) | |
tree | 3a923f25d324de9519c179848b7b666061ae98f2 /drivers/android/binder.c | |
parent | 0e05bd2dc0e79d18a31bcfb2474c2ecaf7d54073 (diff) |
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>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r-- | drivers/android/binder.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c index bfdd52ea0d1c..75cbbd2e986a 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -4580,6 +4580,8 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) /*pr_info("binder_ioctl: %d:%d %x %lx\n", proc->pid, current->pid, cmd, arg);*/ + binder_selftest_alloc(&proc->alloc); + trace_binder_ioctl(cmd, arg); ret = wait_event_interruptible(binder_user_error_wait, binder_stop_on_user_error < 2); |