[{"id":30320,"web_url":"https://patchwork.libcamera.org/comment/30320/","msgid":"<dd13da3c-8f2f-40e4-9cb2-3235656f30c0@ideasonboard.com>","date":"2024-07-04T10:49:47","subject":"Re: [PATCH v2 2/2] test: utils: Extend utils::hex() test to 8-bit\n\tand 16-bit values","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch\n\nOn 04/07/24 3:37 pm, Laurent Pinchart wrote:\n> Now that the utils::hex() function supports 8-bit and 16-bit integers,\n> extend the unit test to cover them.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nLGTM,\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> ---\n>   test/utils.cpp | 17 +++++++++++++++++\n>   1 file changed, 17 insertions(+)\n>\n> diff --git a/test/utils.cpp b/test/utils.cpp\n> index 41af954b326f..d25475cb93b9 100644\n> --- a/test/utils.cpp\n> +++ b/test/utils.cpp\n> @@ -176,6 +176,14 @@ protected:\n>   \t\tstd::ostringstream os;\n>   \t\tstd::string ref;\n>   \n> +\t\tos << utils::hex(static_cast<int8_t>(0x42)) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<uint8_t>(0x42)) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<int16_t>(0x42)) << \" \";\n> +\t\tref += \"0x0042 \";\n> +\t\tos << utils::hex(static_cast<uint16_t>(0x42)) << \" \";\n> +\t\tref += \"0x0042 \";\n>   \t\tos << utils::hex(static_cast<int32_t>(0x42)) << \" \";\n>   \t\tref += \"0x00000042 \";\n>   \t\tos << utils::hex(static_cast<uint32_t>(0x42)) << \" \";\n> @@ -184,6 +192,15 @@ protected:\n>   \t\tref += \"0x0000000000000042 \";\n>   \t\tos << utils::hex(static_cast<uint64_t>(0x42)) << \" \";\n>   \t\tref += \"0x0000000000000042 \";\n> +\n> +\t\tos << utils::hex(static_cast<int8_t>(0x42), 6) << \" \";\n> +\t\tref += \"0x000042 \";\n> +\t\tos << utils::hex(static_cast<uint8_t>(0x42), 1) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<int16_t>(0x42), 6) << \" \";\n> +\t\tref += \"0x000042 \";\n> +\t\tos << utils::hex(static_cast<uint16_t>(0x42), 1) << \" \";\n> +\t\tref += \"0x42 \";\n>   \t\tos << utils::hex(static_cast<int32_t>(0x42), 4) << \" \";\n>   \t\tref += \"0x0042 \";\n>   \t\tos << utils::hex(static_cast<uint32_t>(0x42), 1) << \" \";","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 76767BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 10:49:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2FFCF62E25;\n\tThu,  4 Jul 2024 12:49:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C2FD62E17\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 12:49:53 +0200 (CEST)","from [IPV6:2405:201:2015:f873:9278:2c85:fd02:c5f5] (unknown\n\t[IPv6:2405:201:2015:f873:9278:2c85:fd02:c5f5])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DEB9B502;\n\tThu,  4 Jul 2024 12:49:23 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Xtx/1bpx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720090164;\n\tbh=mmXBsN1esjgAvXE155h1w47zwGd57dXJtxNlAudJqbU=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=Xtx/1bpx2krAusvICXHIPAP7ucv15see4h7j9FU1TkjgAj2esF72vwh9KDdxnHpKc\n\tXIA/gClsUsiAzGLIwWEFV50C3Fw4pCuwlM8qhwivdNysFdptKujs1XnTRf4dAF1IAZ\n\t9NX2lz7k5r4h6L3Zs7m+MgTAT9ziAp/UOQQDSf6U=","Message-ID":"<dd13da3c-8f2f-40e4-9cb2-3235656f30c0@ideasonboard.com>","Date":"Thu, 4 Jul 2024 16:19:47 +0530","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 2/2] test: utils: Extend utils::hex() test to 8-bit\n\tand 16-bit values","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20240704100728.7003-1-laurent.pinchart@ideasonboard.com>\n\t<20240704100728.7003-2-laurent.pinchart@ideasonboard.com>","Content-Language":"en-US","From":"Umang Jain <umang.jain@ideasonboard.com>","In-Reply-To":"<20240704100728.7003-2-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>"}},{"id":30323,"web_url":"https://patchwork.libcamera.org/comment/30323/","msgid":"<qvz6zrxevci47ktu7ofvatm2luaznch7pfqzqbfq7lbggaqnvv@w72g26d2fgf7>","date":"2024-07-04T10:58:29","subject":"Re: [PATCH v2 2/2] test: utils: Extend utils::hex() test to 8-bit\n\tand 16-bit values","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn Thu, Jul 04, 2024 at 01:07:28PM +0300, Laurent Pinchart wrote:\n> Now that the utils::hex() function supports 8-bit and 16-bit integers,\n> extend the unit test to cover them.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> \n\nRegards,\nStefan\n\n> ---\n>  test/utils.cpp | 17 +++++++++++++++++\n>  1 file changed, 17 insertions(+)\n> \n> diff --git a/test/utils.cpp b/test/utils.cpp\n> index 41af954b326f..d25475cb93b9 100644\n> --- a/test/utils.cpp\n> +++ b/test/utils.cpp\n> @@ -176,6 +176,14 @@ protected:\n>  \t\tstd::ostringstream os;\n>  \t\tstd::string ref;\n>  \n> +\t\tos << utils::hex(static_cast<int8_t>(0x42)) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<uint8_t>(0x42)) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<int16_t>(0x42)) << \" \";\n> +\t\tref += \"0x0042 \";\n> +\t\tos << utils::hex(static_cast<uint16_t>(0x42)) << \" \";\n> +\t\tref += \"0x0042 \";\n>  \t\tos << utils::hex(static_cast<int32_t>(0x42)) << \" \";\n>  \t\tref += \"0x00000042 \";\n>  \t\tos << utils::hex(static_cast<uint32_t>(0x42)) << \" \";\n> @@ -184,6 +192,15 @@ protected:\n>  \t\tref += \"0x0000000000000042 \";\n>  \t\tos << utils::hex(static_cast<uint64_t>(0x42)) << \" \";\n>  \t\tref += \"0x0000000000000042 \";\n> +\n> +\t\tos << utils::hex(static_cast<int8_t>(0x42), 6) << \" \";\n> +\t\tref += \"0x000042 \";\n> +\t\tos << utils::hex(static_cast<uint8_t>(0x42), 1) << \" \";\n> +\t\tref += \"0x42 \";\n> +\t\tos << utils::hex(static_cast<int16_t>(0x42), 6) << \" \";\n> +\t\tref += \"0x000042 \";\n> +\t\tos << utils::hex(static_cast<uint16_t>(0x42), 1) << \" \";\n> +\t\tref += \"0x42 \";\n>  \t\tos << utils::hex(static_cast<int32_t>(0x42), 4) << \" \";\n>  \t\tref += \"0x0042 \";\n>  \t\tos << utils::hex(static_cast<uint32_t>(0x42), 1) << \" \";\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 650BFBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  4 Jul 2024 10:58:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0454F62E24;\n\tThu,  4 Jul 2024 12:58:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 51D6A619C8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  4 Jul 2024 12:58:32 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:c01a:815:781:30fb])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 926A163D;\n\tThu,  4 Jul 2024 12:58:03 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aVFQhvRT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720090683;\n\tbh=1Y+WPeygExQjcTJiMKsyZG+z8cgKPEsoHJqldXy23Wg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aVFQhvRTQzz0ZU52hl0JGGOAF4HttYwv1U0sqALxQ+KH5xyXDEMrNiPA+VJplafr2\n\tKUSEOQE+yA49uOtRc7LjirlvmZClsuNjy7+aIuvHYc7Ix+FQxDjLYcbXr4t5Ku+DMh\n\td2U8Hba4erCjx0RtooO9bcr0kcuiR65Ue8vjW7Fw=","Date":"Thu, 4 Jul 2024 12:58:29 +0200","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 2/2] test: utils: Extend utils::hex() test to 8-bit\n\tand 16-bit values","Message-ID":"<qvz6zrxevci47ktu7ofvatm2luaznch7pfqzqbfq7lbggaqnvv@w72g26d2fgf7>","References":"<20240704100728.7003-1-laurent.pinchart@ideasonboard.com>\n\t<20240704100728.7003-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240704100728.7003-2-laurent.pinchart@ideasonboard.com>","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>"}}]