Patch Detail
Show a patch.
GET /api/1.1/patches/494/?format=api
{ "id": 494, "url": "https://patchwork.libcamera.org/api/1.1/patches/494/?format=api", "web_url": "https://patchwork.libcamera.org/patch/494/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20190203110102.5663-8-kieran.bingham@ideasonboard.com>", "date": "2019-02-03T11:00:58", "name": "[libcamera-devel,07/11] test: v4l2_device: Add StreamOn/StreamOff test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "123ca2f75e4476f8ab46e3439177769ece57537c", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/494/mbox/", "series": [ { "id": 165, "url": "https://patchwork.libcamera.org/api/1.1/series/165/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=165", "date": "2019-02-03T11:00:51", "name": "libcamera: V4L2 Streams", "version": 1, "mbox": "https://patchwork.libcamera.org/series/165/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/494/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/494/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 64C4260DBE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 3 Feb 2019 12:01:08 +0100 (CET)", "from localhost.localdomain\n\t(218.182-78-194.adsl-static.isp.belgacom.be [194.78.182.218])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 10112D4A;\n\tSun, 3 Feb 2019 12:01:08 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1549191668;\n\tbh=h61nRg17APg4PX1uEULMKb1XlohppBJguIjPC9z7EbM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=YCvMKPKcqZnm9ztPcX3fjNUJOLU8PRk8l5KKLqatRx/RlK2u0eMvqz1mUIS2iFWH2\n\tkkmUIACsPNDIObo6z9dkKDDHli+S+AhlJ/f0W/mvonZ90uYWRngjiSj7D7GqlE8aDx\n\tMF27y120wZ/ehFkxLXyQ/fXMJvxJHHULBGQxT5GE=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Date": "Sun, 3 Feb 2019 12:00:58 +0100", "Message-Id": "<20190203110102.5663-8-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.19.1", "In-Reply-To": "<20190203110102.5663-1-kieran.bingham@ideasonboard.com>", "References": "<20190203110102.5663-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 07/11] 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": "Sun, 03 Feb 2019 11:01:10 -0000" }, "content": "Provide 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>\n---\n test/v4l2_device/meson.build | 1 +\n test/v4l2_device/stream_on_off.cpp | 29 +++++++++++++++++++++++++++++\n 2 files changed, 30 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..9f1937b66aae\n--- /dev/null\n+++ b/test/v4l2_device/stream_on_off.cpp\n@@ -0,0 +1,29 @@\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 StreamOnStreamOff : public V4L2DeviceTest\n+{\n+protected:\n+\tint run()\n+\t{\n+\t\tint ret;\n+\n+\t\tBufferPool *pool = dev_->requestBuffers(8);\n+\t\tif (!pool)\n+\t\t\treturn TestFail;\n+\n+\t\tret = dev_->streamOn();\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\n+\t\treturn dev_->streamOff();\n+\t}\n+};\n+\n+TEST_REGISTER(StreamOnStreamOff);\n", "prefixes": [ "libcamera-devel", "07/11" ] }