From patchwork Mon Apr 27 03:17:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3562 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8738B60AFB for ; Mon, 27 Apr 2020 05:17:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OIM4nOYA"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C93A98D for ; Mon, 27 Apr 2020 05:17:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1587957456; bh=sputzHIH3iwI3MjFrOYYVXcbfQ+IzAxG9ZlE8SM5WrU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OIM4nOYAPVsJ5DvzdUg0jekQ7/+w79+sKpmce8KjhruUlCienjdEFuatzfyXicXTu qjPbsCBJiyAgyBG5dJQmTB7J0Y8A4xNAqTXgu8l86sP6VMN6HCwaLoxaoRl1CtndhL 1CwJOGnk+AS8/pcX8anNy7k7h55aAagiNRCx8WCA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Apr 2020 06:17:12 +0300 Message-Id: <20200427031713.14013-11-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200427031713.14013-1-laurent.pinchart@ideasonboard.com> References: <20200427031713.14013-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 10/11] test: ipa: ipa_interface: Pass configuration file to IPA init() 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-List-Received-Date: Mon, 27 Apr 2020 03:17:39 -0000 Pass the vimc IPA dummy configuration file to the IPA init() function. This will be used by the IPA to validate the init() call. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- test/ipa/ipa_interface_test.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp index 2e2dfb8d1ebd..7fa88efee089 100644 --- a/test/ipa/ipa_interface_test.cpp +++ b/test/ipa/ipa_interface_test.cpp @@ -98,8 +98,13 @@ protected: } /* Test initialization of IPA module. */ - IPASettings settings; - ipa_->init(settings); + std::string conf = ipa_->configurationFile("vimc.conf"); + int ret = ipa_->init(IPASettings{ conf }); + if (ret < 0) { + cerr << "IPA interface init() failed" << endl; + return TestFail; + } + timer.start(1000); while (timer.isRunning() && trace_ != IPAOperationInit) dispatcher->processEvents(); @@ -155,7 +160,7 @@ private: } std::shared_ptr pipe_; - std::unique_ptr ipa_; + std::unique_ptr ipa_; enum IPAOperationCode trace_; EventNotifier *notifier_; int fd_;