Patch Detail
Show a patch.
GET /api/1.1/patches/65/?format=api
{ "id": 65, "url": "https://patchwork.libcamera.org/api/1.1/patches/65/?format=api", "web_url": "https://patchwork.libcamera.org/patch/65/", "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": "<20181221005329.13597-1-niklas.soderlund@ragnatech.se>", "date": "2018-12-21T00:53:29", "name": "[libcamera-devel] tests: call the derived Test class cleanup() function", "commit_ref": "53b549b63158c64a2f8764fcba8bf049fb1cb397", "pull_url": null, "state": "accepted", "archived": false, "hash": "d574306a8133574f8029bacc1e850419a6cf10bf", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/1.1/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/65/mbox/", "series": [ { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/series/34/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=34", "date": "2018-12-21T00:53:29", "name": "[libcamera-devel] tests: call the derived Test class cleanup() function", "version": 1, "mbox": "https://patchwork.libcamera.org/series/34/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/65/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/65/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8F4F3600CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Dec 2018 01:54:15 +0100 (CET)", "from bismarck.berto.se (unknown [89.233.230.99])\n\tby bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid cb71866f-04ba-11e9-9adf-005056917a89;\n\tFri, 21 Dec 2018 01:53:48 +0100 (CET)" ], "X-Halon-ID": "cb71866f-04ba-11e9-9adf-005056917a89", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 21 Dec 2018 01:53:29 +0100", "Message-Id": "<20181221005329.13597-1-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.20.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] tests: call the derived Test class\n\tcleanup() function", "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": "Fri, 21 Dec 2018 00:54:15 -0000" }, "content": "Calling the cleanup() function in the base class Test destructor only\ncalls the base class empty cleanup() function, not the overloaded one.\nThis results in tests not cleaning up after themself. Solve this by\nexplicitly calling the cleanup() function from execute().\n\nThis was discovered while running valgrind on tests where objects where\nallocated in init() and freed in cleanup().\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n test/test.cpp | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)", "diff": "diff --git a/test/test.cpp b/test/test.cpp\nindex 4e7779e750d56687..1bb6ebcb9e8acf18 100644\n--- a/test/test.cpp\n+++ b/test/test.cpp\n@@ -13,7 +13,6 @@ Test::Test()\n \n Test::~Test()\n {\n-\tcleanup();\n }\n \n int Test::execute()\n@@ -24,5 +23,9 @@ int Test::execute()\n \tif (ret < 0)\n \t\treturn ret;\n \n-\treturn run();\n+\tret = run();\n+\n+\tcleanup();\n+\n+\treturn ret;\n }\n", "prefixes": [ "libcamera-devel" ] }