selftests/powerpc/pmu: Add interface test for mmcra register fields
authorKajol Jain <kjain@linux.ibm.com>
Thu, 27 Jan 2022 07:20:12 +0000 (12:50 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Mar 2022 12:40:58 +0000 (23:40 +1100)
commit29cf373c5766e6bd1b97056d2d678a41777669aa
tree2d0bcc1b73b1ae348993611c09f49d708117320d
parent02f02feb6b50c67171fd56bc3fd0fd96118c5c12
selftests/powerpc/pmu: Add interface test for mmcra register fields

The testcase uses event code 0x35340401e0 to verify the settings for
different fields in Monitor Mode Control Register A (MMCRA). The fields
include thresh_start, thresh_stop thresh_select, sdar mode, sample and
marked bit. Checks if these fields are translated correctly via perf
interface to MMCRA.

Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
[mpe: Add error checking, drop GET_MMCR_FIELD, add to .gitignore]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220127072012.662451-21-kjain@linux.ibm.com
tools/testing/selftests/powerpc/pmu/sampling_tests/.gitignore
tools/testing/selftests/powerpc/pmu/sampling_tests/Makefile
tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c [new file with mode: 0644]