[{"id":22912,"web_url":"https://patchwork.libcamera.org/comment/22912/","msgid":"<YnlLbDSfiI407CFH@pendragon.ideasonboard.com>","date":"2022-05-09T17:12:12","subject":"Re: [libcamera-devel] [PATCH v6 2/3] test: Add YamlParser test","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Han-Lin,\n\nThank you for the patch.\n\nOn Wed, Apr 27, 2022 at 10:09:28PM +0800, Han-Lin Chen wrote:\n> Add a unit test to exercise the API of the YamlParser class.\n> \n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  test/meson.build     |   1 +\n>  test/yaml-parser.cpp | 494 +++++++++++++++++++++++++++++++++++++++++++\n>  2 files changed, 495 insertions(+)\n>  create mode 100644 test/yaml-parser.cpp\n> \n> diff --git a/test/meson.build b/test/meson.build\n> index fd4c5ca0..9c68fae1 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -54,6 +54,7 @@ internal_tests = [\n>      ['timer-thread',                    'timer-thread.cpp'],\n>      ['unique-fd',                       'unique-fd.cpp'],\n>      ['utils',                           'utils.cpp'],\n> +    ['yaml-parser',                     'yaml-parser.cpp'],\n>  ]\n>  \n>  internal_non_parallel_tests = [\n> diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp\n> new file mode 100644\n> index 00000000..e00489db\n> --- /dev/null\n> +++ b/test/yaml-parser.cpp\n> @@ -0,0 +1,494 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2022, Google Inc.\n> + *\n> + * yaml-parser.cpp - YAML parser operations tests\n> + */\n> +\n> +#include <iostream>\n> +#include <string>\n> +#include <unistd.h>\n> +\n> +#include <libcamera/internal/yaml_parser.h>\n> +\n> +#include \"test.h\"\n> +\n> +using namespace std;\n> +using namespace libcamera;\n\nI'll sort these alphabetically when applying.\n\n[snip]","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 C1B14C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 May 2022 17:12:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6572865646;\n\tMon,  9 May 2022 19:12:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37F4C604A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 May 2022 19:12:17 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B7EF1E0C;\n\tMon,  9 May 2022 19:12:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652116339;\n\tbh=dcr1WbRSb3oXjbfA9kqWXmTrxSaYotUCd2MAjfQVyus=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=ADouLfEkq5pBPwQ23lreV3967vhc5eDj4mmkNSX2k7vrKMb2KzJsNQPrc+MntjneT\n\t6HO6kJXcmv5WNL4Y19XvqS4FitCyl3f41IOj7a+MPv6XOv+wzrfr/ZSfJb9wY2ypJ5\n\tQDKHpLL0xeypBva/N7mrkqyAGGrCiazM0+oMxLnd5VIn27+yg6Kt8xGvOZJvwHuYNe\n\tyXn1VHFj8r9BtkO6I86Ivfautkj4lMEhPlk3t9h0NfRWcy1cEyHOb8OrvklVe8MA1Y\n\tAfjfuzJfirk0/HPrtaNleniv5JIT9LZX/pTSTOrzfOLH2ccDlfWWuW9FyzpdXpAt1C\n\tnr+yiIIvKy2Fg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652116336;\n\tbh=dcr1WbRSb3oXjbfA9kqWXmTrxSaYotUCd2MAjfQVyus=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=U7LXYvr3V0rnsOidpMlhOFJ/86xoU48EghiMpKs/s3cAKKhxfQABfYiIcO53D/w1d\n\tv5q7p0al9xVt+gRUadPP2gz9IRoPbEhnOK/YwRgTbCEC29h9DfgWARU5GfoXrE3iwQ\n\tmoV1Reb+r+LYla5HTDDCoDFdFRRl+Jc2GOhTPPos="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"U7LXYvr3\"; dkim-atps=neutral","Date":"Mon, 9 May 2022 20:12:12 +0300","To":"Han-Lin Chen <hanlinchen@chromium.org>","Message-ID":"<YnlLbDSfiI407CFH@pendragon.ideasonboard.com>","References":"<20220427140929.429977-1-hanlinchen@chromium.org>\n\t<20220427140929.429977-2-hanlinchen@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220427140929.429977-2-hanlinchen@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v6 2/3] test: Add YamlParser test","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]