summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-07 11:24:01 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-07 16:19:40 +0300
commit3980448e9f46f9ca2f27b38187215543984e3f5d (patch)
treec5359d65f22c253acde9ef38edbf5d50983e89bb /test/v4l2_videodevice
parentdd76f8e11b0f7ad5fa5d51ff8e26727536db948f (diff)
test: v4l2_videodevice: dequeue_watchdog: Check return value of streamOn
If the streamOn() call fails, there is no way the test will then succeed. Catch it and return a failure. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/v4l2_videodevice')
-rw-r--r--test/v4l2_videodevice/dequeue_watchdog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp
index 2282e395..320d14c8 100644
--- a/test/v4l2_videodevice/dequeue_watchdog.cpp
+++ b/test/v4l2_videodevice/dequeue_watchdog.cpp
@@ -50,7 +50,11 @@ protected:
}
}
- capture_->streamOn();
+ ret = capture_->streamOn();
+ if (ret < 0) {
+ std::cout << "Failed to start streaming" << std::endl;
+ return TestFail;
+ }
timeout.start(5s);
while (timeout.isRunning()) {