diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-04-07 11:24:01 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-04-07 16:19:40 +0300 |
commit | 3980448e9f46f9ca2f27b38187215543984e3f5d (patch) | |
tree | c5359d65f22c253acde9ef38edbf5d50983e89bb | |
parent | dd76f8e11b0f7ad5fa5d51ff8e26727536db948f (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>
-rw-r--r-- | test/v4l2_videodevice/dequeue_watchdog.cpp | 6 |
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()) { |