Show a patch.

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

{
    "id": 15929,
    "url": "https://patchwork.libcamera.org/api/patches/15929/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15929/",
    "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": "<20220517143325.71784-6-tomi.valkeinen@ideasonboard.com>",
    "date": "2022-05-17T14:33:17",
    "name": "[libcamera-devel,v2,05/13] py: unittests: verify that cam and cm are freed",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "f3943f2d41db7a99cf5f5de0338a9bf7bd6658f4",
    "submitter": {
        "id": 109,
        "url": "https://patchwork.libcamera.org/api/people/109/?format=api",
        "name": "Tomi Valkeinen",
        "email": "tomi.valkeinen@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15929/mbox/",
    "series": [
        {
            "id": 3116,
            "url": "https://patchwork.libcamera.org/api/series/3116/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3116",
            "date": "2022-05-17T14:33:12",
            "name": "Misc Python bindings patches",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/3116/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15929/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15929/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 A394EC326D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 May 2022 14:33:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3D18C6041D;\n\tTue, 17 May 2022 16:33:58 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2C4F465661\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 May 2022 16:33:54 +0200 (CEST)",
            "from deskari.lan (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 91917D59;\n\tTue, 17 May 2022 16:33:53 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652798038;\n\tbh=uUO9E4zBomuA+wF8p3Q+nMamxEdaL4uqXD+Aia+1+Mw=;\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=Zz3mvGIxFPrzT0mQwAJEe9Ar9Aer3WEKITWVci4uBdK7rJjB53DnQpt46y7YPsBpQ\n\t/lG08itAnkHLFPHExkEjaUCe6P7ARmHyb2QI2jmDe7+5+nh7xqSWG7r3cCQL9kCbDM\n\t4dqCVq58J5pTABiAcC43obKx3cDSImDqDN1X68m9JIL6MX8Sva0m9vIqQuVNOQ8dwy\n\tBLvBzNULY1Gq+YhT3EJPL4aErOc+SsYeN+Y0/lOfD+eBzezZT6QqziuoViOgVwVg9z\n\tMJG6jHO/oELh3xIo5si/xSAzzJal2npCwzwosYS90GuHegvI3mHIM32GUu4KH+jChN\n\tIPey+qWMmYTUQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652798033;\n\tbh=uUO9E4zBomuA+wF8p3Q+nMamxEdaL4uqXD+Aia+1+Mw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ooco2jjY/glQ/MAESRrSirbOKHWXjS5m0lypxVcKC7sA7wF4ir8V7pL2skPYM7dL1\n\tXzUBmVviSgURXHwNt8uIeNaASkHIdyoLwNRa08ae9r4A6z16qIw8QjdLJuWxB6asXJ\n\tHZlNpqSdgWjbWygjCSj2yIp1YOFdGx0V8YyHh32A="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ooco2jjY\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tJacopo Mondi <jacopo@jmondi.org>",
        "Date": "Tue, 17 May 2022 17:33:17 +0300",
        "Message-Id": "<20220517143325.71784-6-tomi.valkeinen@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>",
        "References": "<20220517143325.71784-1-tomi.valkeinen@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 05/13] py: unittests: verify that cam\n\tand cm are freed",
        "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": "Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Add checks to CameraTesterBase to verify that both the Camera and the\nCameraManager gets freed.\n\nSigned-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/py/unittests.py | 6 ++++++\n 1 file changed, 6 insertions(+)",
    "diff": "diff --git a/test/py/unittests.py b/test/py/unittests.py\nindex 9326358d..4c214f0a 100755\n--- a/test/py/unittests.py\n+++ b/test/py/unittests.py\n@@ -83,6 +83,9 @@ class CameraTesterBase(BaseTestCase):\n             self.cm = None\n             raise Exception('Failed to acquire camera')\n \n+        self.wr_cam = weakref.ref(self.cam)\n+        self.wr_cm = weakref.ref(self.cm)\n+\n     def tearDown(self):\n         # If a test fails, the camera may be in running state. So always stop.\n         self.cam.stop()\n@@ -94,6 +97,9 @@ class CameraTesterBase(BaseTestCase):\n         self.cam = None\n         self.cm = None\n \n+        self.assertIsNone(self.wr_cm())\n+        self.assertIsNone(self.wr_cam())\n+\n \n class AllocatorTestMethods(CameraTesterBase):\n     def test_allocator(self):\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "05/13"
    ]
}