Patch Detail
Show a patch.
GET /api/1.1/patches/18051/?format=api
{ "id": 18051, "url": "https://patchwork.libcamera.org/api/1.1/patches/18051/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18051/", "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": "<20221222010132.22177-5-laurent.pinchart@ideasonboard.com>", "date": "2022-12-22T01:01:32", "name": "[libcamera-devel,v1,4/4] test: Drop pipeline test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5566e4bf723fb9c99e33c193e8cd86d195d9c2ce", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18051/mbox/", "series": [ { "id": 3686, "url": "https://patchwork.libcamera.org/api/1.1/series/3686/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3686", "date": "2022-12-22T01:01:28", "name": "test: Various unit test cleanups", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3686/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18051/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18051/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B1CA0C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Dec 2022 01:01:48 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7ABAD633B5;\n\tThu, 22 Dec 2022 02:01:48 +0100 (CET)", "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 6036B633AE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Dec 2022 02:01:46 +0100 (CET)", "from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C39C0903\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Dec 2022 02:01:45 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1671670908;\n\tbh=W7OagI3dcESu4HQVZcBjXRmxc1imErCyI26RX/fnR3w=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=bDG6QTAR1FbyUDlirQUZe/Igh1FKDVHBDaLQkPCsgCJooeZdGeQz/CASCiRzoLIkD\n\tpqd5Qd/Mnlzdo8T3cB+HCgCzwdufL+vwH3rEzgK4dfmKXeK8jtClrSTuUiii8fLQdO\n\t05GbBqBWwNlR9QKAdyf1EnaFTlZn0l5pFQWcDRx/td87wtFRNyPIYXtOidO+JUKorc\n\tht9TNdE3qQXYaSXZrex6tfOhiwTagUf6E0xm06xeVTm8/I0ALANf6kj/2rAJQNlFkt\n\tiNPXwjpcJltmKhqJHH96r8bXIsqTYejHK2KQH59ZCcJBL3uFUWJWHxorXy/2TjLr/V\n\tlQI8tWo8LerSg==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1671670906;\n\tbh=W7OagI3dcESu4HQVZcBjXRmxc1imErCyI26RX/fnR3w=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Yg0ZyMAPBgfZVoT0ZsLYOmp3SiOTakB66nELQOcRdOOTyIkdmN7tik8QX6gC80xrY\n\tooAiQ7bjfkIe69uzH64zKGmUFxl/WY0KjTEJJxwnC8KZ8AEmPg/nnyO2ycMbjCm6S5\n\tBe82zEiPbh34nqlG6ww3yG8UhQcSGa/xJw+oa9KQ=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Yg0ZyMAP\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 22 Dec 2022 03:01:32 +0200", "Message-Id": "<20221222010132.22177-5-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.38.2", "In-Reply-To": "<20221222010132.22177-1-laurent.pinchart@ideasonboard.com>", "References": "<20221222010132.22177-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v1 4/4] test: Drop pipeline test", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "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>", "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The two pipeline test (for ipu3 and rkisp1) are meant to perform very\nbasic validation of the corresponding pipeline handlers, limited to\nverifying camera enumeration. They are not unit tests as such, they are\nsuperseded by the lc-compliance tool, and they are never used in\npractice (and always skipped). Drop them.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/meson.build | 1 -\n test/pipeline/ipu3/ipu3_pipeline_test.cpp | 126 ------------------\n test/pipeline/ipu3/meson.build | 14 --\n test/pipeline/meson.build | 4 -\n test/pipeline/rkisp1/meson.build | 14 --\n test/pipeline/rkisp1/rkisp1_pipeline_test.cpp | 115 ----------------\n 6 files changed, 274 deletions(-)\n delete mode 100644 test/pipeline/ipu3/ipu3_pipeline_test.cpp\n delete mode 100644 test/pipeline/ipu3/meson.build\n delete mode 100644 test/pipeline/meson.build\n delete mode 100644 test/pipeline/rkisp1/meson.build\n delete mode 100644 test/pipeline/rkisp1/rkisp1_pipeline_test.cpp", "diff": "diff --git a/test/meson.build b/test/meson.build\nindex 19726f37421d..b227be818419 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -32,7 +32,6 @@ subdir('ipa')\n subdir('ipc')\n subdir('log')\n subdir('media_device')\n-subdir('pipeline')\n subdir('process')\n subdir('py')\n subdir('serialization')\ndiff --git a/test/pipeline/ipu3/ipu3_pipeline_test.cpp b/test/pipeline/ipu3/ipu3_pipeline_test.cpp\ndeleted file mode 100644\nindex 9e647af5fdf8..000000000000\n--- a/test/pipeline/ipu3/ipu3_pipeline_test.cpp\n+++ /dev/null\n@@ -1,126 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipu3_pipeline_test.cpp - Intel IPU3 pipeline test\n- */\n-\n-#include <iostream>\n-#include <sys/stat.h>\n-#include <sys/types.h>\n-#include <unistd.h>\n-\n-#include <libcamera/camera.h>\n-#include <libcamera/camera_manager.h>\n-\n-#include \"libcamera/internal/device_enumerator.h\"\n-#include \"libcamera/internal/media_device.h\"\n-#include \"libcamera/internal/media_object.h\"\n-\n-#include \"test.h\"\n-\n-using namespace std;\n-using namespace libcamera;\n-\n-/*\n- * Verify that the Intel IPU3 pipeline handler gets matched and cameras\n- * are enumerated correctly.\n- *\n- * The test is supposed to be run on an IPU3 platform, otherwise it gets\n- * skipped.\n- *\n- * The test lists all cameras registered in the system, if any camera is\n- * available at all.\n- */\n-class IPU3PipelineTest : public Test\n-{\n-protected:\n-\tint init();\n-\tint run();\n-\tvoid cleanup();\n-\n-private:\n-\tCameraManager *cameraManager_;\n-\tunsigned int sensors_;\n-};\n-\n-int IPU3PipelineTest::init()\n-{\n-\tunique_ptr<DeviceEnumerator> enumerator = DeviceEnumerator::create();\n-\tif (!enumerator) {\n-\t\tcerr << \"Failed to create device enumerator\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tif (enumerator->enumerate()) {\n-\t\tcerr << \"Failed to enumerate media devices\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tDeviceMatch imgu_dm(\"ipu3-imgu\");\n-\tDeviceMatch cio2_dm(\"ipu3-cio2\");\n-\n-\tif (!enumerator->search(imgu_dm)) {\n-\t\tcerr << \"Failed to find IPU3 IMGU: test skip\" << endl;\n-\t\treturn TestSkip;\n-\t}\n-\n-\tstd::shared_ptr<MediaDevice> cio2 = enumerator->search(cio2_dm);\n-\tif (!cio2) {\n-\t\tcerr << \"Failed to find IPU3 CIO2: test skip\" << endl;\n-\t\treturn TestSkip;\n-\t}\n-\n-\t/*\n-\t * Camera sensor are connected to the CIO2 unit.\n-\t * Count how many sensors are connected in the system\n-\t * and later verify this matches the number of registered\n-\t * cameras.\n-\t */\n-\tint ret = cio2->populate();\n-\tif (ret) {\n-\t\tcerr << \"Failed to populate media device \" << cio2->deviceNode() << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tsensors_ = 0;\n-\tconst vector<MediaEntity *> &entities = cio2->entities();\n-\tfor (MediaEntity *entity : entities) {\n-\t\tif (entity->function() == MEDIA_ENT_F_CAM_SENSOR)\n-\t\t\tsensors_++;\n-\t}\n-\n-\tenumerator.reset(nullptr);\n-\n-\tcameraManager_ = new CameraManager();\n-\tret = cameraManager_->start();\n-\tif (ret) {\n-\t\tcerr << \"Failed to start the CameraManager\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-int IPU3PipelineTest::run()\n-{\n-\tauto cameras = cameraManager_->cameras();\n-\tfor (const std::shared_ptr<Camera> &cam : cameras)\n-\t\tcout << \"Found camera '\" << cam->id() << \"'\" << endl;\n-\n-\tif (cameras.size() != sensors_) {\n-\t\tcerr << cameras.size() << \" cameras registered, but \" << sensors_\n-\t\t << \" were expected\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\treturn TestPass;\n-}\n-\n-void IPU3PipelineTest::cleanup()\n-{\n-\tcameraManager_->stop();\n-\tdelete cameraManager_;\n-}\n-\n-TEST_REGISTER(IPU3PipelineTest)\ndiff --git a/test/pipeline/ipu3/meson.build b/test/pipeline/ipu3/meson.build\ndeleted file mode 100644\nindex af075707f505..000000000000\n--- a/test/pipeline/ipu3/meson.build\n+++ /dev/null\n@@ -1,14 +0,0 @@\n-# SPDX-License-Identifier: CC0-1.0\n-\n-ipu3_test = [\n- {'name': 'ipu3_pipeline_test', 'sources': ['ipu3_pipeline_test.cpp']},\n-]\n-\n-foreach test : ipu3_test\n- exe = executable(test['name'], test['sources'],\n- dependencies : libcamera_private,\n- link_with : test_libraries,\n- include_directories : test_includes_internal)\n-\n- test(test['name'], exe, suite : 'ipu3', is_parallel : false)\n-endforeach\ndiff --git a/test/pipeline/meson.build b/test/pipeline/meson.build\ndeleted file mode 100644\nindex 6e7901fee38f..000000000000\n--- a/test/pipeline/meson.build\n+++ /dev/null\n@@ -1,4 +0,0 @@\n-# SPDX-License-Identifier: CC0-1.0\n-\n-subdir('ipu3')\n-subdir('rkisp1')\ndiff --git a/test/pipeline/rkisp1/meson.build b/test/pipeline/rkisp1/meson.build\ndeleted file mode 100644\nindex 1d178ad9da6f..000000000000\n--- a/test/pipeline/rkisp1/meson.build\n+++ /dev/null\n@@ -1,14 +0,0 @@\n-# SPDX-License-Identifier: CC0-1.0\n-\n-rkisp1_test = [\n- {'name': 'rkisp1_pipeline_test', 'sources': ['rkisp1_pipeline_test.cpp']},\n-]\n-\n-foreach test : rkisp1_test\n- exe = executable(test['name'], test['sources'],\n- dependencies : libcamera_private,\n- link_with : test_libraries,\n- include_directories : test_includes_internal)\n-\n- test(test['name'], exe, suite : 'rkisp1', is_parallel : false)\n-endforeach\ndiff --git a/test/pipeline/rkisp1/rkisp1_pipeline_test.cpp b/test/pipeline/rkisp1/rkisp1_pipeline_test.cpp\ndeleted file mode 100644\nindex acaf3c33b529..000000000000\n--- a/test/pipeline/rkisp1/rkisp1_pipeline_test.cpp\n+++ /dev/null\n@@ -1,115 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0-or-later */\n-/*\n- * Copyright (C) 2020, Linaro\n- *\n- * Based on test/pipeline/ipu3/ipu3_pipeline_test.cpp\n- *\n- * rkisp1_pipeline_test.cpp - Rockchip RK3399 rkisp1 pipeline test\n- */\n-\n-#include <iostream>\n-\n-#include <sys/stat.h>\n-#include <sys/types.h>\n-#include <unistd.h>\n-\n-#include <libcamera/camera.h>\n-#include <libcamera/camera_manager.h>\n-\n-#include \"libcamera/internal/device_enumerator.h\"\n-#include \"libcamera/internal/media_device.h\"\n-#include \"libcamera/internal/media_object.h\"\n-\n-#include \"test.h\"\n-\n-using namespace std;\n-using namespace libcamera;\n-\n-/*\n- * Verify that the RK3399 pipeline handler gets matched and cameras\n- * are enumerated correctly.\n- *\n- * The test is supposed to be run on rockchip platform.\n- *\n- * The test lists all cameras registered in the system, if any camera is\n- * available at all.\n- */\n-class RKISP1PipelineTest : public Test\n-{\n-protected:\n-\tint init();\n-\tint run();\n-\tvoid cleanup();\n-\n-private:\n-\tCameraManager *cameraManager_;\n-\tunsigned int sensors_;\n-};\n-\n-int RKISP1PipelineTest::init()\n-{\n-\tunique_ptr<DeviceEnumerator> enumerator = DeviceEnumerator::create();\n-\tif (!enumerator) {\n-\t\tcerr << \"Failed to create device enumerator\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tif (enumerator->enumerate()) {\n-\t\tcerr << \"Failed to enumerate media devices\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tDeviceMatch dm(\"rkisp1\");\n-\n-\tstd::shared_ptr<MediaDevice> rkisp1 = enumerator->search(dm);\n-\tif (!rkisp1) {\n-\t\tcerr << \"Failed to find rkisp1: test skip\" << endl;\n-\t\treturn TestSkip;\n-\t}\n-\n-\tint ret = rkisp1->populate();\n-\tif (ret) {\n-\t\tcerr << \"Failed to populate media device \"\n-\t\t << rkisp1->deviceNode() << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\tsensors_ = 0;\n-\tconst vector<MediaEntity *> &entities = rkisp1->entities();\n-\tfor (MediaEntity *entity : entities) {\n-\t\tif (entity->function() == MEDIA_ENT_F_CAM_SENSOR)\n-\t\t\tsensors_++;\n-\t}\n-\n-\tcameraManager_ = new CameraManager();\n-\tret = cameraManager_->start();\n-\tif (ret) {\n-\t\tcerr << \"Failed to start the CameraManager\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\treturn 0;\n-}\n-\n-int RKISP1PipelineTest::run()\n-{\n-\tauto cameras = cameraManager_->cameras();\n-\tfor (const std::shared_ptr<Camera> &cam : cameras)\n-\t\tcout << \"Found camera '\" << cam->id() << \"'\" << endl;\n-\n-\tif (cameras.size() != sensors_) {\n-\t\tcerr << cameras.size() << \" cameras registered, but \" << sensors_\n-\t\t << \" were expected\" << endl;\n-\t\treturn TestFail;\n-\t}\n-\n-\treturn TestPass;\n-}\n-\n-void RKISP1PipelineTest::cleanup()\n-{\n-\tcameraManager_->stop();\n-\tdelete cameraManager_;\n-}\n-\n-TEST_REGISTER(RKISP1PipelineTest)\n", "prefixes": [ "libcamera-devel", "v1", "4/4" ] }