From patchwork Thu Apr 7 08:37:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15648 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 62E9EC3260 for ; Thu, 7 Apr 2022 08:37:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E5B7665645; Thu, 7 Apr 2022 10:37:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649320649; bh=ffILHcbRXXpA/Ufu8UVGlvdxDF8uUqT+FvqKKdKFFYo=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=qmOR68TjwHTn9ofe7CAC2gIeKFCu7mxqbq4gcjAKt6wIRnNyYeTTRIrtH5onVyPVM VF9V+VKNGi19uGZ1OXYGl71buWeS4+5QzBuit2IpiAMy0zVPJxMjauS85+MwR3mWPM c8JlsRDvt0JP4+wWT+p2o2Gbl6nCEvIjIuUWLudRpU6xYnDVcnONbJgyT+HxloiF8T WvuIWww14fN+e903ZwzahfJ61hfVVOqoVgrj2Er6VTwugKCCnEtL4H0ONpBvTDbL1g BxDI2AJ/CnK56KHkSozmsJ8G9xAQAZ5SSY/V+05mtWATz/VQhPsJRt8nH0jEmN8rhE 9FE+gMUHz2vFQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A1E8F61FBB for ; Thu, 7 Apr 2022 10:37:26 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UAU4hQQR"; dkim-atps=neutral Received: from localhost.localdomain (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 562D2499 for ; Thu, 7 Apr 2022 10:37:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649320646; bh=ffILHcbRXXpA/Ufu8UVGlvdxDF8uUqT+FvqKKdKFFYo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UAU4hQQRmLvG8tt0R14swPHjswJHBoPgwWBgO9+8Ihiv4qNItSMdz7SPUAz2mFjXG 9eMfM6vKAn4qOF6nFEx1Wr0xqXIRMT4y67ThgtmEnrVP2JyvyU5BnNAQin50nnahBQ RL5XOS5PQCUN2EI2wWIITkNao+NYJHkhDuECb2NI= To: libcamera-devel@lists.libcamera.org Date: Thu, 7 Apr 2022 11:37:18 +0300 Message-Id: <20220407083719.21631-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407083719.21631-1-laurent.pinchart@ideasonboard.com> References: <20220407083719.21631-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] test: v4l2_videodevice: dequeue_watchdog: Check return value of streamOn X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" If the streamOn() call fails, there is no way the test will then succeed. Catch it and return a failure. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- test/v4l2_videodevice/dequeue_watchdog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp index 2282e3958c03..320d14c8e442 100644 --- a/test/v4l2_videodevice/dequeue_watchdog.cpp +++ b/test/v4l2_videodevice/dequeue_watchdog.cpp @@ -50,7 +50,11 @@ protected: } } - capture_->streamOn(); + ret = capture_->streamOn(); + if (ret < 0) { + std::cout << "Failed to start streaming" << std::endl; + return TestFail; + } timeout.start(5s); while (timeout.isRunning()) {