Patch Detail
Show a patch.
GET /api/patches/2497/?format=api
{ "id": 2497, "url": "https://patchwork.libcamera.org/api/patches/2497/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2497/", "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": "<20200104050947.7673-2-laurent.pinchart@ideasonboard.com>", "date": "2020-01-04T05:09:34", "name": "[libcamera-devel,01/14] test: object-invoke: Test direct invocation", "commit_ref": "d82b8778ed4fa9cf0f2ccacc95807c1bdaa25bda", "pull_url": null, "state": "accepted", "archived": false, "hash": "b008e82d8da69e71f2ed0cd75ddbc73b8e188a96", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2497/mbox/", "series": [ { "id": 600, "url": "https://patchwork.libcamera.org/api/series/600/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=600", "date": "2020-01-04T05:09:33", "name": "object: Propagate return value of invoked method", "version": 1, "mbox": "https://patchwork.libcamera.org/series/600/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2497/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2497/checks/", "tags": {}, "headers": { "Return-Path": "<laurent.pinchart@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 4C3B560466\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 4 Jan 2020 06:10:03 +0100 (CET)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E005EA49\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 4 Jan 2020 06:10:02 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1578114603;\n\tbh=XDmoyez+9Q+gmb7aXgFlcw9C5/2YsoVpKGpYI1Y08Y0=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=nXXx/sKlVXfWAUYIA7AuCm3JUjGomr8+u8AUVShEYcE+X1wjgTjAa/s6KBk4Hqoti\n\tBlTB4jdXI5l2ZZKA+AKFiYS9kCNGl0CmaYOhMbfMuiIdxFqtxJfZlnDQ6Af49VyUqb\n\tr/5CCNbuNznlEKzTYLtHxLCihHAOyIRvtmBtSruc=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sat, 4 Jan 2020 07:09:34 +0200", "Message-Id": "<20200104050947.7673-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.24.1", "In-Reply-To": "<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>", "References": "<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 01/14] test: object-invoke: Test direct\n\tinvocation", "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>", "X-List-Received-Date": "Sat, 04 Jan 2020 05:10:03 -0000" }, "content": "Test the ConnectionTypeDirect type when the object lives in a different\nthread. This test passes but generates a memory leak.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/object-invoke.cpp | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)", "diff": "diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\nindex f9a8bea9dce2..ed16de99ef5e 100644\n--- a/test/object-invoke.cpp\n+++ b/test/object-invoke.cpp\n@@ -123,6 +123,27 @@ protected:\n \t\t\treturn TestFail;\n \t\t}\n \n+\t\t/* Test that direct method invocation bypasses threads. */\n+\t\tobject_.reset();\n+\t\tobject_.invokeMethod(&InvokedObject::method,\n+\t\t\t\t ConnectionTypeDirect, 42);\n+\n+\t\tswitch (object_.status()) {\n+\t\tcase InvokedObject::NoCall:\n+\t\t\tcout << \"Method not invoked for custom thread\" << endl;\n+\t\t\treturn TestFail;\n+\t\tcase InvokedObject::CallReceived:\n+\t\t\tcout << \"Method invoked in incorrect thread for direct call\" << endl;\n+\t\t\treturn TestFail;\n+\t\tdefault:\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (object_.value() != 42) {\n+\t\t\tcout << \"Method invoked with incorrect value for direct call\" << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n \t\t/*\n \t\t * Test invoking a method that takes reference arguments. This\n \t\t * targets compilation, there's no need to check runtime\n", "prefixes": [ "libcamera-devel", "01/14" ] }