Show a patch.

GET /api/1.1/patches/1171/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1171,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1171/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1171/",
    "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": "<20190508151831.12274-7-niklas.soderlund@ragnatech.se>",
    "date": "2019-05-08T15:18:26",
    "name": "[libcamera-devel,v2,06/11] test: media_device: Add test for acquire() and release()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "abeaca7303f09e7c42e08d115b3d13e2a24b8c8f",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1171/mbox/",
    "series": [
        {
            "id": 300,
            "url": "https://patchwork.libcamera.org/api/1.1/series/300/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=300",
            "date": "2019-05-08T15:18:20",
            "name": "libcamerea: Add support for exclusive access to cameras between processes",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/300/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1171/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1171/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<niklas.soderlund@ragnatech.se>",
        "Received": [
            "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E09260E77\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 May 2019 17:18:53 +0200 (CEST)",
            "from localhost.localdomain (unknown [79.138.136.66])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 95d467eb-71a4-11e9-8fa2-005056917a89;\n\tWed, 08 May 2019 17:18:51 +0200 (CEST)"
        ],
        "X-Halon-ID": "95d467eb-71a4-11e9-8fa2-005056917a89",
        "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": "Wed,  8 May 2019 17:18:26 +0200",
        "Message-Id": "<20190508151831.12274-7-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190508151831.12274-1-niklas.soderlund@ragnatech.se>",
        "References": "<20190508151831.12274-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 06/11] test: media_device: Add test for\n\tacquire() and release()",
        "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, 08 May 2019 15:18:53 -0000"
    },
    "content": "The interfaces MediaDevice::{open,close}() are about to be made private,\nreplace them with a test of MediaDevice::{acquire,release}() instead.\nThe new test will implicitly tests the open() and close() methods as\nthey are about to be move inside acquire() and release() which will\nremain public.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n test/media_device/media_device_basic.cpp      | 41 +++++++++++++++++++\n test/media_device/media_device_print_test.cpp | 11 -----\n test/media_device/meson.build                 |  1 +\n 3 files changed, 42 insertions(+), 11 deletions(-)\n create mode 100644 test/media_device/media_device_basic.cpp",
    "diff": "diff --git a/test/media_device/media_device_basic.cpp b/test/media_device/media_device_basic.cpp\nnew file mode 100644\nindex 0000000000000000..ba95dd0578fce22d\n--- /dev/null\n+++ b/test/media_device/media_device_basic.cpp\n@@ -0,0 +1,41 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * media_device_basic.cpp - Test basic functions of MediaDevice\n+ */\n+\n+#include \"media_device_test.h\"\n+\n+using namespace libcamera;\n+\n+class MediaDeviceBasic : public MediaDeviceTest\n+{\n+\tint testAcquire()\n+\t{\n+\t\tif (!media_->acquire())\n+\t\t\treturn TestFail;\n+\n+\t\tif (media_->acquire())\n+\t\t\treturn TestFail;\n+\n+\t\tmedia_->release();\n+\n+\t\tif (!media_->acquire())\n+\t\t\treturn TestFail;\n+\n+\t\tmedia_->release();\n+\n+\t\treturn TestPass;\n+\t}\n+\n+\tint run()\n+\t{\n+\t\tif (testAcquire() != TestPass)\n+\t\t\treturn TestFail;\n+\n+\t\treturn TestPass;\n+\t}\n+};\n+\n+TEST_REGISTER(MediaDeviceBasic);\ndiff --git a/test/media_device/media_device_print_test.cpp b/test/media_device/media_device_print_test.cpp\nindex ceffd538e13fca73..30d929b8c76387a7 100644\n--- a/test/media_device/media_device_print_test.cpp\n+++ b/test/media_device/media_device_print_test.cpp\n@@ -113,17 +113,6 @@ int MediaDevicePrintTest::testMediaDevice(const string deviceNode)\n \tMediaDevice dev(deviceNode);\n \tint ret;\n \n-\t/* Fuzzy open/close sequence. */\n-\tret = dev.open();\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tret = dev.open();\n-\tif (!ret)\n-\t\treturn ret;\n-\n-\tdev.close();\n-\n \tret = dev.populate();\n \tif (ret)\n \t\treturn ret;\ndiff --git a/test/media_device/meson.build b/test/media_device/meson.build\nindex 1005685409d99aa7..7a3266187abd806f 100644\n--- a/test/media_device/meson.build\n+++ b/test/media_device/meson.build\n@@ -1,4 +1,5 @@\n media_device_tests = [\n+    ['media_device_basic',              'media_device_basic.cpp'],\n     ['media_device_print_test',         'media_device_print_test.cpp'],\n     ['media_device_link_test',          'media_device_link_test.cpp'],\n ]\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "06/11"
    ]
}