[{"id":2634,"web_url":"https://patchwork.libcamera.org/comment/2634/","msgid":"<20190910094505.GE4799@pendragon.ideasonboard.com>","date":"2019-09-10T09:45:05","subject":"Re: [libcamera-devel] [PATCH 3/3] test: process: Extend timeout\n\tduration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Tue, Sep 10, 2019 at 10:04:18AM +0100, Kieran Bingham wrote:\n> The process test runs for just 100mS. The spawned process runs for at\n> least 50mS. Ordinarily this should allow plenty of time for both the\n> process to be spawned and run, but when adding extra debug\n> instrumentation, the processes can be slowed down, leading to a false\n> negative test failure.\n> \n> Extend the timeout to 2 seconds to allow the short process to be run\n> correctly - but use the now initialised exitStatus_ to exit the event\n> loop as soon as the process has completed.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  test/process/process_test.cpp | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index f3cabe0a36c7..7e7b3c2c8bf3 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -56,8 +56,8 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\ttimeout.start(100);\n> -\t\twhile (timeout.isRunning())\n> +\t\ttimeout.start(2000);\n> +\t\twhile (timeout.isRunning() && exitStatus_ == Process::NotExited)\n>  \t\t\tdispatcher->processEvents();\n>  \n>  \t\tif (exitStatus_ != Process::NormalExit) {","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 01B5C60BCF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Sep 2019 11:45:12 +0200 (CEST)","from pendragon.ideasonboard.com (unknown [148.69.85.38])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 98F402F9;\n\tTue, 10 Sep 2019 11:45:11 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1568108711;\n\tbh=xhmEYItp684I5yHVQ9LKa3ZQZ5vLKXSXYE+6jlOhXQU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=HZZiFMYlW7fBR3G7Y16I6dN2ecDNHLGhcX5jZWy/V5zhMiuXEEk8tOtlCo+MqOtRy\n\t9s2/R3pZIW4bmU3IXQD2Cb2IeLDeYW2JICe+3cUGzqdwIdFFFpKh95lz/UUzcnj7b+\n\tsJrnfgaOP7FsZlJLxS6qnfjLZ/FzifxmdMDb2E0c=","Date":"Tue, 10 Sep 2019 12:45:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190910094505.GE4799@pendragon.ideasonboard.com>","References":"<20190910090418.30502-1-kieran.bingham@ideasonboard.com>\n\t<20190910090418.30502-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190910090418.30502-4-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 3/3] test: process: Extend timeout\n\tduration","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Tue, 10 Sep 2019 09:45:12 -0000"}}]