[PATCH v2] selftests: arm coresight: sysfsmode testing
James Clark
james.clark at linaro.org
Mon Dec 23 06:38:28 PST 2024
On 19/12/2024 2:24 pm, Linu Cherian wrote:
> Add sysfs mode selftest for ARM Coresight hardware tracer.
>
> The test will run below sequence for all possible sinks for every
> trace source available on the system.
> 1. Enable source and sink device to start tracing in sysfs mode
> 3. Run a standard dd command to be traced
> 4. Stop tracing
> 5. Readback tracedata
>
> - Test case is pass if the readback of tracedata is success else
> failure.
> - In case of ETR sink, the test is run with both default buffer mode and
> reserved buffer mode(if available).
>
> Sample output:
>
> selftests: drivers/hwtracing/coresight: sysfs_test_trace.sh
> Running sysfs trace with default settings
> 64+0 records in
> 64+0 records out
> 67108864 bytes (67 MB, 64 MiB) copied, 0.196945 s, 341 MB/s
> 32+0 records in
> 32+0 records out
> 16384 bytes (16 kB, 16 KiB) copied, 0.000805288 s, 20.3 MB/s
> CoreSight path testing (CPU0 -> tmc_etf0): PASS
>
> Signed-off-by: Linu Cherian <lcherian at marvell.com>
> ---
> Changelog from v1:
> - Added test description in commit message suggested by Shuah
> - Added config dependency file suggested by Shuah
> - Added TARGETS as suggested by James
> - Skipped TPIU as suggested by James
> - Added Reviewed-by tag
>
>
> tools/testing/selftests/Makefile | 1 +
> .../drivers/hwtracing/coresight/Makefile | 5 +
> .../drivers/hwtracing/coresight/config | 7 +
> .../hwtracing/coresight/sysfs_test_trace.sh | 146 ++++++++++++++++++
> 4 files changed, 159 insertions(+)
> create mode 100644 tools/testing/selftests/drivers/hwtracing/coresight/Makefile
> create mode 100644 tools/testing/selftests/drivers/hwtracing/coresight/config
> create mode 100755 tools/testing/selftests/drivers/hwtracing/coresight/sysfs_test_trace.sh
>
Reviewed-by: James Clark <james.clark at linaro.org>
More information about the linux-arm-kernel
mailing list