aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-02-03 09:25:49 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-02-03 09:25:49 +0100
commit733f7a54f79d1e12a8745f0804c8394ed0136eb2 (patch)
tree46942c798404d387b2bc3ecc9e8d993b53f699b3
parent70404b870f12165278fe9ee9b3d6c7932478eb83 (diff)
test-media: improve vidtv tests
'rmmod vidtv' doesn't work, this needs to be 'rmmod dvb_vidtv_bridge dvb_vidtv_tuner dvb_vidtv_demod'. Add v4l2-compliance -M command to check the media controller support. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rwxr-xr-xcontrib/test/test-media137
1 files changed, 71 insertions, 66 deletions
diff --git a/contrib/test/test-media b/contrib/test/test-media
index 86a2e081..10b7e89d 100755
--- a/contrib/test/test-media
+++ b/contrib/test/test-media
@@ -168,72 +168,6 @@ $v4l2_ctl -z platform:vivid-002 -d vivid-002-vid-out -o1 -x width=3840,height=21
echo
-if [ $vidtv -eq 1 ]; then
- rmmod vidtv 2&>/dev/null
- modprobe vidtv
- sleep 2
- dmesg -n notice
- echo
-
- if ! media-ctl -d platform:vidtv -p ; then
- echo "FAIL: the vidtv module failed to load" | tee -a $tmp
- echo "Grand Total for vidtv: Succeeded: 0, Failed: 1, Warnings: 0" | tee -a $tmp
- echo "Final Summary: 1, Succeeded: 0, Failed: 1, Warnings: 0"
- rmmod vidtv
- exit 0
- fi
-
- echo
- echo
- echo
- echo
- echo
- echo
- echo
- echo
- echo
- echo unbind vidtv
- echo
- echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/unbind
- sleep $unbind_time
- echo
- echo rebind vidtv
- echo
- echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/bind
- sleep 1
- echo
- echo second unbind vidtv
- echo
- sleep 1
- echo
- echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/unbind
- sleep $reunbind_time
- echo
- echo rmmod vidtv
- echo
- rmmod vidtv
- sleep $rmmod_time
- if [ $kmemleak -eq 1 ]; then
- echo
- echo kmemleak results for vidtv:
- echo
- echo scan >/sys/kernel/debug/kmemleak
- cat /sys/kernel/debug/kmemleak
- echo
- echo end of kmemleak results
- echo clear >/sys/kernel/debug/kmemleak
- fi
- echo
- echo
- echo
- echo
- echo
- echo
- echo
- echo
-
-fi
-
if [ $vivid -eq 1 ]; then
dmesg -n notice
echo
@@ -681,6 +615,77 @@ echo
rmmod vivid
sleep $rmmod_time
+if [ $vidtv -eq 1 ]; then
+ rmmod dvb_vidtv_bridge dvb_vidtv_tuner dvb_vidtv_demod 2&>/dev/null
+ modprobe vidtv
+ sleep 2
+ dmesg -n notice
+ echo
+
+ if ! media-ctl -d platform:vidtv ; then
+ echo "FAIL: the vidtv module failed to load" | tee -a $tmp
+ echo "Grand Total for vidtv: Succeeded: 0, Failed: 1, Warnings: 0" | tee -a $tmp
+ echo "Final Summary: 1, Succeeded: 0, Failed: 1, Warnings: 0"
+ rmmod dvb_vidtv_bridge dvb_vidtv_tuner dvb_vidtv_demod 2&>/dev/null
+ exit 0
+ fi
+
+ echo vidtv media controller compliance tests | tee /dev/kmsg
+ echo
+ date
+ stdbuf -oL $v4l2_compliance -M platform:vidtv 2>&1 | tee -a $tmp
+
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo unbind vidtv
+ echo
+ echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/unbind
+ sleep $unbind_time
+ echo
+ echo rebind vidtv
+ echo
+ echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/bind
+ sleep 1
+ echo
+ echo second unbind vidtv
+ echo
+ sleep 1
+ echo
+ echo -n vidtv.0 >/sys/bus/platform/drivers/vidtv/unbind
+ sleep $reunbind_time
+ echo
+ echo rmmod dvb_vidtv_bridge dvb_vidtv_tuner dvb_vidtv_demod
+ echo
+ rmmod dvb_vidtv_bridge dvb_vidtv_tuner dvb_vidtv_demod
+ sleep $rmmod_time
+ if [ $kmemleak -eq 1 ]; then
+ echo
+ echo kmemleak results for vidtv:
+ echo
+ echo scan >/sys/kernel/debug/kmemleak
+ cat /sys/kernel/debug/kmemleak
+ echo
+ echo end of kmemleak results
+ echo clear >/sys/kernel/debug/kmemleak
+ fi
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+ echo
+
+fi
+
date
echo
echo Summary:

Privacy Policy