[libcamera-devel] [PATCH v6 08/10] lc-compliance: Check that requests complete successfully
Nícolas F. R. A. Prado
nfraprado at collabora.com
Wed Jul 14 20:38:55 CEST 2021
When a request fails to queue it is completed but with its status set to
RequestCancelled. Add a check in the requestComplete callback to make
sure that the request was completed successfully.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
---
No changes in v6
Added in v5
src/lc-compliance/simple_capture.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lc-compliance/simple_capture.cpp b/src/lc-compliance/simple_capture.cpp
index d1e691abfec1..1883bbb524ac 100644
--- a/src/lc-compliance/simple_capture.cpp
+++ b/src/lc-compliance/simple_capture.cpp
@@ -178,6 +178,7 @@ int SimpleCaptureBalanced::queueRequest(Request *request)
void SimpleCaptureBalanced::requestComplete(Request *request)
{
+ EXPECT_EQ(request->status(), Request::Status::RequestComplete) << "Request didn't complete successfully";
if (captureCompleted())
return;
@@ -213,6 +214,7 @@ void SimpleCaptureUnbalanced::capture(unsigned int numRequests)
void SimpleCaptureUnbalanced::requestComplete(Request *request)
{
+ EXPECT_EQ(request->status(), Request::Status::RequestComplete) << "Request didn't complete successfully";
if (captureCompleted())
return;
@@ -248,5 +250,6 @@ void SimpleCaptureOverflow::capture()
void SimpleCaptureOverflow::requestComplete([[maybe_unused]] Request *request)
{
+ EXPECT_EQ(request->status(), Request::Status::RequestComplete) << "Request didn't complete successfully";
captureCompleted();
}
--
2.32.0
More information about the libcamera-devel
mailing list