powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Mon, 12 Apr 2021 11:22:17 +0000 (16:52 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Apr 2021 15:38:03 +0000 (01:38 +1000)
commitc65c64cc7bbd273121edf96a7a5a0269038ab454
treee7ad15839d24bc3549f10a2ca5363547788cd8bf
parentc9cb0afb4eaa03801322f48dad4093979ff45e88
powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR

Extend perf-hwbreak.c selftest to test multiple DAWRs. Also add
testcase for testing 512 byte boundary removal.

Sample o/p:
  # ./perf-hwbreak
  ...
  TESTED: Process specific, Two events, diff addr
  TESTED: Process specific, Two events, same addr
  TESTED: Process specific, Two events, diff addr, one is RO, other is WO
  TESTED: Process specific, Two events, same addr, one is RO, other is WO
  TESTED: Systemwide, Two events, diff addr
  TESTED: Systemwide, Two events, same addr
  TESTED: Systemwide, Two events, diff addr, one is RO, other is WO
  TESTED: Systemwide, Two events, same addr, one is RO, other is WO
  TESTED: Process specific, 512 bytes, unaligned
  success: perf_hwbreak

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210412112218.128183-4-ravi.bangoria@linux.ibm.com
tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c