summaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/cmt
diff options
context:
space:
mode:
Diffstat (limited to 'dung-3.4.25-m2/cmt')
-rwxr-xr-xdung-3.4.25-m2/cmt/cmt-interrupt.sh24
-rwxr-xr-xdung-3.4.25-m2/cmt/dmesg.sh8
-rwxr-xr-xdung-3.4.25-m2/cmt/proc-interrupts.sh14
3 files changed, 46 insertions, 0 deletions
diff --git a/dung-3.4.25-m2/cmt/cmt-interrupt.sh b/dung-3.4.25-m2/cmt/cmt-interrupt.sh
new file mode 100755
index 0000000..627850d
--- /dev/null
+++ b/dung-3.4.25-m2/cmt/cmt-interrupt.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+#set -x
+
+echo "CMT interrupt test"
+
+DEV_NAME="sh_cmt.0"
+
+# CMT interrupt test
+BEFORE=$($(dirname $0)/../common/interrupt-count.sh "$DEV_NAME")
+sleep 5
+AFTER=$($(dirname $0)/../common/interrupt-count.sh "$DEV_NAME")
+
+# Show result
+echo "Before interrupt:$BEFORE"
+echo "After interrupt :$AFTER"
+
+if [ "$BEFORE" -ge "$AFTER" ]; then
+ echo "Interrupt cound is not increasing"
+ exit 1
+else
+ echo "Test passed"
+fi
diff --git a/dung-3.4.25-m2/cmt/dmesg.sh b/dung-3.4.25-m2/cmt/dmesg.sh
new file mode 100755
index 0000000..b12e141
--- /dev/null
+++ b/dung-3.4.25-m2/cmt/dmesg.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+#set -x
+
+echo "sh_cmt.0 dmesg feature test"
+
+exec $(dirname $0)/../common/dmesg.sh "sh_cmt sh_cmt.0: used for clock events"
diff --git a/dung-3.4.25-m2/cmt/proc-interrupts.sh b/dung-3.4.25-m2/cmt/proc-interrupts.sh
new file mode 100755
index 0000000..f400595
--- /dev/null
+++ b/dung-3.4.25-m2/cmt/proc-interrupts.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+#set -x
+
+echo "sh_cmt.0 /proc/interrupts presence test"
+
+IRQ=174
+DIV_NAME="sh_cmt.0"
+if $(dirname $0)/../common/proc-interrupts.sh "$DIV_NAME" | grep "$IRQ"; then
+ echo "Test passed"
+else
+ echo "Test has not passed"
+fi