Message ID | 20220407083719.21631-2-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Commit | dd76f8e11b0f7ad5fa5d51ff8e26727536db948f |
Headers | show |
Series |
|
Related | show |
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@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@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);
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);
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> --- test/v4l2_videodevice/dequeue_watchdog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)