Patch Detail
Show a patch.
GET /api/1.1/patches/1280/?format=api
{ "id": 1280, "url": "https://patchwork.libcamera.org/api/1.1/patches/1280/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1280/", "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": "<20190523164210.2105-5-paul.elder@ideasonboard.com>", "date": "2019-05-23T16:42:09", "name": "[libcamera-devel,RFC,v2,4/5] test: ipa_manager: add test for IPAManager", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d2d2442b977db9e9bb0ecc5e9e10879ebdf9b81f", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1280/mbox/", "series": [ { "id": 324, "url": "https://patchwork.libcamera.org/api/1.1/series/324/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=324", "date": "2019-05-23T16:42:05", "name": "Add IPAManager", "version": 2, "mbox": "https://patchwork.libcamera.org/series/324/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1280/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1280/checks/", "tags": {}, "headers": { "Return-Path": "<paul.elder@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 5602F6187B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 May 2019 18:42:27 +0200 (CEST)", "from localhost.localdomain (unknown [96.44.9.117])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7F6A95A9;\n\tThu, 23 May 2019 18:42:26 +0200 (CEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1558629746;\n\tbh=ZA39u2vMJRmJyNJ/+WvXrdvTuH98X/EM9slz4nuJxAk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=no9M43pkpLFb9fOxaG/4aXxL+75nNKFX/vE9TzYCL40mNZClgIZnzRMw1tSNLoTGR\n\tGKaVJutQK1/EMq4XdDPxEnWd7WiYvVu7GR2F4S4uvkmkvJ7vXvXEREh8GU4HzYW4p/\n\to0ppkMWPnON2bvlZRyCQnTLNHNbrx25l5U9tKVZ8=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 23 May 2019 12:42:09 -0400", "Message-Id": "<20190523164210.2105-5-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20190523164210.2105-1-paul.elder@ideasonboard.com>", "References": "<20190523164210.2105-1-paul.elder@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH v2 4/5] test: ipa_manager: add test\n\tfor IPAManager", "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": "Thu, 23 May 2019 16:42:27 -0000" }, "content": "Add simple test to test IPA module acquiring through IPAManager.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nChanges in v2:\n- release the IPA module after the test\n- also use the new IPAManager singleton instead of instantiation\n\n test/ipa/ipa_manager_test.cpp | 45 +++++++++++++++++++++++++++++++++++\n test/ipa/meson.build | 3 ++-\n 2 files changed, 47 insertions(+), 1 deletion(-)\n create mode 100644 test/ipa/ipa_manager_test.cpp", "diff": "diff --git a/test/ipa/ipa_manager_test.cpp b/test/ipa/ipa_manager_test.cpp\nnew file mode 100644\nindex 0000000..af2e87f\n--- /dev/null\n+++ b/test/ipa/ipa_manager_test.cpp\n@@ -0,0 +1,45 @@\n+/* SPDX-License-Identifier: GPL-2.0-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * load-so.cpp - loading .so tests\n+ */\n+\n+#include <iostream>\n+#include <string.h>\n+\n+#include \"ipa_module.h\"\n+#include \"ipa_manager.h\"\n+\n+#include \"test.h\"\n+\n+using namespace std;\n+using namespace libcamera;\n+\n+class IPAManagerTest : public Test\n+{\n+protected:\n+\tint run() override\n+\t{\n+\t\tIPAManager *ipam = IPAManager::instance();\n+\n+\t\tipam->addDir(\"test/ipa\");\n+\n+\t\tstruct IPAModuleInfo info;\n+\t\tinfo.ipaAPIVersion = 1;\n+\t\tinfo.pipelineVersion = 8999;\n+\t\tstrcpy(info.pipelineName, \"bleep\");\n+\t\tIPAModule *ipa = ipam->acquireIPA(info);\n+\n+\t\tif (!ipa || strcmp(ipa->info().name, \"It's under nine thousand!\")) {\n+\t\t\tcerr << \"failed to acquire IPA\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n+\t\tipa->release();\n+\n+\t\treturn TestPass;\n+\t}\n+};\n+\n+TEST_REGISTER(IPAManagerTest)\ndiff --git a/test/ipa/meson.build b/test/ipa/meson.build\nindex 6df0671..a489ed4 100644\n--- a/test/ipa/meson.build\n+++ b/test/ipa/meson.build\n@@ -9,7 +9,8 @@ foreach m : ipa_modules_sources\n endforeach\n \n ipa_test = [\n- ['ipa_test', 'ipa_test.cpp'],\n+ ['ipa_test', 'ipa_test.cpp'],\n+ ['ipa_manager_test', 'ipa_manager_test.cpp'],\n ]\n \n foreach t : ipa_test\n", "prefixes": [ "libcamera-devel", "RFC", "v2", "4/5" ] }