summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Dandiga <vijay.dandiga@linaro.org>2014-12-11 18:29:00 +0530
committerVijay Dandiga <vijay.dandiga@linaro.org>2014-12-11 18:29:00 +0530
commitfc95c9f46af3cad7f6e44d88e52b1c8a486ceb8f (patch)
tree648db9586c6319fa96688297aa96d9f7a792d9dc
parent740d92dabf4a594737063f758ae7e459f48951b7 (diff)
Add debug prints in coresight test scripts
-rwxr-xr-xcommon/scripts/coresight-test-new.sh11
-rwxr-xr-xcommon/scripts/coresight-test1.sh7
2 files changed, 12 insertions, 6 deletions
diff --git a/common/scripts/coresight-test-new.sh b/common/scripts/coresight-test-new.sh
index b2e957a..0f98023 100755
--- a/common/scripts/coresight-test-new.sh
+++ b/common/scripts/coresight-test-new.sh
@@ -1,24 +1,27 @@
#!/bin/bash
# Script to test coresight
-#CORESIGHT_PATH="/sys/kernel/debug/coresight"
CORESIGHT_PATH="/sys/bus/coresight/devices"
echo "ls $CORESIGHT_PATH"
ls $CORESIGHT_PATH
-echo -e "SOURCE\tSINK\tRESULT"
-echo -e "------\t----\t------"
+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}'`
- if [ $wrt_ptr1 == $wrt_ptr2 ]
+ echo 0 > $CORESIGHT_PATH/$SINK/enable_sink
+
+ if [ $wrt_ptr1 == $wrt_ptr2 ];
then
RES="FAIL"
else
diff --git a/common/scripts/coresight-test1.sh b/common/scripts/coresight-test1.sh
index f6b24af..0f98023 100755
--- a/common/scripts/coresight-test1.sh
+++ b/common/scripts/coresight-test1.sh
@@ -3,8 +3,11 @@
CORESIGHT_PATH="/sys/bus/coresight/devices"
-echo -e "SOURCE\tSINK\tRESULT"
-echo -e "------\t----\t------"
+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