[libcamera-devel] [PATCH v7 08/11] lc-compliance: Check that requests complete successfully
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Aug 2 01:58:59 CEST 2021
Hi Nícolas,
Thank you for the patch.
On Thu, Jul 22, 2021 at 08:28:48PM -0300, Nícolas F. R. A. Prado wrote:
> 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.
Do those three tests ensure that there will be no frame queued when they
stop() the camera ? Otherwise there could be requests that get cancelled
at that point.
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
> ---
>
> No changes in v7
>
> 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 48ce8f088e71..691e5fdb2aca 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";
Line wrap, and blank line after ? Same below.
> 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();
> }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list