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>
This commit is contained in:
Laurent Pinchart 2022-04-07 11:24:01 +03:00
parent dd76f8e11b
commit 3980448e9f

View file

@ -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); timeout.start(5s);
while (timeout.isRunning()) { while (timeout.isRunning()) {