Patch Detail
Show a patch.
GET /api/patches/1200/?format=api
{ "id": 1200, "url": "https://patchwork.libcamera.org/api/patches/1200/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1200/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20190511111115.16727-4-niklas.soderlund@ragnatech.se>", "date": "2019-05-11T11:11:13", "name": "[libcamera-devel,v2,3/5] test: v4l2_device: Allow each test to specify which device and entity to test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "598fe3f0170c38f27262c95739fe45b4be4201af", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1200/mbox/", "series": [ { "id": 304, "url": "https://patchwork.libcamera.org/api/series/304/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=304", "date": "2019-05-11T11:11:10", "name": "test: v4l2_device: Cleanups and a small speed increase", "version": 2, "mbox": "https://patchwork.libcamera.org/series/304/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1200/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1200/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net\n\t[195.74.38.227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 369BD60E4F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 11 May 2019 13:11:43 +0200 (CEST)", "from localhost.localdomain (unknown [185.224.57.161])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 881011c0-73dd-11e9-81fd-0050569116f7;\n\tSat, 11 May 2019 13:11:33 +0200 (CEST)" ], "X-Halon-ID": "881011c0-73dd-11e9-81fd-0050569116f7", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 11 May 2019 13:11:13 +0200", "Message-Id": "<20190511111115.16727-4-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190511111115.16727-1-niklas.soderlund@ragnatech.se>", "References": "<20190511111115.16727-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 3/5] test: v4l2_device: Allow each test\n\tto specify which device and entity to 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": "Sat, 11 May 2019 11:11:43 -0000" }, "content": "Prepare for different tests which implements V4L2DeviceTest to specify\nwhich media device and entity they wish to test. There is no functional\nchanges, all tests still use vivid to perform there tests.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/v4l2_device/buffer_sharing.cpp | 5 ++---\n test/v4l2_device/capture_async.cpp | 2 +-\n test/v4l2_device/double_open.cpp | 3 +++\n test/v4l2_device/formats.cpp | 3 +++\n test/v4l2_device/request_buffers.cpp | 4 ++++\n test/v4l2_device/stream_on_off.cpp | 3 +++\n test/v4l2_device/v4l2_device_test.cpp | 6 +++---\n test/v4l2_device/v4l2_device_test.h | 6 ++++--\n 8 files changed, 23 insertions(+), 9 deletions(-)", "diff": "diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp\nindex 09695239ee4b9e80..e63ddff856894130 100644\n--- a/test/v4l2_device/buffer_sharing.cpp\n+++ b/test/v4l2_device/buffer_sharing.cpp\n@@ -23,9 +23,8 @@ class BufferSharingTest : public V4L2DeviceTest\n {\n public:\n \tBufferSharingTest()\n-\t\t: output_(nullptr), framesCaptured_(0), framesOutput_(0)\n-\t{\n-\t}\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\"),\n+\t\t output_(nullptr), framesCaptured_(0), framesOutput_(0) {}\n \n protected:\n \tint init()\ndiff --git a/test/v4l2_device/capture_async.cpp b/test/v4l2_device/capture_async.cpp\nindex 2a41b11e95e77dac..fd428ff909f32999 100644\n--- a/test/v4l2_device/capture_async.cpp\n+++ b/test/v4l2_device/capture_async.cpp\n@@ -18,7 +18,7 @@ class CaptureAsyncTest : public V4L2DeviceTest\n {\n public:\n \tCaptureAsyncTest()\n-\t\t: frames(0){};\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\"), frames(0) {}\n \n \tvoid receiveBuffer(Buffer *buffer)\n \t{\ndiff --git a/test/v4l2_device/double_open.cpp b/test/v4l2_device/double_open.cpp\nindex 7ec80a60f57ee036..b402de04fca5ddbb 100644\n--- a/test/v4l2_device/double_open.cpp\n+++ b/test/v4l2_device/double_open.cpp\n@@ -13,6 +13,9 @@ namespace {\n \n class DoubleOpen : public V4L2DeviceTest\n {\n+public:\n+\tDoubleOpen()\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\") {}\n protected:\n \tint run()\n \t{\ndiff --git a/test/v4l2_device/formats.cpp b/test/v4l2_device/formats.cpp\nindex 72676c9d334a69b0..3ac47f5cc665b62b 100644\n--- a/test/v4l2_device/formats.cpp\n+++ b/test/v4l2_device/formats.cpp\n@@ -17,6 +17,9 @@ using namespace libcamera;\n \n class Format : public V4L2DeviceTest\n {\n+public:\n+\tFormat()\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\") {}\n protected:\n \tint run()\n \t{\ndiff --git a/test/v4l2_device/request_buffers.cpp b/test/v4l2_device/request_buffers.cpp\nindex 938d4f85d5a1e711..794b083eb84d8d2e 100644\n--- a/test/v4l2_device/request_buffers.cpp\n+++ b/test/v4l2_device/request_buffers.cpp\n@@ -9,6 +9,10 @@\n \n class RequestBuffersTest : public V4L2DeviceTest\n {\n+public:\n+\tRequestBuffersTest()\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\") {}\n+\n protected:\n \tint run()\n \t{\ndiff --git a/test/v4l2_device/stream_on_off.cpp b/test/v4l2_device/stream_on_off.cpp\nindex ea1b3f5bd5a4cbea..4902d5fd6d58a73d 100644\n--- a/test/v4l2_device/stream_on_off.cpp\n+++ b/test/v4l2_device/stream_on_off.cpp\n@@ -9,6 +9,9 @@\n \n class StreamOnStreamOffTest : public V4L2DeviceTest\n {\n+public:\n+\tStreamOnStreamOffTest()\n+\t\t: V4L2DeviceTest(\"vivid\", \"vivid-000-vid-cap\") {}\n protected:\n \tint run()\n \t{\ndiff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp\nindex 833038d56ea4631d..ee5a8e009bef2a5e 100644\n--- a/test/v4l2_device/v4l2_device_test.cpp\n+++ b/test/v4l2_device/v4l2_device_test.cpp\n@@ -39,14 +39,14 @@ int V4L2DeviceTest::init()\n \t\treturn TestFail;\n \t}\n \n-\tDeviceMatch dm(\"vivid\");\n-\tdm.add(\"vivid-000-vid-cap\");\n+\tDeviceMatch dm(driver_);\n+\tdm.add(entity_);\n \n \tmedia_ = enumerator_->search(dm);\n \tif (!media_)\n \t\treturn TestSkip;\n \n-\tMediaEntity *entity = media_->getEntityByName(\"vivid-000-vid-cap\");\n+\tMediaEntity *entity = media_->getEntityByName(entity_);\n \tif (!entity)\n \t\treturn TestSkip;\n \ndiff --git a/test/v4l2_device/v4l2_device_test.h b/test/v4l2_device/v4l2_device_test.h\nindex c476d3c05e79747a..651c005f4e5485e6 100644\n--- a/test/v4l2_device/v4l2_device_test.h\n+++ b/test/v4l2_device/v4l2_device_test.h\n@@ -22,8 +22,8 @@ using namespace libcamera;\n class V4L2DeviceTest : public Test\n {\n public:\n-\tV4L2DeviceTest()\n-\t\t: capture_(nullptr)\n+\tV4L2DeviceTest(const char *driver, const char *entity)\n+\t\t: driver_(driver), entity_(entity), capture_(nullptr)\n \t{\n \t}\n \n@@ -31,6 +31,8 @@ protected:\n \tint init();\n \tvoid cleanup();\n \n+\tstd::string driver_;\n+\tstd::string entity_;\n \tstd::unique_ptr<DeviceEnumerator> enumerator_;\n \tstd::shared_ptr<MediaDevice> media_;\n \tV4L2Device *capture_;\n", "prefixes": [ "libcamera-devel", "v2", "3/5" ] }