From patchwork Thu Apr 7 08:37:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 15647 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 D6449C0F1B for ; Thu, 7 Apr 2022 08:37:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 721AD6563E; 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=fi/9yKryU+uYgr2qXqKJWw9UtagfjacSp2NxJOxQgpA=; 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=ixD63K+ES3lOLFbb2/zn6Oj73WwBhOg+cSk1WToyMq5fp09L4bGnDHdMzDhzpLF+k SbBsX+plQfsmxBOkQjX+czTh0Epa1gVtTdPY1FNVqPf2S8YdVV86pcRxCatKn5xOkb oZxy6VKh9xKj/VNjhIuFjOmgEtCGMEUlqOqUZIy3/JeAx2Y4zcdgg3TB3RWVRvJ2Iy FfCJb/C7lytdGPr1QB6QkiK0m+oEMvDVqRpvPnGh0y8wgV8tsw0cPbnXrjxi+AwV5D CLi4+kl9XR9zGYkpR4ELvHivaWaNKvMfqirNwe/uvO2b/0BObQy/oXR7NXHWO4tlWf AsdlJh3wPUk8Q== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7A7E06563E 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="YiMoM+G2"; 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 1BAA2883 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=fi/9yKryU+uYgr2qXqKJWw9UtagfjacSp2NxJOxQgpA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YiMoM+G2B+FK5f62YbxiidfkTNADN5RboFXtXwXo5D8JRcA2rCIm1YZnbWQwsXbXk a3lAE+d04/BWL87eudg8J8Pw9OXtOt8/fusEA4JMFRX/9ctpBxU/geuRuDZsEsOlYv bzephUlpzmt3IGV2WptFfJmVQr0c6ygE/oBTZTlE= To: libcamera-devel@lists.libcamera.org Date: Thu, 7 Apr 2022 11:37:17 +0300 Message-Id: <20220407083719.21631-2-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 1/3] test: v4l2_videodevice: dequeue_watchdog: Log message on failures 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" Failing a test without an error message makes it difficult to debug issues. Add a message when buffer allocation fails. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder --- test/v4l2_videodevice/dequeue_watchdog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/v4l2_videodevice/dequeue_watchdog.cpp b/test/v4l2_videodevice/dequeue_watchdog.cpp index 0cb4de6f81a0..2282e3958c03 100644 --- a/test/v4l2_videodevice/dequeue_watchdog.cpp +++ b/test/v4l2_videodevice/dequeue_watchdog.cpp @@ -33,8 +33,10 @@ protected: Timer timeout; int ret = capture_->allocateBuffers(bufferCount, &buffers_); - if (ret < 0) + if (ret < 0) { + std::cout << "Failed to allocate buffers" << std::endl; return TestFail; + } capture_->dequeueTimeout.connect(this, &DequeueWatchdogTest::barkCounter); capture_->setDequeueTimeout(5ms);