Show a patch.

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

{
    "id": 1420,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1420/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1420/",
    "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": "<20190612231505.25311-1-paul.elder@ideasonboard.com>",
    "date": "2019-06-12T23:15:05",
    "name": "[libcamera-devel] tests: Add unset IPA environment variable test",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": false,
    "hash": "7606874f75abcc0ed6e9c5cc520f68fe639b1d8c",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/1.1/users/17/?format=api",
        "username": "epaul",
        "first_name": "Paul",
        "last_name": "Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/1420/mbox/",
    "series": [
        {
            "id": 355,
            "url": "https://patchwork.libcamera.org/api/1.1/series/355/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=355",
            "date": "2019-06-12T23:15:05",
            "name": "[libcamera-devel] tests: Add unset IPA environment variable test",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/355/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1420/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1420/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<paul.elder@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 8CCFD63402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2019 01:15:19 +0200 (CEST)",
            "from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B6C1852C;\n\tThu, 13 Jun 2019 01:15:18 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1560381319;\n\tbh=yWYVpoNK5A1U+oZc3vfd626L2UhBjyp1ULiT6HSGIMA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=iOdU08ROJaUv2D2NUOWGaPXvsNNouqcpsE/VBI6vLpmEaZc8Eap5DUHyasUaSEWUz\n\toIkkT9DI8TH++WV/48YcVD/0Xf27vwJ7CjtxHeDcVYJrde6ezqMPoM/E/puzt2DBU9\n\tkUyswcazNIRCYxwffiSElKz0NvlSCHUR09JRO7sk=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 12 Jun 2019 19:15:05 -0400",
        "Message-Id": "<20190612231505.25311-1-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] tests: Add unset IPA environment variable\n\ttest",
        "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, 12 Jun 2019 23:15:19 -0000"
    },
    "content": "There once was a crash  that was caused by an unset\nLIBCAMERA_IPA_MODULE_PATH environment variable. (Fixed as of\n\"libcamera: ipa_manager: Fix handling of unset\nLIBCAMERA_IPA_MODULE_PATH\")\n\nAll tests have this environment variable set, which is why this error\nwasn't caught for a while. Add a test (that is essentially the same as\nlist-cameras) that unsets this environment variable.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n test/ipa/ipa_env_var_test.cpp | 56 +++++++++++++++++++++++++++++++++++\n test/ipa/meson.build          |  1 +\n 2 files changed, 57 insertions(+)\n create mode 100644 test/ipa/ipa_env_var_test.cpp",
    "diff": "diff --git a/test/ipa/ipa_env_var_test.cpp b/test/ipa/ipa_env_var_test.cpp\nnew file mode 100644\nindex 0000000..a221cd9\n--- /dev/null\n+++ b/test/ipa/ipa_env_var_test.cpp\n@@ -0,0 +1,56 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * ipa_env_var_test.cpp - IPA environment variable test\n+ */\n+\n+#include <iostream>\n+\n+#include <libcamera/camera.h>\n+#include <libcamera/camera_manager.h>\n+\n+#include \"test.h\"\n+\n+using namespace std;\n+using namespace libcamera;\n+\n+class IPAEnvVarTest : public Test\n+{\n+protected:\n+\tint init()\n+\t{\n+\t\tif (unsetenv(\"LIBCAMERA_IPA_MODULE_PATH\")) {\n+\t\t\tcerr << \"failed to unset LIBCAMERA_IPA_MODULE_PATH\"\n+\t\t\t     << endl;\n+\t\t\treturn TestSkip;\n+\t\t}\n+\n+\t\tcm = CameraManager::instance();\n+\t\tcm->start();\n+\n+\t\treturn TestPass;\n+\t}\n+\n+\tint run()\n+\t{\n+\t\tunsigned int count = 0;\n+\n+\t\tfor (const std::shared_ptr<Camera> &camera : cm->cameras()) {\n+\t\t\tcout << \"- \" << camera->name() << endl;\n+\t\t\tcount++;\n+\t\t}\n+\n+\t\treturn count ? 0 : -ENODEV;\n+\t}\n+\n+\tvoid cleanup()\n+\t{\n+\t\tcm->stop();\n+\t}\n+\n+private:\n+\tCameraManager *cm;\n+};\n+\n+TEST_REGISTER(IPAEnvVarTest)\ndiff --git a/test/ipa/meson.build b/test/ipa/meson.build\nindex bca39fa..7bc86fb 100644\n--- a/test/ipa/meson.build\n+++ b/test/ipa/meson.build\n@@ -1,5 +1,6 @@\n ipa_test = [\n     ['ipa_test', 'ipa_test.cpp'],\n+    ['ipa_env_var_test', 'ipa_env_var_test.cpp'],\n ]\n \n foreach t : ipa_test\n",
    "prefixes": [
        "libcamera-devel"
    ]
}