From 3980448e9f46f9ca2f27b38187215543984e3f5d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 7 Apr 2022 11:24:01 +0300 Subject: 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 Reviewed-by: Paul Elder Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham --- test/v4l2_videodevice/dequeue_watchdog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/v4l2_videodevice') 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()) { -- cgit v1.2.1