From patchwork Thu Aug 8 00:04:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 1748 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 792E561623 for ; Thu, 8 Aug 2019 02:04:11 +0200 (CEST) X-Halon-ID: 07b99d47-b970-11e9-bdc3-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [145.14.112.32]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 07b99d47-b970-11e9-bdc3-005056917a89; Thu, 08 Aug 2019 02:04:03 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Aug 2019 02:04:04 +0200 Message-Id: <20190808000404.10841-5-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190808000404.10841-1-niklas.soderlund@ragnatech.se> References: <20190808000404.10841-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 4/4] tests: camera-sensor: Test using invalid media bus format X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2019 00:04:12 -0000 Linux commit b6c61a6c37317efd ("media: vimc: propagate pixel format in the stream") changes the sensor in the vimc media graph to accept all media bus format currently described in Linux. This prevents the camera-sensor test case to verify that a supported media bus format is selected from a list of defined formats, fix this by using an invalid media bus format in the test case. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- test/camera-sensor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp index 092cbdd8111ce70d..9fe59cc98d79ccab 100644 --- a/test/camera-sensor.cpp +++ b/test/camera-sensor.cpp @@ -83,7 +83,8 @@ protected: return TestFail; } - V4L2SubdeviceFormat format = sensor_->getFormat({ MEDIA_BUS_FMT_UYVY8_2X8, + /* Use an invalid format and make sure it's not selected. */ + V4L2SubdeviceFormat format = sensor_->getFormat({ 0xdeadbeef, MEDIA_BUS_FMT_SBGGR10_1X10, MEDIA_BUS_FMT_BGR888_1X24 }, Size(1024, 768));