From patchwork Mon Oct 3 19:07:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17508 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 5C65EBD16B for ; Mon, 3 Oct 2022 19:07:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 170BB601CC; Mon, 3 Oct 2022 21:07:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664824034; bh=TXo14gQcgUcTpEPRDEYAh+LzXKS8k4ffaBrsnA1fkDg=; 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=a0N6/IZ4D6vPKmRMmEEeNcVSG6Xh6xAFL6ldwNgD6JeDKFBqsLK69/sByJEmZnv6L 7p9ZmRFMfqcLeW9OoftBnPsFw7FNk1hoYDUNOTrhyi7SWeMrerBwzG5Ihl/0pEqhBO bVIhYQ9rDI2ZNNqIPuixzIV2nISy1U6oi7wYYiiVRu+yv6hogjfWiydXk5j7zIZvvE xFjQjtyz1zeeGiBK0DK6Km5wj2Gwx1Jt3MKfHdErCbBi/K0hdgMTkonK4odQYP9dw7 o8x6etBqMdc/FmnhIeVTJkqC5cAoOhGTNekVVcS/QcX0gpAAthYHAnGtdK+BsES8gE FHb0VP6u+sJRg== 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 CB87E601C8 for ; Mon, 3 Oct 2022 21:07:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VYCdKh74"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 45CB5519; Mon, 3 Oct 2022 21:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664824030; bh=TXo14gQcgUcTpEPRDEYAh+LzXKS8k4ffaBrsnA1fkDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYCdKh74SXgGdCOtCxKHaKBv3+XZrbzvBqdOgNZduhai97/tufghjtBaDQnFRALK5 gu6RosebsBqkrOKShDUr+gvIFLR8R/L9Id8iJysnDRWKyl1khka5J0h2agnw3Iywc5 vsQT/RujgYQm7z/RBcVacRGaUtTAPoAtc+AO+qPc= To: libcamera-devel@lists.libcamera.org Date: Mon, 3 Oct 2022 22:07:05 +0300 Message-Id: <20221003190706.19816-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221003190706.19816-1-laurent.pinchart@ideasonboard.com> References: <20221003190706.19816-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] test: v4l2_m2mdevice: Test control enumeration 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" Verify that the V4L2M2MDevice correctly enumerates controls supported by the device. The test currently fails, and will be fixed by a subsequent patch. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Xavier Roumegue --- test/v4l2_videodevice/v4l2_m2mdevice.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/v4l2_videodevice/v4l2_m2mdevice.cpp b/test/v4l2_videodevice/v4l2_m2mdevice.cpp index 852b853fa81a..c45f581a8653 100644 --- a/test/v4l2_videodevice/v4l2_m2mdevice.cpp +++ b/test/v4l2_videodevice/v4l2_m2mdevice.cpp @@ -95,6 +95,11 @@ protected: V4L2VideoDevice *capture = vim2m_->capture(); V4L2VideoDevice *output = vim2m_->output(); + if (capture->controls().empty() || output->controls().empty()) { + cerr << "VIM2M device has no control" << endl; + return TestFail; + } + V4L2DeviceFormat format = {}; if (capture->getFormat(&format)) { cerr << "Failed to get capture format" << endl;