[{"id":4626,"web_url":"https://patchwork.libcamera.org/comment/4626/","msgid":"<20200428201009.ubpw5ikycp3juw24@uno.localdomain>","date":"2020-04-28T20:10:09","subject":"Re: [libcamera-devel] [PATCH v2 2/3] test: camera_sensor: Test the\n\tmodel() function","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Tue, Apr 28, 2020 at 09:16:49PM +0300, Laurent Pinchart wrote:\n> Verify that the sensor model matches the expected value. The whole model\n> extraction heuristic isn't fully tested as that would require being able\n> to inject different entity names. It is still useful as an initial step.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n  j\n\n> ---\n>  test/camera-sensor.cpp | 6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp\n> index 27c190fe7ace..6069d668e495 100644\n> --- a/test/camera-sensor.cpp\n> +++ b/test/camera-sensor.cpp\n> @@ -61,6 +61,12 @@ protected:\n>\n>  \tint run()\n>  \t{\n> +\t\tif (sensor_->model() != \"Sensor A\") {\n> +\t\t\tcerr << \"Incorrect sensor model '\" << sensor_->model()\n> +\t\t\t     << \"'\" << endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n>  \t\tconst std::vector<unsigned int> &codes = sensor_->mbusCodes();\n>  \t\tauto iter = std::find(codes.begin(), codes.end(),\n>  \t\t\t\t      MEDIA_BUS_FMT_ARGB8888_1X32);\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8C49C60AF4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Apr 2020 22:06:58 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0F40D1C0002;\n\tTue, 28 Apr 2020 20:06:57 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Tue, 28 Apr 2020 22:10:09 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200428201009.ubpw5ikycp3juw24@uno.localdomain>","References":"<20200428181650.5071-1-laurent.pinchart@ideasonboard.com>\n\t<20200428181650.5071-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200428181650.5071-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 2/3] test: camera_sensor: Test the\n\tmodel() function","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>","X-List-Received-Date":"Tue, 28 Apr 2020 20:06:58 -0000"}}]