[{"id":29660,"web_url":"https://patchwork.libcamera.org/comment/29660/","msgid":"<171699187926.191612.8125649776543560054@ping.linuxembedded.co.uk>","date":"2024-05-29T14:11:19","subject":"Re: [PATCH v1 4/6] test: fence: Increase timeout for fence test","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:22)\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.\n> \n> By itself, that change could increase the test time quite substantially\n> on fast platforms, so break from the capture loop as soon as we capture\n> enough frames.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  test/fence.cpp | 5 +++--\n>  1 file changed, 3 insertions(+), 2 deletions(-)\n> \n> diff --git a/test/fence.cpp b/test/fence.cpp\n> index 7949bfbb176b..4ce6dfa23590 100644\n> --- a/test/fence.cpp\n> +++ b/test/fence.cpp\n> @@ -315,8 +315,9 @@ int FenceTest::run()\n>  \n>         /* Loop for one second. */\n\nWe're no longer looping for one second ?\n\n>         Timer timer;\n> -       timer.start(1000ms);\n> -       while (timer.isRunning() && expectedCompletionResult_) {\n> +       timer.start(500ms * (signalledRequestId_ + 1));\n\nSo that's where the * 2 is now coming in? Maybe 'signalledRequestId_'\njust isn't named well...\n\n> +       while (timer.isRunning() && expectedCompletionResult_ &&\n> +              completedRequestId_ <= signalledRequestId_ + 1) {\n>                 if (completedRequestId_ == signalledRequestId_ - 1 && setFence_)\n>                         /*\n>                          * signalledRequestId_ has just completed and it has\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 88AE3BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 May 2024 14:11:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A790E634AF;\n\tWed, 29 May 2024 16:11:23 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D7273634AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 May 2024 16:11:21 +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 314B4A27;\n\tWed, 29 May 2024 16:11:18 +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=\"CurEHtRO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1716991878;\n\tbh=OujbBWJo1AOWNMJ1KcbBqvIAC4pu8nbkvMWX1cIxrho=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=CurEHtROmblndBKS4cD/beEStS5w6nbNMFgrdvWvqLnDQtpxbXXpMWk9gxsEJ+AeY\n\tmS0Zyw8HbAlB4fx2/bA0w0gGd3gdS7vdY8x9M6ymt3+Y6qoY2cYM5dpLzxpTXj7GdO\n\tSbEgoPLvOE9fwo5sVHlLanFTkPbKXXacTbYTk2v0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240424234224.9658-5-laurent.pinchart@ideasonboard.com>","References":"<20240424234224.9658-1-laurent.pinchart@ideasonboard.com>\n\t<20240424234224.9658-5-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v1 4/6] test: fence: Increase timeout for fence test","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:11:19 +0100","Message-ID":"<171699187926.191612.8125649776543560054@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":29665,"web_url":"https://patchwork.libcamera.org/comment/29665/","msgid":"<20240529152230.GR1436@pendragon.ideasonboard.com>","date":"2024-05-29T15:22:30","subject":"Re: [PATCH v1 4/6] test: fence: Increase timeout for fence test","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:11:19PM +0100, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2024-04-25 00:42:22)\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.\n> > \n> > By itself, that change could increase the test time quite substantially\n> > on fast platforms, so break from the capture loop as soon as we capture\n> > enough frames.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  test/fence.cpp | 5 +++--\n> >  1 file changed, 3 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/test/fence.cpp b/test/fence.cpp\n> > index 7949bfbb176b..4ce6dfa23590 100644\n> > --- a/test/fence.cpp\n> > +++ b/test/fence.cpp\n> > @@ -315,8 +315,9 @@ int FenceTest::run()\n> >  \n> >         /* Loop for one second. */\n> \n> We're no longer looping for one second ?\n\nYou're right, I'll update this.\n\n> >         Timer timer;\n> > -       timer.start(1000ms);\n> > -       while (timer.isRunning() && expectedCompletionResult_) {\n> > +       timer.start(500ms * (signalledRequestId_ + 1));\n> \n> So that's where the * 2 is now coming in? Maybe 'signalledRequestId_'\n> just isn't named well...\n\nsignalledRequestId_ is the last request that we need to test. The\ntimeout allows 500ms per request. This has nothing to do with the * 2.\n\n> > +       while (timer.isRunning() && expectedCompletionResult_ &&\n> > +              completedRequestId_ <= signalledRequestId_ + 1) {\n> >                 if (completedRequestId_ == signalledRequestId_ - 1 && setFence_)\n> >                         /*\n> >                          * signalledRequestId_ has just completed and it has","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 AE743BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 29 May 2024 15:22:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B992F634B6;\n\tWed, 29 May 2024 17:22:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2DFAA6347E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 29 May 2024 17:22:42 +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 48F95149B;\n\tWed, 29 May 2024 17:22:38 +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=\"RxT7ZZFd\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1716996158;\n\tbh=eLKNFcLO1B1+LhUGNWyWUKCVNu8Zw1E9KakMVlfw+iU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RxT7ZZFd9IXHDGsDZiPUBREObsqozNoF8FNZ8V2xjZQ/uYn9rzY1igiaKsGtTV2/c\n\tExtxzc3dF49tWa+lZ+CskqBc9ZsH3Sb6Bnvewd358ZYztLPJShOM8lCwSJ+IXKEM1m\n\tK5mxMKXncxViwWWu8RXV+HezZVH+gGv5nHQnTkYc=","Date":"Wed, 29 May 2024 18:22:30 +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 4/6] test: fence: Increase timeout for fence test","Message-ID":"<20240529152230.GR1436@pendragon.ideasonboard.com>","References":"<20240424234224.9658-1-laurent.pinchart@ideasonboard.com>\n\t<20240424234224.9658-5-laurent.pinchart@ideasonboard.com>\n\t<171699187926.191612.8125649776543560054@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171699187926.191612.8125649776543560054@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>"}}]