[libcamera-devel] [PATCH 2/3] test: v4l2_videodevice: dequeue_watchdog: Check return value of streamOn
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Apr 7 10:37:18 CEST 2022
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 at ideasonboard.com>
---
test/v4l2_videodevice/dequeue_watchdog.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp
index 2282e3958c03..320d14c8e442 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()) {
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list