[{"id":29661,"web_url":"https://patchwork.libcamera.org/comment/29661/","msgid":"<171699204993.191612.11177799611670231369@ping.linuxembedded.co.uk>","date":"2024-05-29T14:14:09","subject":"Re: [PATCH v1 5/6] test: v4l2_videodevice: Increase timeout for vimc\n\tcapture tests","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-04-25 00:42:23)\n> On slower machines, a 1s timeout to capture frames with vimc can be too\n> short and cause test failures. Make the timeout proportional to the\n> number of frames expected to be captured, using a conservative low\n> estimate of the frame rate at 2fps. This does not increase the test time\n> if the vimc driver is fast enough to produce frames.\n\nBut ... does increase now to 15 seconds maximum from a 10 seconds\nmaximum before? Not an issue specifically - just my interpretation of:\n\n> -               timeout.start(10000ms);\n> +               timeout.start(500ms * 30);\n\nsounds like it's different from the commit message.\n\nAnyway, either way - it's not an issue - just wording of what is\nhappening.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  test/v4l2_videodevice/capture_async.cpp | 11 +++++++----\n>  1 file changed, 7 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> index 42e1e671790b..673664615ada 100644\n> --- a/test/v4l2_videodevice/capture_async.cpp\n> +++ b/test/v4l2_videodevice/capture_async.cpp\n> @@ -61,10 +61,12 @@ protected:\n>                 if (ret)\n>                         return TestFail;\n>  \n> -               timeout.start(10000ms);\n> +               const unsigned int nFrames = 30;\n> +\n> +               timeout.start(500ms * nFrames);\n>                 while (timeout.isRunning()) {\n>                         dispatcher->processEvents();\n> -                       if (frames > 30)\n> +                       if (frames > nFrames)\n>                                 break;\n>                 }\n>  \n> @@ -73,8 +75,9 @@ protected:\n>                         return TestFail;\n>                 }\n>  \n> -               if (frames < 30) {\n> -                       std::cout << \"Failed to capture 30 frames within timeout.\" << std::endl;\n> +               if (frames < nFrames) {\n> +                       std::cout << \"Failed to capture \" << nFrames\n> +                                 << \" frames within timeout.\" << std::endl;\n>                         return TestFail;\n>                 }\n>  \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 834A2BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 May 2024 14:14:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 82B9F634B9;\n\tWed, 29 May 2024 16:14:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AA3AB6347E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 May 2024 16:14:12 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 04EE2A27;\n\tWed, 29 May 2024 16:14:08 +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=\"UZHKDq0r\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1716992049;\n\tbh=EhIFAm42SNmSUUKfTOFN/jNKI9WZNSKmaMz1HFZs78E=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=UZHKDq0rYAUCof5pY6nJ7bJcTIIgIsIC5c4UTqsuNiLQUpbbg6zp8WVU3dIVErANw\n\tfgNh3e2bgyZHfxj4LVs8eLmvkWKTvkB4Ls4cjnIGkR74NJnWIOYhUba77G82TefyaY\n\tuWyOj2jGaq5/yNbPTIWQ4mbCV3d9N0Tyu++N5TKs=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240424234224.9658-6-laurent.pinchart@ideasonboard.com>","References":"<20240424234224.9658-1-laurent.pinchart@ideasonboard.com>\n\t<20240424234224.9658-6-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v1 5/6] test: v4l2_videodevice: Increase timeout for vimc\n\tcapture tests","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 29 May 2024 15:14:09 +0100","Message-ID":"<171699204993.191612.11177799611670231369@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":29666,"web_url":"https://patchwork.libcamera.org/comment/29666/","msgid":"<20240529152513.GS1436@pendragon.ideasonboard.com>","date":"2024-05-29T15:25:13","subject":"Re: [PATCH v1 5/6] test: v4l2_videodevice: Increase timeout for vimc\n\tcapture tests","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, May 29, 2024 at 03:14:09PM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2024-04-25 00:42:23)\n> > On slower machines, a 1s timeout to capture frames with vimc can be too\n> > short and cause test failures. Make the timeout proportional to the\n> > number of frames expected to be captured, using a conservative low\n> > estimate of the frame rate at 2fps. This does not increase the test time\n> > if the vimc driver is fast enough to produce frames.\n> \n> But ... does increase now to 15 seconds maximum from a 10 seconds\n> maximum before? Not an issue specifically - just my interpretation of:\n> \n> > -               timeout.start(10000ms);\n> > +               timeout.start(500ms * 30);\n> \n> sounds like it's different from the commit message.\n\nThe commit message should have mentioned 10s, not 1s. I'll fix that.\n\nOn fast machines the test time isn't increased as we break after\nnFrames, well below the 10s limit.\n\n> Anyway, either way - it's not an issue - just wording of what is\n> happening.\n> \n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  test/v4l2_videodevice/capture_async.cpp | 11 +++++++----\n> >  1 file changed, 7 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp\n> > index 42e1e671790b..673664615ada 100644\n> > --- a/test/v4l2_videodevice/capture_async.cpp\n> > +++ b/test/v4l2_videodevice/capture_async.cpp\n> > @@ -61,10 +61,12 @@ protected:\n> >                 if (ret)\n> >                         return TestFail;\n> >  \n> > -               timeout.start(10000ms);\n> > +               const unsigned int nFrames = 30;\n> > +\n> > +               timeout.start(500ms * nFrames);\n> >                 while (timeout.isRunning()) {\n> >                         dispatcher->processEvents();\n> > -                       if (frames > 30)\n> > +                       if (frames > nFrames)\n> >                                 break;\n> >                 }\n> >  \n> > @@ -73,8 +75,9 @@ protected:\n> >                         return TestFail;\n> >                 }\n> >  \n> > -               if (frames < 30) {\n> > -                       std::cout << \"Failed to capture 30 frames within timeout.\" << std::endl;\n> > +               if (frames < nFrames) {\n> > +                       std::cout << \"Failed to capture \" << nFrames\n> > +                                 << \" frames within timeout.\" << std::endl;\n> >                         return TestFail;\n> >                 }\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 14D7CBD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 May 2024 15:25:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 01C53634B6;\n\tWed, 29 May 2024 17:25:27 +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 C0D606347E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 May 2024 17:25:25 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EE71A149B;\n\tWed, 29 May 2024 17:25:21 +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=\"VlxuHsS0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1716996322;\n\tbh=TEyvQSNxKl3GOvvgN/1s5Qwjo7i6u2hC3Z6ghPg8fYU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VlxuHsS0sIfEDO0P5S3k8ZDT6vPB3EM4MMxpm1uujr5B0xun9313XaIcpZHdOfc2l\n\t2VMCCQUtfUYuxmxr4qEy5EEB1kAE+9XDru65nKYIs/Nh7GFUJfAZMxV/atqMZMq32p\n\tH+yCMoKinrDWMpowZcjhY1VycKykyNWevvQGL8ME=","Date":"Wed, 29 May 2024 18:25:13 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v1 5/6] test: v4l2_videodevice: Increase timeout for vimc\n\tcapture tests","Message-ID":"<20240529152513.GS1436@pendragon.ideasonboard.com>","References":"<20240424234224.9658-1-laurent.pinchart@ideasonboard.com>\n\t<20240424234224.9658-6-laurent.pinchart@ideasonboard.com>\n\t<171699204993.191612.11177799611670231369@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171699204993.191612.11177799611670231369@ping.linuxembedded.co.uk>","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>"}}]