[{"id":28279,"web_url":"https://patchwork.libcamera.org/comment/28279/","msgid":"<170196649785.2829918.16567432332491676120@ping.linuxembedded.co.uk>","date":"2023-12-07T16:28:17","subject":"Re: [libcamera-devel] [PATCH 2/6] test: log: log_process: Fix\n\tuninitialized variable on process exit failure","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2023-12-06 21:05:20)\n> If the process fails to exit before the timeout, the\n> LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by\n> initializating to Process::NotExited.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  test/log/log_process.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 17af7d74a1d5..f7635b70255c 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -139,7 +139,7 @@ private:\n>         ProcessManager processManager_;\n>  \n>         Process proc_;\n> -       Process::ExitStatus exitStatus_;\n> +       Process::ExitStatus exitStatus_ = Process::NotExited;\n>         string logPath_;\n>         int exitCode_;\n>         int num_;\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 5A096C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Dec 2023 16:28:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2226562B2A;\n\tThu,  7 Dec 2023 17:28:22 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CC36A629CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Dec 2023 17:28:20 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6EFDA674;\n\tThu,  7 Dec 2023 17:27:39 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701966502;\n\tbh=6xBkqKH+W+BwrMASlLOWjHHwYOEfgNkEbbscI5///fY=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=FfXBlkoXYD2NwaqAFfJB7u3qeuAlVkyOJ+WqRSgkYMJAusOyGje+Q1DxgNz/EFpqD\n\tFg4E1PKP+iZfpMfao/8Ddjb70J9rmGU8V90HK51pcpeyjjl3Zr425Sy2CzvAfffhGR\n\t/f2TNQ3trX5j2jH4TVHJJWm7beCYXDxm8emJoajzIqX5COyy/2diT0DsJOhenq1k93\n\t01XmAC8cFARTFiujxjK04LhEehCfwo8Gio3SdEoQH3KEEd/pV851qvwNOlaBudt0hi\n\t+tRP87g9b1Al3v/GBmDYAE6kaVNVIxoFZ8miNPDrCqHJ1Tr5ySW7d2JK68BVa+oLeW\n\tjG4FBEhANTIeA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1701966459;\n\tbh=6xBkqKH+W+BwrMASlLOWjHHwYOEfgNkEbbscI5///fY=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=fWnmUBBXOS4L7U1oj1aSWKFnxYJWXIM1412Hcc3PsljbW4vdzmXF/3jzhlP7WeRv/\n\tuRnlvGg9u727wKP4aOd+2Qpq6YMDO689f9TM/xYd3qSYpEX+1vaCWks8cyTHSEgwS3\n\t1gVGHvJgvFSOWefdKQciu48DsVYtCMF04q23QRNM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"fWnmUBBX\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231206210524.20974-3-laurent.pinchart@ideasonboard.com>","References":"<20231206210524.20974-1-laurent.pinchart@ideasonboard.com>\n\t<20231206210524.20974-3-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 07 Dec 2023 16:28:17 +0000","Message-ID":"<170196649785.2829918.16567432332491676120@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 2/6] test: log: log_process: Fix\n\tuninitialized variable on process exit failure","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28290,"web_url":"https://patchwork.libcamera.org/comment/28290/","msgid":"<b464505b-3719-e728-7d16-5819f1c39052@ideasonboard.com>","date":"2023-12-08T07:11:36","subject":"Re: [libcamera-devel] [PATCH 2/6] test: log: log_process: Fix\n\tuninitialized variable on process exit failure","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 12/7/23 2:35 AM, Laurent Pinchart via libcamera-devel wrote:\n> If the process fails to exit before the timeout, the\n> LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by\n> initializating to Process::NotExited.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   test/log/log_process.cpp | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index 17af7d74a1d5..f7635b70255c 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -139,7 +139,7 @@ private:\n>   \tProcessManager processManager_;\n>   \n>   \tProcess proc_;\n> -\tProcess::ExitStatus exitStatus_;\n> +\tProcess::ExitStatus exitStatus_ = Process::NotExited;\n>   \tstring logPath_;\n>   \tint exitCode_;\n>   \tint num_;","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 ECBAABD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 Dec 2023 07:11:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A681F62B31;\n\tFri,  8 Dec 2023 08:11:43 +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 0F0D1629E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Dec 2023 08:11:42 +0100 (CET)","from [192.168.1.105] (unknown [103.251.226.108])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6309B56D;\n\tFri,  8 Dec 2023 08:10:58 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1702019503;\n\tbh=KV2TXxx/EDjZeZNdr1UL3BNCqUZ+dtl47lyWVpn4IwM=;\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:\n\tFrom;\n\tb=HPWaIIDEF0X67d4Twk83RuyB7OlOxVGmKsZj6flKbBfhZJlJBuOZenTTxYnBJiJet\n\tgNMWQYfRY93pJ6o8VEYCEmQjuTd63U7Zko90s2jkBfHHx9Q2qgrS5sqUWODa0Ef5F9\n\ttMoraLkZGj2JDSukMqb93VU8ZYFiaS8q9hLIMcCzKkStWHCPxzNYGtoUKA60HKNgXt\n\t63VkubYBPG2jqMWGOOPNm8i7+LxCeUHs6qkhYMuTVwOwoVNMjJGnyS7uvwHgYkTtq2\n\tPuQ5+NhnBakzeUUXfWWbIAqM580kKCOqUOqOZWlMVsOm76Tf8aGxGCKpguHIaFqa7E\n\thMN5dsZjtkhfw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1702019460;\n\tbh=KV2TXxx/EDjZeZNdr1UL3BNCqUZ+dtl47lyWVpn4IwM=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=OZZiQwWOZaLjX5yaCuG0231Pb5IMZ0r7t2i5yb52QitTy0LCxGkh6hU25kCXDMTK8\n\t+umtMlY7NvBbqNqFD3g+1Mt3D1mlHpbk7r3Rl8bJ1VnMJGKj6yQaK5BxnqyhluR6Uu\n\tcZZi+GC1CMI8RwJa91WRw58RPbysdGp52l0lg3SQ="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OZZiQwWO\"; dkim-atps=neutral","Message-ID":"<b464505b-3719-e728-7d16-5819f1c39052@ideasonboard.com>","Date":"Fri, 8 Dec 2023 12:41:36 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.10.0","Content-Language":"en-US","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20231206210524.20974-1-laurent.pinchart@ideasonboard.com>\n\t<20231206210524.20974-3-laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20231206210524.20974-3-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 2/6] test: log: log_process: Fix\n\tuninitialized variable on process exit failure","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]