[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241216055010.GA1237565@hyd1403.caveonetworks.com>
Date: Mon, 16 Dec 2024 11:20:10 +0530
From: Linu Cherian <lcherian@...vell.com>
To: James Clark <james.clark@...aro.org>
CC: "coresight@...ts.linaro.org" <coresight@...ts.linaro.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<shuah@...nel.org>, <linux-kselftest@...r.kernel.org>,
<sgoutham@...vell.com>, <gcherian@...vell.com>,
Mike Leach
<mike.leach@...aro.org>,
Suzuki K Poulose <Suzuki.Poulose@....com>, Leo Yan
<leo.yan@....com>
Subject: Re: [PATCH] selftests: arm coresight: sysfsmode testing
On 2024-12-04 at 16:45:42, James Clark (james.clark@...aro.org) wrote:
>
>
> On 29/11/2024 8:38 am, Linu Cherian wrote:
> > Add sysfs mode selftest for ARM Coresight hardware tracer.
> >
> > Signed-off-by: Linu Cherian <lcherian@...vell.com>
> > ---
> > .../drivers/hwtracing/coresight/Makefile | 5 +
> > .../hwtracing/coresight/sysfs_test_trace.sh | 144 ++++++++++++++++++
> > 2 files changed, 149 insertions(+)
> > create mode 100644 tools/testing/selftests/drivers/hwtracing/coresight/Makefile
>
> Hi Linu,
>
> You need to add this path into TARGETS for make install to work:
>
> TARGETS += drivers/dma-buf
> +TARGETS += drivers/hwtracing/coresight
> TARGETS += drivers/s390x/uvdevice
>
>
> > create mode 100755 tools/testing/selftests/drivers/hwtracing/coresight/sysfs_test_trace.sh
> >
> > diff --git a/tools/testing/selftests/drivers/hwtracing/coresight/Makefile b/tools/testing/selftests/drivers/hwtracing/coresight/Makefile
> > new file mode 100644
> > index 000000000000..7dc68ae1c0a9
> > --- /dev/null
> > +++ b/tools/testing/selftests/drivers/hwtracing/coresight/Makefile
> > @@ -0,0 +1,5 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +
> > +TEST_PROGS = sysfs_test_trace.sh
> > +
> > +include ../../../lib.mk
> > diff --git a/tools/testing/selftests/drivers/hwtracing/coresight/sysfs_test_trace.sh b/tools/testing/selftests/drivers/hwtracing/coresight/sysfs_test_trace.sh
> > new file mode 100755
> > index 000000000000..0d6307fff1d2
> > --- /dev/null
> > +++ b/tools/testing/selftests/drivers/hwtracing/coresight/sysfs_test_trace.sh
> > @@ -0,0 +1,144 @@
> > +#!/bin/sh
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (C) 2024 Marvell.
> > +
> > +# Test Arm CoreSight trace capture in sysfs mode
> > +# Based on tools/perf/tests/shell/test_arm_coresight.sh
> > +
> > +glb_err=0
> > +
> > +arm_cs_report() {
> > + if [ $2 != 0 ]; then
> > + echo "$1: FAIL"
> > + glb_err=$2
> > + else
> > + echo "$1: PASS"
> > + fi
> > +}
> > +
> > +is_device_sink() {
> > + # If the node of "enable_sink" is existed under the device path, this
> > + # means the device is a sink device.
> > +
>
> Looks like you still need the skip for TPIU here the same as the Perf test.
> It's an external sink and doesn't have a readable file so the test fails.
>
Okay will skip.
> With those changes, looks good. Thanks for adding the first sysfs test.
> Hopefully we can expand them more in the future.
>
> Reviewed-by: James Clark <james.clark@...aro.org>
>
Thanks.
Linu Cherian.
Powered by blists - more mailing lists