aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-16 13:20:52 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-16 13:20:52 (GMT)
commit54307d33c517c1f934bdb93c104287cd1d14c48b (patch)
treea75cceb64699c4e47f095b73116469ba9c0ddb39
parentc497fde2893ebfec612772233ae3b7819c447647 (diff)
test-media: add -dmesg option
When running under virtme it can be useful to dump the full kernel log at the end of all the tests. Also clean up the usage message. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rwxr-xr-xcontrib/test/test-media30
1 files changed, 26 insertions, 4 deletions
diff --git a/contrib/test/test-media b/contrib/test/test-media
index 8f06e4c..96a505d 100755
--- a/contrib/test/test-media
+++ b/contrib/test/test-media
@@ -10,19 +10,28 @@ vimc=0
cec=0
cecpwr=--skip-test-standby-resume
kmemleak=0
+dmesg=0
unload=0
+dmesg -n notice
+
if [ -z "$1" ]; then
- echo "usage: test-media [-unload] [-kmemleak] all|mc|vivid|vim2m|vimc|cec|cec-pwr"
+ echo "usage: test-media [options] test-targets"
echo
echo Run as root.
echo
+ echo Options:
echo "-unload: unload any media modules before testing"
echo "-kmemleak: enable memory leak scan"
+ echo "-dmesg: run dmesg at the end"
echo
- echo "'all' equals 'vivid vim2m vimc cec cec-pwr'"
- echo "'mc' equals 'vivid vim2m vimc'"
- echo "'cec' adds the CEC compliance tests, 'cec-pwr' adds the CEC standby/wakeup tests."
+ echo Test Targets:
+ echo "vivid: test the vivid driver"
+ echo "vim2m: test the vim2m driver"
+ echo "vimc: test the vimc driver"
+ echo "cec: adds the vivid CEC compliance tests, 'cec-pwr' adds the CEC standby/wakeup tests."
+ echo "all: equals 'vivid vim2m vimc cec cec-pwr'"
+ echo "mc: equals 'vivid vim2m vimc'"
exit 0
fi
@@ -36,6 +45,9 @@ while [ ! -z "$1" ]; do
-unload)
unload=1
;;
+ -dmesg)
+ dmesg=1
+ ;;
-kmemleak)
if [ -f /sys/kernel/debug/kmemleak ]; then
kmemleak=1
@@ -143,9 +155,12 @@ rmmod vivid
if [ $kmemleak -eq 1 ]; then
sleep 10
+ echo
echo kmemleak results:
+ echo
echo scan >/sys/kernel/debug/kmemleak
cat /sys/kernel/debug/kmemleak
+ echo
fi
echo Summary:
@@ -171,3 +186,10 @@ printf("Final Summary: %d, Succeeded: %d, Failed: %d, Warnings: %d\n",
'
rm -f $tmp
+
+if [ $dmesg -eq 1 ]; then
+ echo
+ echo -----------------------------------------------------------
+ echo
+ dmesg
+fi

Privacy Policy