Patch Detail
Show a patch.
GET /api/patches/19427/?format=api
{ "id": 19427, "url": "https://patchwork.libcamera.org/api/patches/19427/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19427/", "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": "<20240121035948.4226-7-laurent.pinchart@ideasonboard.com>", "date": "2024-01-21T03:59:42", "name": "[libcamera-devel,06/12] test: message: Remove incorrect slow receiver test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "58aa093fc5ddddf0705c0477ec3365ddc295508f", "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/19427/mbox/", "series": [ { "id": 4149, "url": "https://patchwork.libcamera.org/api/series/4149/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4149", "date": "2024-01-21T03:59:36", "name": "libcamera: Hardening against thread race conditions", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4149/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19427/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19427/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 4E8EBC32BD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 21 Jan 2024 03:59:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D206562951;\n\tSun, 21 Jan 2024 04:59:57 +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 DB46F6294C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 21 Jan 2024 04:59:53 +0100 (CET)", "from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CCD44138B;\n\tSun, 21 Jan 2024 04:58:41 +0100 (CET)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1705809597;\n\tbh=ypHTeS71nz6sHKStFmfA7pQqOYKn6VXfE0idipTqYPA=;\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=PgGu32Ef7vs8DQH93G4hpCHUUPYa3voFG5EaNBeQ4bclNCQHwD0MSbWs5ciLlaI9k\n\tp+3IDQ5WV9RosG58ha/dUwOl66If2sbOny40eETke3H3cZyqApGiIQtkWk6hcAwz6X\n\t2TfMBQfrgs4FaXVvmCAlKN2sfi8R3SVVaPWGAO1Q7q29wpBaENC3nmcRsfSbJ7vqd9\n\tJTetL4LiVVQyR3z0awcN5CAIg5R50tIxKQwpKNuijiErqnhLXkHDFMJU6a+KyPkzXH\n\tpdWfzZMX963S+PttSIbx8Dvr6W1y45CCszvYD+5X6zr8TGa0yvnTP6Gz1hysTPLqT/\n\tawFdPMkgkexJA==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1705809522;\n\tbh=ypHTeS71nz6sHKStFmfA7pQqOYKn6VXfE0idipTqYPA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=NYRdiHf23eRIhYhHgD1Mf2ZAyZ5dOv+pP8cqpoDTMFdypesU3zb/tAMIDC9QDsqje\n\tACawEhofWqxA8I0MdR7v8KdHEIMSm3YQgmvNAw+ldL60yUBkO+qoIteRUanvOQkYQE\n\tkljpeq1DhM7U1YkgdFxRffkelcW9GE7BxzqIMNTE=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"NYRdiHf2\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Sun, 21 Jan 2024 05:59:42 +0200", "Message-ID": "<20240121035948.4226-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240121035948.4226-1-laurent.pinchart@ideasonboard.com>", "References": "<20240121035948.4226-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 06/12] test: message: Remove incorrect\n\tslow receiver 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 slow receiver test verifies there's no race condition between\nconcurrent message delivery and object deletion. This is no a valid use\ncase in the first place, as objects are not allowed to be deleted from a\ndifferent thread than the one they are bound to. Remove the incorrect\ntest.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n test/message.cpp | 34 ----------------------------------\n 1 file changed, 34 deletions(-)", "diff": "diff --git a/test/message.cpp b/test/message.cpp\nindex 0e76f323e3b9..a34e0f0b5e10 100644\n--- a/test/message.cpp\n+++ b/test/message.cpp\n@@ -93,25 +93,6 @@ private:\n \tbool success_;\n };\n \n-class SlowMessageReceiver : public Object\n-{\n-protected:\n-\tvoid message(Message *msg)\n-\t{\n-\t\tif (msg->type() != Message::None) {\n-\t\t\tObject::message(msg);\n-\t\t\treturn;\n-\t\t}\n-\n-\t\t/*\n-\t\t * Don't access any member of the object here (including the\n-\t\t * vtable) as the object will be deleted by the main thread\n-\t\t * while we're sleeping.\n-\t\t */\n-\t\tthis_thread::sleep_for(chrono::milliseconds(100));\n-\t}\n-};\n-\n class MessageTest : public Test\n {\n protected:\n@@ -148,21 +129,6 @@ protected:\n \t\t\tbreak;\n \t\t}\n \n-\t\t/*\n-\t\t * Test for races between message delivery and object deletion.\n-\t\t * Failures result in assertion errors, there is no need for\n-\t\t * explicit checks.\n-\t\t */\n-\t\tSlowMessageReceiver *slowReceiver = new SlowMessageReceiver();\n-\t\tslowReceiver->moveToThread(&thread_);\n-\t\tslowReceiver->postMessage(std::make_unique<Message>(Message::None));\n-\n-\t\tthis_thread::sleep_for(chrono::milliseconds(10));\n-\n-\t\tdelete slowReceiver;\n-\n-\t\tthis_thread::sleep_for(chrono::milliseconds(100));\n-\n \t\t/*\n \t\t * Test recursive calls to Thread::dispatchMessages(). Messages\n \t\t * should be delivered correctly, without crashes or memory\n", "prefixes": [ "libcamera-devel", "06/12" ] }