aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-01 15:32:37 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-03-01 15:32:37 (GMT)
commit604e01c8cedbc0e26ccb5a27522ed072bb39cf6f (patch)
tree9521cc1276e396152b97a25f6553eaaf0c3cc707
parent46d2b342ce44f8c9266375126f61ab34285e95c2 (diff)
test-media: open devices before second unbind.
This helps test the case where you unbind the device while the device nodes are still open. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rwxr-xr-xcontrib/test/test-media23
1 files changed, 20 insertions, 3 deletions
diff --git a/contrib/test/test-media b/contrib/test/test-media
index fc2e07a..c0ea5aa 100755
--- a/contrib/test/test-media
+++ b/contrib/test/test-media
@@ -13,6 +13,7 @@ kmemleak=0
dmesg=0
unload=0
unbind_time=1
+reunbind_time=5
rmmod_time=1
kobj_rel=0
@@ -29,6 +30,7 @@ fi
if [ $kobj_rel -eq 1 ]; then
echo Detected CONFIG_DEBUG_KOBJECT_RELEASE=y
unbind_time=10
+ reunbind_time=10
rmmod_time=5
fi
@@ -197,8 +199,13 @@ if [ $vivid -eq 1 ]; then
echo
echo second unbind vivid
echo
+ for i in `v4l2-ctl -z platform:vivid-000 --list-devices`; do
+ v4l2-ctl -d $i --sleep 4 &
+ done
+ sleep 1
+ echo
echo -n vivid.0 >/sys/bus/platform/drivers/vivid/unbind
- sleep $unbind_time
+ sleep $reunbind_time
echo
echo rmmod vivid
echo
@@ -265,8 +272,13 @@ if [ $vim2m -eq 1 ]; then
echo
echo second unbind vim2m
echo
+ for i in `v4l2-ctl -z platform:vim2m --list-devices`; do
+ v4l2-ctl -d $i --sleep 4 &
+ done
+ sleep 1
+ echo
echo -n vim2m.0 >/sys/bus/platform/drivers/vim2m/unbind
- sleep $unbind_time
+ sleep $reunbind_time
echo
echo rmmod vim2m
echo
@@ -328,8 +340,13 @@ if [ $vimc -eq 1 ]; then
echo
echo second unbind vimc
echo
+ for i in `v4l2-ctl -z platform:vimc --list-devices`; do
+ v4l2-ctl -d $i --sleep 4 &
+ done
+ sleep 1
+ echo
echo -n vimc.0 >/sys/bus/platform/drivers/vimc/unbind
- sleep $unbind_time
+ sleep $reunbind_time
echo
echo rmmod vimc
echo

Privacy Policy