OSDN Git Service

Add a test exercising ptrace watchpoint functionality
authorPavel Labath <labath@google.com>
Thu, 21 Apr 2016 14:13:22 +0000 (15:13 +0100)
committerElliott Hughes <enh@google.com>
Fri, 22 Apr 2016 03:45:23 +0000 (20:45 -0700)
commit1faca6c95bc3e2c9456b9dc5362915be2a188340
tree5abbd435ead1952c8e857d80c1476c5f07be3efc
parent4d9a97bb916aaa7d7bf819ef999d4b1a58d4750d
Add a test exercising ptrace watchpoint functionality

This adds a test which verifies that watchpoints work on devices
which support them. It is motivated by issues experienced by Nexus
5 devices, where watchpoints work only sporadically.

These tests spawn a process, trace it, and verify it hits a
watchpoint of various sizes while executing on all available CPUs
(to help catch a recent bug, where some debugging functionality
was not available on non-boot CPUs). All x86(_64) targets are
expected to support this functionality. In case of arm(64),
watchpoints are expected to work on devices where the relevant
syscall indicates watchpoint presence. In case of mips, this test
is skipped as I could not verify that the test would work
correctly due to lack of hardware, and this test is intrinsically
hardware-dependend.

Change-Id: I035ac1822816cd1a3f3b56b985c2fb5fd664185d
tests/Android.mk
tests/sys_ptrace_test.cpp [new file with mode: 0644]