{"id":522,"url":"https://patchwork.libcamera.org/api/patches/522/?format=json","web_url":"https://patchwork.libcamera.org/patch/522/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190206060818.13907-8-laurent.pinchart@ideasonboard.com>","date":"2019-02-06T06:07:58","name":"[libcamera-devel,07/27] test: v4l2_device: Add StreamOn/StreamOff test","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"b8304e7bcaf11cb6d395123b87434d49fb720986","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/522/mbox/","series":[{"id":170,"url":"https://patchwork.libcamera.org/api/series/170/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=170","date":"2019-02-06T06:07:51","name":"Capture frames throught requests","version":1,"mbox":"https://patchwork.libcamera.org/series/170/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/522/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/522/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 093FD61022\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:25 +0100 (CET)","from pendragon.ideasonboard.com (d51A4137F.access.telenet.be\n\t[81.164.19.127])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A6A0041\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Feb 2019 07:08:24 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1549433304;\n\tbh=OdxFgULqG4rAk37WjRsRqA7aiL0f50Ylmft6C1HX01Y=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=j8N+JwroefUHT9IS8uODtKyFAxEoSZ+SjMAb66Qcn6g3TYx2eUkZ9gaoR5bUL6FOu\n\t78DTakPmz7XDJ+4AzYZwmUHnTxRH8IDbKImYBXZYx+RI1lmcU0xx9tnzN5espkfnln\n\taEJf0ablxIbML0RUPxiRct+4Gwhf2tSNTG/Ym8mw=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  6 Feb 2019 08:07:58 +0200","Message-Id":"<20190206060818.13907-8-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.19.2","In-Reply-To":"<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>","References":"<20190206060818.13907-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 07/27] test: v4l2_device: Add\n\tStreamOn/StreamOff test","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Wed, 06 Feb 2019 06:08:26 -0000"},"content":"From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nProvide a small test to exercise the streamOn() and streamOff() calls.\n8 buffers are requested locally.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n test/v4l2_device/meson.build       |  1 +\n test/v4l2_device/stream_on_off.cpp | 35 ++++++++++++++++++++++++++++++\n 2 files changed, 36 insertions(+)\n create mode 100644 test/v4l2_device/stream_on_off.cpp","diff":"diff --git a/test/v4l2_device/meson.build b/test/v4l2_device/meson.build\nindex b6b672611d60..cbaa79da9b81 100644\n--- a/test/v4l2_device/meson.build\n+++ b/test/v4l2_device/meson.build\n@@ -3,6 +3,7 @@\n v4l2_device_tests = [\n   [ 'double_open',        'double_open.cpp' ],\n   [ 'request_buffers',    'request_buffers.cpp' ],\n+  [ 'stream_on_off',      'stream_on_off.cpp' ],\n ]\n \n foreach t : v4l2_device_tests\ndiff --git a/test/v4l2_device/stream_on_off.cpp b/test/v4l2_device/stream_on_off.cpp\nnew file mode 100644\nindex 000000000000..b564d2a2ab67\n--- /dev/null\n+++ b/test/v4l2_device/stream_on_off.cpp\n@@ -0,0 +1,35 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * libcamera V4L2 API tests\n+ */\n+\n+#include \"v4l2_device_test.h\"\n+\n+class StreamOnStreamOffTest : public V4L2DeviceTest\n+{\n+protected:\n+\tint run()\n+\t{\n+\t\tconst unsigned int bufferCount = 8;\n+\n+\t\tcreateBuffers(bufferCount);\n+\n+\t\tint ret = dev_->exportBuffers(bufferCount, &pool_);\n+\t\tif (ret)\n+\t\t\treturn TestFail;\n+\n+\t\tret = dev_->streamOn();\n+\t\tif (ret)\n+\t\t\treturn TestFail;\n+\n+\t\tret = dev_->streamOff();\n+\t\tif (ret)\n+\t\t\treturn TestFail;\n+\n+\t\treturn TestPass;\n+\t}\n+};\n+\n+TEST_REGISTER(StreamOnStreamOffTest);\n","prefixes":["libcamera-devel","07/27"]}