[RFC PATCH v1 09/12] apps: lc-compliance: Check number of buffers in allocator
Barnabás Pőcze
pobrn at protonmail.com
Fri Dec 20 16:08:41 CET 2024
Do a consistency check to ensure that the return value
matches the number of buffers actually created.
Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>
---
src/apps/lc-compliance/helpers/capture.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp
index b473e0773..5cc7635f7 100644
--- a/src/apps/lc-compliance/helpers/capture.cpp
+++ b/src/apps/lc-compliance/helpers/capture.cpp
@@ -49,6 +49,7 @@ void Capture::start()
ASSERT_GE(count, 0) << "Failed to allocate buffers";
EXPECT_EQ(count, config_->at(0).bufferCount) << "Allocated less buffers than expected";
+ ASSERT_EQ(count, allocator_.buffers(stream).size()) << "Unexpected number of buffers in allocator";
camera_->requestCompleted.connect(this, &Capture::requestComplete);
--
2.47.1
More information about the libcamera-devel
mailing list