[{"id":1975,"web_url":"https://patchwork.libcamera.org/comment/1975/","msgid":"<20190623152315.GC32581@bigcity.dyn.berto.se>","date":"2019-06-23T15:23:15","subject":"Re: [libcamera-devel] [RFC PATCH v2 4/9] libcamera: test: Add\n\tControlInfo tests","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nThanks for your work.\n\nOn 2019-06-21 17:13:56 +0100, Kieran Bingham wrote:\n> Provide an initial test coverage for the ControlInfo class.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  test/controls.cpp | 40 ++++++++++++++++++++++++++++++++++++++++\n>  test/meson.build  |  1 +\n>  2 files changed, 41 insertions(+)\n>  create mode 100644 test/controls.cpp\n> \n> diff --git a/test/controls.cpp b/test/controls.cpp\n> new file mode 100644\n> index 000000000000..94e89f270108\n> --- /dev/null\n> +++ b/test/controls.cpp\n> @@ -0,0 +1,40 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * controls.cpp - Control tests\n> + */\n> +\n> +#include <iostream>\n> +\n> +#include <libcamera/controls.h>\n> +\n> +#include \"test.h\"\n> +\n> +using namespace std;\n> +using namespace libcamera;\n> +\n> +class Controls : public Test\n> +{\n> +protected:\n> +\tint testControlInfo()\n> +\t{\n> +\t\tControlInfo gainInfo(ManualGain);\n> +\t\tcout << \"Gain Info: \" << gainInfo << endl;\n> +\n> +\t\treturn TestPass;\n> +\t}\n> +\n> +\tint run()\n> +\t{\n> +\t\tint ret;\n> +\n> +\t\tret = testControlInfo();\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\n> +\t\treturn TestPass;\n> +\t}\n> +};\n> +\n> +TEST_REGISTER(Controls)\n> diff --git a/test/meson.build b/test/meson.build\n> index eff541ddc0a6..0b3e6c6813e6 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -9,6 +9,7 @@ subdir('v4l2_subdevice')\n>  subdir('v4l2_videodevice')\n>  \n>  public_tests = [\n> +    ['controls',                        'controls.cpp'],\n>      ['event',                           'event.cpp'],\n>      ['event-dispatcher',                'event-dispatcher.cpp'],\n>      ['geometry',                        'geometry.cpp'],\n> -- \n> 2.20.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F9876157E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 Jun 2019 17:23:17 +0200 (CEST)","by mail-lf1-x141.google.com with SMTP id y17so8240909lfe.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 Jun 2019 08:23:17 -0700 (PDT)","from localhost (customer-145-14-112-32.stosn.net. [145.14.112.32])\n\tby smtp.gmail.com with ESMTPSA id\n\te12sm1167155lfb.66.2019.06.23.08.23.16\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tSun, 23 Jun 2019 08:23:16 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=HQk/iiftbmXM3lmcKSIVRxgWwIt1qkKzPNWrQ1+/3Jw=;\n\tb=EvWaKElXHb4+e624Z9T1kKfTIfDTUigyXd2Tf3MUyUOj7dAUzIG7CmkD0I0iNotnBq\n\tIp8abuWD6Pl+7mRbfbsH4pHWdq1om8BkFie5R2N9D1cARmfVpQ/BoTePwOVUnPTjyB2m\n\tHLrtUszH9IdBONY/bPqGN0MwYpv2eD79gDgQxcZGl+GtIcj6gE625y3Yye2P1zJo+woB\n\tsuwNflIQB2zILaR8F/ZU1KploafxJyjgHCgrIib1rcPML+zRsgclwkrW4Iw7+bVJ5tsP\n\tmmLnDJ4C1wlYVTeYvPz7SFysipWpDOzMghLze7ATUZWXUGoV2ZsGF8/XqSlk5mcxD9xx\n\tcISg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=HQk/iiftbmXM3lmcKSIVRxgWwIt1qkKzPNWrQ1+/3Jw=;\n\tb=ZiNHqel0u2FhYo0LeXO9DJXViODL5EsJpGQ1QT85LgfQd3WEUnhUy62Z9/lpkJOGYP\n\tOi7002q8YDizcE8Un5BTrAlqPMA+L53P3lSq7nvLn942/bcmdlQiXGqIMr8s8lG1ZBN/\n\te6Sygprq+OuBB9cex0gFjrbuotmXKVDhHeBd35ZyLggA8sAK3oi5l/1BY1LNooxhgCED\n\tfIh0Cn3nr80zd8vcLB7tchLG2VORVkzjgCrwYGqZm05wMhlstfS90kLt8kKCszbSuI3a\n\tJfZkn21hPfsV64yzMM6PhRfPB48myO+qDLwve0LaEe1M0/QJMywtnhltsbDI36GXS59K\n\tR/Zg==","X-Gm-Message-State":"APjAAAUy4pO84HX+1g9FiAWMFn/Or6cdsh0MiThq9Ry22Vbmqcf1zg/+\n\t1Qvtl5MIziKWo2Tjx1MsLw00S4LuB+Q=","X-Google-Smtp-Source":"APXvYqx9wiTJQ37EBdLYHjFAxiogsk5VltGIsn/tV2nntsuzyaQ6I/lurL4a8BwcAJ4UPiAYiZyGaA==","X-Received":"by 2002:a19:8116:: with SMTP id\n\tc22mr68552949lfd.111.1561303396582; \n\tSun, 23 Jun 2019 08:23:16 -0700 (PDT)","Date":"Sun, 23 Jun 2019 17:23:15 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190623152315.GC32581@bigcity.dyn.berto.se>","References":"<20190621161401.28337-1-kieran.bingham@ideasonboard.com>\n\t<20190621161401.28337-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190621161401.28337-5-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [RFC PATCH v2 4/9] libcamera: test: Add\n\tControlInfo tests","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Sun, 23 Jun 2019 15:23:17 -0000"}},{"id":1981,"web_url":"https://patchwork.libcamera.org/comment/1981/","msgid":"<20190623215727.GD6124@pendragon.ideasonboard.com>","date":"2019-06-23T21:57:27","subject":"Re: [libcamera-devel] [RFC PATCH v2 4/9] libcamera: test: Add\n\tControlInfo tests","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jun 21, 2019 at 05:13:56PM +0100, Kieran Bingham wrote:\n> Provide an initial test coverage for the ControlInfo class.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  test/controls.cpp | 40 ++++++++++++++++++++++++++++++++++++++++\n>  test/meson.build  |  1 +\n>  2 files changed, 41 insertions(+)\n>  create mode 100644 test/controls.cpp\n> \n> diff --git a/test/controls.cpp b/test/controls.cpp\n> new file mode 100644\n> index 000000000000..94e89f270108\n> --- /dev/null\n> +++ b/test/controls.cpp\n> @@ -0,0 +1,40 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * controls.cpp - Control tests\n> + */\n> +\n> +#include <iostream>\n> +\n> +#include <libcamera/controls.h>\n> +\n> +#include \"test.h\"\n> +\n> +using namespace std;\n> +using namespace libcamera;\n> +\n> +class Controls : public Test\n> +{\n> +protected:\n> +\tint testControlInfo()\n> +\t{\n> +\t\tControlInfo gainInfo(ManualGain);\n> +\t\tcout << \"Gain Info: \" << gainInfo << endl;\n> +\n> +\t\treturn TestPass;\n> +\t}\n> +\n> +\tint run()\n> +\t{\n> +\t\tint ret;\n> +\n> +\t\tret = testControlInfo();\n> +\t\tif (ret)\n> +\t\t\treturn ret;\n> +\n> +\t\treturn TestPass;\n\nA test that always succeeds is not a test...\n\n> +\t}\n> +};\n> +\n> +TEST_REGISTER(Controls)\n> diff --git a/test/meson.build b/test/meson.build\n> index eff541ddc0a6..0b3e6c6813e6 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -9,6 +9,7 @@ subdir('v4l2_subdevice')\n>  subdir('v4l2_videodevice')\n>  \n>  public_tests = [\n> +    ['controls',                        'controls.cpp'],\n>      ['event',                           'event.cpp'],\n>      ['event-dispatcher',                'event-dispatcher.cpp'],\n>      ['geometry',                        'geometry.cpp'],","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 E5CDC6157E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 23 Jun 2019 23:59:55 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5AFBA500;\n\tSun, 23 Jun 2019 23:59:55 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1561327195;\n\tbh=DCNsRtREt5ONIFM68WGisHvJMdKRMK9t1DBclplcoCM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=rujwvaY9DuT7W2xXdTbxppSySUOaf3M/dIgW7UY25u4TDK6O2fbEDiXIQEMrfCfNS\n\toa7gcujWrUYXpwxALBvMRjqxYMZ3dclF9HpkcSlguPBJ4LBsRgdsHXN0NMTu2NsikN\n\t10/J0ITKZi2CRJxUoFGijre0T7TeRYJccwpSQ1cI=","Date":"Mon, 24 Jun 2019 00:57:27 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190623215727.GD6124@pendragon.ideasonboard.com>","References":"<20190621161401.28337-1-kieran.bingham@ideasonboard.com>\n\t<20190621161401.28337-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190621161401.28337-5-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [RFC PATCH v2 4/9] libcamera: test: Add\n\tControlInfo tests","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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":"Sun, 23 Jun 2019 21:59:56 -0000"}}]