[{"id":28452,"web_url":"https://patchwork.libcamera.org/comment/28452/","msgid":"<170505962687.3044059.17933623972321606155@ping.linuxembedded.co.uk>","date":"2024-01-12T11:40:26","subject":"Re: [libcamera-devel] [PATCH v3 2/7] apps: lc-compliance: Check\n\tthat requests complete successfully","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Jacopo Mondi via libcamera-devel (2023-12-30 16:29:07)\n> From: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n> \n> When a request fails to queue it is completed but with its status set to\n> RequestCancelled. Add a check in the requestComplete callback to make\n> sure that the request was completed successfully.\n> \n> For the SimpleCaptureUnbalanced test we need to do this check only if\n> the capture isn't over yet, otherwise the few extra requests that get\n> cancelled at the end, which is the normal behavior, will make the test\n> fail.\n> \n> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n\nThis sounds and looks pretty reasonable. So I would say this should\nalready be good to go.\n\nI'll be keen to see lc-compliance run more and grow in our automated\ntests.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/apps/lc-compliance/simple_capture.cpp | 6 ++++++\n>  1 file changed, 6 insertions(+)\n> \n> diff --git a/src/apps/lc-compliance/simple_capture.cpp b/src/apps/lc-compliance/simple_capture.cpp\n> index cf4d7cf38bc3..e22a339c4e1c 100644\n> --- a/src/apps/lc-compliance/simple_capture.cpp\n> +++ b/src/apps/lc-compliance/simple_capture.cpp\n> @@ -127,6 +127,9 @@ int SimpleCaptureBalanced::queueRequest(Request *request)\n>  \n>  void SimpleCaptureBalanced::requestComplete(Request *request)\n>  {\n> +       EXPECT_EQ(request->status(), Request::Status::RequestComplete)\n> +               << \"Request didn't complete successfully\";\n> +\n>         captureCount_++;\n>         if (captureCount_ >= captureLimit_) {\n>                 loop_->exit(0);\n> @@ -184,6 +187,9 @@ void SimpleCaptureUnbalanced::requestComplete(Request *request)\n>                 return;\n>         }\n>  \n> +       EXPECT_EQ(request->status(), Request::Status::RequestComplete)\n> +               << \"Request didn't complete successfully\";\n> +\n>         request->reuse(Request::ReuseBuffers);\n>         if (camera_->queueRequest(request))\n>                 loop_->exit(-EINVAL);\n> -- \n> 2.41.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id F2ECFBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Jan 2024 11:40:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A3BD1628B6;\n\tFri, 12 Jan 2024 12:40:29 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C532361E17\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Jan 2024 12:40:28 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C0D657E4;\n\tFri, 12 Jan 2024 12:39:22 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705059629;\n\tbh=yXN6uh8RpCAuYK1tgn7ZglLXV0ftbI6wxVKMGcIZfZM=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=xxj58/3B4GVbrWtPEnJ98MTd2TTXx9WhIikkQb5WXwbs6n+DrPLCZD4Z8dfTDeXJ8\n\txpp9CHxzB6L2+vlPEjlr+LIBYsL3ARcEJAuFPjdYCPxrk9ANpu2jO9Y+/eB3cdJcvh\n\tLBuqdcpvy5/zLeKNDeOA7t0KMSefmbsjGRpWkWpCD2i/xkSRkAE38kem3qlEsLYh/z\n\toEXsBBiJXZytESB5/eoLdCpNAfOEYS6O46+WxDxVDDsnE3RTFq/ZtqnJXLFwAISP9c\n\tJv10Eu2kocuSUAplbB2UyNed7gaMvi9vrpL9G42O9Odih7Wmv5oZJdmxPGwr9gC6LD\n\tu858vVb/apDhA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705059562;\n\tbh=yXN6uh8RpCAuYK1tgn7ZglLXV0ftbI6wxVKMGcIZfZM=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=lXPFRox4R3B65bqnyfy+/IFP1x8v1OXaDvh22AXbmn3IP7otB1U/pk3Bf7aUlofW8\n\to8WykE7IXcthA+zsMMatM6Hz9Ibg7HsVU00JhP1iSQ+K08fAvF1MVWk9Ayx/b2a2z6\n\tDUfl9dI2UWPVntGYRK4IPeYdLLTVHaaEEN8yV0nM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lXPFRox4\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231230162912.827669-3-jacopo.mondi@ideasonboard.com>","References":"<20231230162912.827669-1-jacopo.mondi@ideasonboard.com>\n\t<20231230162912.827669-3-jacopo.mondi@ideasonboard.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 12 Jan 2024 11:40:26 +0000","Message-ID":"<170505962687.3044059.17933623972321606155@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v3 2/7] apps: lc-compliance: Check\n\tthat requests complete successfully","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]