[{"id":22039,"web_url":"https://patchwork.libcamera.org/comment/22039/","msgid":"<20220117062447.GI4255@pyrite.rasen.tech>","date":"2022-01-17T06:24:47","subject":"Re: [libcamera-devel] [PATCH] test: v4l2_compat: Add --verbose\n\targument","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Laurent,\n\nOn Sat, Jan 15, 2022 at 06:44:34PM +0200, Laurent Pinchart wrote:\n> Add a -v/--verbose argument to the v4l2_compat test to print the output\n> of v4l2-compliance, even when the test passes. This can be useful when\n> debugging.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  test/v4l2_compat/v4l2_compat_test.py | 11 ++++++++---\n>  1 file changed, 8 insertions(+), 3 deletions(-)\n> \n> diff --git a/test/v4l2_compat/v4l2_compat_test.py b/test/v4l2_compat/v4l2_compat_test.py\n> index 29c25974c1c9..a77585fc2f49 100755\n> --- a/test/v4l2_compat/v4l2_compat_test.py\n> +++ b/test/v4l2_compat/v4l2_compat_test.py\n> @@ -65,7 +65,7 @@ def test_v4l2_compliance(v4l2_compliance, v4l2_compat, device, base_driver):\n>  \n>      result = extract_result(output[-2])\n>      if result['failed'] == 0:\n> -        return TestPass, None\n> +        return TestPass, output\n>  \n>      # vimc will fail s_fmt because it only supports framesizes that are\n>      # multiples of 3\n> @@ -73,7 +73,7 @@ def test_v4l2_compliance(v4l2_compliance, v4l2_compat, device, base_driver):\n>          failures = grep('fail', output)\n>          if re.search('S_FMT cannot handle an invalid format', failures[0]) is None:\n>              return TestFail, output\n> -        return TestPass, None\n> +        return TestPass, output\n>  \n>      return TestFail, output\n>  \n> @@ -82,6 +82,8 @@ def main(argv):\n>      parser = argparse.ArgumentParser()\n>      parser.add_argument('-a', '--all', action='store_true',\n>                          help='Test all available cameras')\n> +    parser.add_argument('-v', '--verbose', action='store_true',\n> +                        help='Make the output verbose')\n>      parser.add_argument('v4l2_compat', type=str,\n>                          help='Path to v4l2-compat.so')\n>      args = parser.parse_args(argv[1:])\n> @@ -146,9 +148,12 @@ def main(argv):\n>          if ret == TestFail:\n>              failed.append(device)\n>              print('failed')\n> -            print('\\n'.join(msg))\n>          else:\n>              print('success')\n> +\n> +        if ret == TestFail or args.verbose:\n> +            print('\\n'.join(msg))\n> +\n>          drivers_tested[driver] = True\n>  \n>      if len(drivers_tested) == 0:\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 76BBEBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Jan 2022 06:24:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B5219604F8;\n\tMon, 17 Jan 2022 07:24:56 +0100 (CET)","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 7CDE060211\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Jan 2022 07:24:55 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 30A60596;\n\tMon, 17 Jan 2022 07:24:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Vd5oPZk3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1642400695;\n\tbh=vrfS8ZThcJ2timUTNXo6ZeBDPIvzsLMVZGj7YnF+kqs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Vd5oPZk3TAE6dla3zc6NP700eeGW25jjG/3Oqx2GEsTHVf2K6K6zu8qFMh7VNDcLK\n\tSdyZGhnfPtAv+133OHhSoAL1x2wfbM1ANt0AERyxVv09dqsVRb/j5anokWhXpC/hJ4\n\tllTzo/hK9vO48TCIgndLdQJH35UphUtvwM4xEtaE=","Date":"Mon, 17 Jan 2022 15:24:47 +0900","From":"paul.elder@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220117062447.GI4255@pyrite.rasen.tech>","References":"<20220115164434.30763-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220115164434.30763-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] test: v4l2_compat: Add --verbose\n\targument","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22042,"web_url":"https://patchwork.libcamera.org/comment/22042/","msgid":"<164241785151.10801.15872814837988610456@Monstersaurus>","date":"2022-01-17T11:10:51","subject":"Re: [libcamera-devel] [PATCH] test: v4l2_compat: Add --verbose\n\targument","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2022-01-15 16:44:34)\n> Add a -v/--verbose argument to the v4l2_compat test to print the output\n> of v4l2-compliance, even when the test passes. This can be useful when\n> debugging.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThis sounds reasonable to me, particularly as this script is used as a\nstandalone test tool.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  test/v4l2_compat/v4l2_compat_test.py | 11 ++++++++---\n>  1 file changed, 8 insertions(+), 3 deletions(-)\n> \n> diff --git a/test/v4l2_compat/v4l2_compat_test.py b/test/v4l2_compat/v4l2_compat_test.py\n> index 29c25974c1c9..a77585fc2f49 100755\n> --- a/test/v4l2_compat/v4l2_compat_test.py\n> +++ b/test/v4l2_compat/v4l2_compat_test.py\n> @@ -65,7 +65,7 @@ def test_v4l2_compliance(v4l2_compliance, v4l2_compat, device, base_driver):\n>  \n>      result = extract_result(output[-2])\n>      if result['failed'] == 0:\n> -        return TestPass, None\n> +        return TestPass, output\n>  \n>      # vimc will fail s_fmt because it only supports framesizes that are\n>      # multiples of 3\n> @@ -73,7 +73,7 @@ def test_v4l2_compliance(v4l2_compliance, v4l2_compat, device, base_driver):\n>          failures = grep('fail', output)\n>          if re.search('S_FMT cannot handle an invalid format', failures[0]) is None:\n>              return TestFail, output\n> -        return TestPass, None\n> +        return TestPass, output\n>  \n>      return TestFail, output\n>  \n> @@ -82,6 +82,8 @@ def main(argv):\n>      parser = argparse.ArgumentParser()\n>      parser.add_argument('-a', '--all', action='store_true',\n>                          help='Test all available cameras')\n> +    parser.add_argument('-v', '--verbose', action='store_true',\n> +                        help='Make the output verbose')\n>      parser.add_argument('v4l2_compat', type=str,\n>                          help='Path to v4l2-compat.so')\n>      args = parser.parse_args(argv[1:])\n> @@ -146,9 +148,12 @@ def main(argv):\n>          if ret == TestFail:\n>              failed.append(device)\n>              print('failed')\n> -            print('\\n'.join(msg))\n>          else:\n>              print('success')\n> +\n> +        if ret == TestFail or args.verbose:\n> +            print('\\n'.join(msg))\n> +\n>          drivers_tested[driver] = True\n>  \n>      if len(drivers_tested) == 0:\n> -- \n> Regards,\n> \n> Laurent Pinchart\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 59978BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Jan 2022 11:10:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 80999604F8;\n\tMon, 17 Jan 2022 12:10:55 +0100 (CET)","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 478C460217\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Jan 2022 12:10:54 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C1F71596;\n\tMon, 17 Jan 2022 12:10:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QapRXHZN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1642417853;\n\tbh=0emUfaAjCDV5owADnuCH75SYDUfeg7SYlRADSRaKv4k=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=QapRXHZN6GbTQKMOJQDOEEpI6zGXUGwJC3myDUkRXKFATRtSAbcl7bachM9kabuHi\n\tVQ3OkaCt3dfY4gnh20F36k5gthzUh+emqYP1Q637lCWF4JSuUeFOzHs1mJUInB1KmD\n\t5BdszNH/gEgsr0bk1y02a1feQpn5bI+lio0zySlI=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20220115164434.30763-1-laurent.pinchart@ideasonboard.com>","References":"<20220115164434.30763-1-laurent.pinchart@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 17 Jan 2022 11:10:51 +0000","Message-ID":"<164241785151.10801.15872814837988610456@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] test: v4l2_compat: Add --verbose\n\targument","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]