diff options
author | Vijay Dandiga <vijay.dandiga@linaro.org> | 2014-12-11 18:29:00 +0530 |
---|---|---|
committer | Vijay Dandiga <vijay.dandiga@linaro.org> | 2014-12-11 18:29:00 +0530 |
commit | fc95c9f46af3cad7f6e44d88e52b1c8a486ceb8f (patch) | |
tree | 648db9586c6319fa96688297aa96d9f7a792d9dc | |
parent | 740d92dabf4a594737063f758ae7e459f48951b7 (diff) |
-rwxr-xr-x | common/scripts/coresight-test-new.sh | 11 | ||||
-rwxr-xr-x | common/scripts/coresight-test1.sh | 7 |
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 |