[libcamera-devel] [PATCH 1/3] test: v4l2_videodevice: dequeue_watchdog: Log message on failures
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Thu Apr 7 13:15:11 CEST 2022
Hi Laurent,
On Thu, Apr 07, 2022 at 11:37:17AM +0300, Laurent Pinchart via libcamera-devel wrote:
> Failing a test without an error message makes it difficult to debug
> issues. Add a message when buffer allocation fails.
>
> 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 | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp
> index 0cb4de6f81a0..2282e3958c03 100644
> --- a/test/v4l2_videodevice/dequeue_watchdog.cpp
> +++ b/test/v4l2_videodevice/dequeue_watchdog.cpp
> @@ -33,8 +33,10 @@ protected:
> Timer timeout;
>
> int ret = capture_->allocateBuffers(bufferCount, &buffers_);
> - if (ret < 0)
> + if (ret < 0) {
> + std::cout << "Failed to allocate buffers" << std::endl;
> return TestFail;
> + }
>
> capture_->dequeueTimeout.connect(this, &DequeueWatchdogTest::barkCounter);
> capture_->setDequeueTimeout(5ms);
More information about the libcamera-devel
mailing list