[{"id":22643,"web_url":"https://patchwork.libcamera.org/comment/22643/","msgid":"<20220407111608.GJ3237525@pyrite.rasen.tech>","date":"2022-04-07T11:16:08","subject":"Re: [libcamera-devel] [PATCH 2/3] test: v4l2_videodevice:\n\tdequeue_watchdog: Check return value of streamOn","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nOn Thu, Apr 07, 2022 at 11:37:18AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> If the streamOn() call fails, there is no way the test will then\n> succeed. Catch it and return a failure.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  test/v4l2_videodevice/dequeue_watchdog.cpp | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp\n> index 2282e3958c03..320d14c8e442 100644\n> --- a/test/v4l2_videodevice/dequeue_watchdog.cpp\n> +++ b/test/v4l2_videodevice/dequeue_watchdog.cpp\n> @@ -50,7 +50,11 @@ protected:\n>  \t\t\t}\n>  \t\t}\n>  \n> -\t\tcapture_->streamOn();\n> +\t\tret = capture_->streamOn();\n> +\t\tif (ret < 0) {\n> +\t\t\tstd::cout << \"Failed to start streaming\" << std::endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n>  \n>  \t\ttimeout.start(5s);\n>  \t\twhile (timeout.isRunning()) {","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 B9C03C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  7 Apr 2022 11:16:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 70DE665642;\n\tThu,  7 Apr 2022 13:16:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DBA9B6563F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  7 Apr 2022 13:16:15 +0200 (CEST)","from pyrite.rasen.tech (softbank036240056250.bbtec.net\n\t[36.240.56.250])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 64C74499;\n\tThu,  7 Apr 2022 13:16:14 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649330176;\n\tbh=pFxk9FhrP/DwsFnJd2waPA2EyzU+mfiWusSoXtczoM8=;\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:Cc:\n\tFrom;\n\tb=30ao2VBhxCrTfr/XtrJdzx+RUwGJN1PNfGMgDLs5HfcLg5THUm905eeDwChRpysTf\n\tJZ+VyqaA8KVJF2S428EcH1hFooeVV8ssWZPs9aDbfFMbvHmPxrhJOrX2RX1Y9ebWNe\n\tsfIKmF/qVqhB+kBS7tnoeYpqRTwuArFqjckUqws4hqPODRksZtMuLV6nqbs3Djzn1u\n\tdsrYZ9oCWJJAwXZJvEFL1gfcEOPCXLTbm5VFVLqNXFFBjFsPw2ZJiXazDrKC56iA9k\n\t9votzUrR84WQf3ynnZ682CWB55zfnLbwwPkRvrtrc3sKXTXvU/Z4cGTT0CXRwLzuEr\n\t3aW8o8Ykx5Q/Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649330175;\n\tbh=pFxk9FhrP/DwsFnJd2waPA2EyzU+mfiWusSoXtczoM8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=p8Q4Mx/k5glgZJRrjPgmQyFSBTbO95DEUZx2+IUrKIqlxdKU7b/vY4SdYO0RspG4V\n\tWiGB/BU+8FCZklkXhe/oCeCgZ9RUh+hGxFcTkCQcIO6z6K0WzU/9SJZYBYT0FDCfpv\n\tROJgp8M19xma7GjtfKSHBfHTOV5OabfajC8BPxSg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"p8Q4Mx/k\"; dkim-atps=neutral","Date":"Thu, 7 Apr 2022 20:16:08 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220407111608.GJ3237525@pyrite.rasen.tech>","References":"<20220407083719.21631-1-laurent.pinchart@ideasonboard.com>\n\t<20220407083719.21631-3-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220407083719.21631-3-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/3] test: v4l2_videodevice:\n\tdequeue_watchdog: Check return value of streamOn","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]