summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-07 11:24:01 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-04-07 16:19:33 +0300
commitdd76f8e11b0f7ad5fa5d51ff8e26727536db948f (patch)
tree826afc31f9f0d1225583d92f979c7fe52ee22f49 /test
parent85204b4b4444b47af2a3f7c4592dcd2a4bb9dfc5 (diff)
test: v4l2_videodevice: dequeue_watchdog: Log message on failures
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@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>
Diffstat (limited to 'test')
-rw-r--r--test/v4l2_videodevice/dequeue_watchdog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp
index 0cb4de6f..2282e395 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);