[libcamera-devel] [PATCH 2/3] test: v4l2_videodevice: dequeue_watchdog: Check return value of streamOn
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Thu Apr 7 13:16:08 CEST 2022
Hi Laurent,
On Thu, Apr 07, 2022 at 11:37:18AM +0300, Laurent Pinchart via libcamera-devel wrote:
> 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>
Reviewed-by: Paul Elder <paul.elder 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()) {
More information about the libcamera-devel
mailing list