• Ravi Bangoria's avatar
    powerpc/selftests: Add selftest to test concurrent perf/ptrace events · 290f7d8c
    Ravi Bangoria authored
    ptrace and perf watchpoints can't co-exists if their address range
    overlaps. See commit 29da4f91 ("powerpc/watchpoint: Don't allow
    concurrent perf and ptrace events") for more detail. Add selftest
    for the same.
    
    Sample o/p:
      # ./ptrace-perf-hwbreak
      test: ptrace-perf-hwbreak
      tags: git_version:powerpc-5.8-7-118-g937fa174a15d-dirty
      perf cpu event -> ptrace thread event (Overlapping): Ok
      perf cpu event -> ptrace thread event (Non-overlapping): Ok
      perf thread event -> ptrace same thread event (Overlapping): Ok
      perf thread event -> ptrace same thread event (Non-overlapping): Ok
      perf thread event -> ptrace other thread event: Ok
      ptrace thread event -> perf kernel event: Ok
      ptrace thread event -> perf same thread event (Overlapping): Ok
      ptrace thread event -> perf same thread event (Non-overlapping): Ok
      ptrace thread event -> perf other thread event: Ok
      ptrace thread event -> perf cpu event (Overlapping): Ok
      ptrace thread event -> perf cpu event (Non-overlapping): Ok
      ptrace thread event -> perf same thread & cpu event (Overlapping): Ok
      ptrace thread event -> perf same thread & cpu event (Non-overlapping): Ok
      ptrace thread event -> perf other thread & cpu event: Ok
      success: ptrace-perf-hwbreak
    Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210412112218.128183-5-ravi.bangoria@linux.ibm.com
    290f7d8c
Makefile 627 Bytes