summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2015-04-01 20:08:15 +0530
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2015-04-02 10:55:57 +0000
commitda02c65c2e98854514d31491b49e8010fe1a1b46 (patch)
tree499f935a6fbcb0a04bb806b90d7da8614e5f3caa
parente32e9f64875108e6d969ffd99ee53509ebecb293 (diff)
downloadtest-definitions-pipe-da02c65c2e98854514d31491b49e8010fe1a1b46.tar.gz
coresight: Adding coresight test definitions
This framework provides a kernel interface for the CoreSight debug and trace drivers to register themselves with. It's intended to build a topological view of the CoreSight components based on a DT specification and configure the right serie of components when a trace source gets enabled. Kconfig required - CONFIG_CORESIGHT=y - CONFIG_CORESIGHT_LINKS_AND_SINKS=y Change-Id: Ibfeffff2da085bef83e003ae8da28d82015d40f7 Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rw-r--r--common/coresight-test.yaml24
-rwxr-xr-xcommon/scripts/coresight-test.sh32
2 files changed, 56 insertions, 0 deletions
diff --git a/common/coresight-test.yaml b/common/coresight-test.yaml
new file mode 100644
index 0000000..a1e6d0a
--- /dev/null
+++ b/common/coresight-test.yaml
@@ -0,0 +1,24 @@
+metadata:
+ format: Lava-Test Test Definition 1.0
+ name: coresight-test
+ description: "To validate coresight source to sink writes.
+ Coresight tracing support provides a kernel interface for the CoreSight
+ debug and trace drivers to register themselves with. It's intended to build
+ topological view of the CoreSight components based on a DT specification
+ and configure the right serie of components when a trace source gets
+ enabled. Required kernel configs
+ CONFIG_CORESIGHT=y
+ CONFIG_CORESIGHT_LINKS_AND_SINKS=y"
+ maintainer:
+ - naresh.kamboju@linaro.org
+ os:
+ - openembedded
+ - ubuntu
+ scope:
+ - functional
+ devices:
+ - vexpress-tc2
+
+run:
+ steps:
+ - "common/scripts/coresight-test.sh"
diff --git a/common/scripts/coresight-test.sh b/common/scripts/coresight-test.sh
new file mode 100755
index 0000000..2c9dd45
--- /dev/null
+++ b/common/scripts/coresight-test.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Script to test coresight
+
+CORESIGHT_PATH="/sys/bus/coresight/devices"
+
+echo "ls $CORESIGHT_PATH"
+ls $CORESIGHT_PATH
+
+echo -e "SOURCE\t\tSINK\t\tRESULT"
+echo -e "------\t\t----\t\t------"
+for SOURCE in `ls $CORESIGHT_PATH | egrep "etm|ptm"` ; do
+ for SINK in `ls $CORESIGHT_PATH | grep etb` ; do
+
+ echo 1 > $CORESIGHT_PATH/$SINK/enable_sink
+ wrt_ptr1=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'`
+ echo 1 > $CORESIGHT_PATH/$SOURCE/enable_source
+ sleep 1
+ echo 0 > $CORESIGHT_PATH/$SOURCE/enable_source
+ wrt_ptr2=`cat $CORESIGHT_PATH/$SINK/status | grep wrt | awk '{print $NF}'`
+ echo 0 > $CORESIGHT_PATH/$SINK/enable_sink
+
+ if [ $wrt_ptr1 == $wrt_ptr2 ]; then
+ RES="fail"
+ else
+ RES="pass"
+ fi
+
+ echo -e "$SOURCE\t$SINK\t$RES"
+ lava-test-case $SOURCE-$SINK --result $RES
+ done
+ echo
+done