linux/tools/testing/selftests/powerpc/ptrace
Ravi Bangoria 290f7d8ce2 powerpc/selftests: Add selftest to test concurrent perf/ptrace events
ptrace and perf watchpoints can't co-exists if their address range
overlaps. See commit 29da4f91c0 ("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: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210412112218.128183-5-ravi.bangoria@linux.ibm.com
2021-04-23 01:38:03 +10:00
..
.gitignore powerpc/selftests: Add selftest to test concurrent perf/ptrace events 2021-04-23 01:38:03 +10:00
child.h selftests/powerpc: Add ptrace tests for Protection Key registers 2018-05-28 18:46:35 +10:00
core-pkey.c selftests/powerpc: Fix pkey access right updates 2020-06-30 14:37:47 +10:00
Makefile powerpc/selftests: Add selftest to test concurrent perf/ptrace events 2021-04-23 01:38:03 +10:00
perf-hwbreak.c powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR 2021-04-23 01:38:03 +10:00
ptrace-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-gpr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-hwbreak.c powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR 2021-04-23 01:38:03 +10:00
ptrace-perf-hwbreak.c powerpc/selftests: Add selftest to test concurrent perf/ptrace events 2021-04-23 01:38:03 +10:00
ptrace-pkey.c selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value 2020-07-22 00:01:06 +10:00
ptrace-syscall.c selftests/powerpc: New PTRACE_SYSEMU test 2018-10-03 15:40:04 +10:00
ptrace-tar.c selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
ptrace-tar.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-spd-gpr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-spd-tar.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-spd-vsx.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-spr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace-tm-tar.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-tm-vsx.c selftests/powerpc: Fixup clobbers for TM tests 2019-10-29 20:53:49 +11:00
ptrace-vsx.c selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
ptrace-vsx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00