Patch Detail
Show a patch.
GET /api/1.1/patches/24927/?format=api
{ "id": 24927, "url": "https://patchwork.libcamera.org/api/1.1/patches/24927/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24927/", "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": "<20251030181127.1059501-2-kieran.bingham@ideasonboard.com>", "date": "2025-10-30T18:11:26", "name": "[v2,1/2] test: utils: Validate hex sign extension", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "c4a71be655ac28382a992135097c29ce396b55c7", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/24927/mbox/", "series": [ { "id": 5546, "url": "https://patchwork.libcamera.org/api/1.1/series/5546/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5546", "date": "2025-10-30T18:11:25", "name": "libcamera: base: utils: Prevent hex signed extension", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5546/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24927/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24927/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 90B3CBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Oct 2025 18:11:36 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEBAF6096B;\n\tThu, 30 Oct 2025 19:11:33 +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 3AF77608DC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Oct 2025 19:11:32 +0100 (CET)", "from Monstersaurus.hippo-penny.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EEEFC1E27;\n\tThu, 30 Oct 2025 19:09:41 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"eYqOXR1A\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761847782;\n\tbh=jRhoJSp/kzBTNZeZPWG6Ej4dxxjJyb3GOBy7QzXDScI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=eYqOXR1AhfDsvFZrD/taOf6+b/IxKAS8lVLO/giUlrZnmJfjiCbwAfG/A1wzj/Fbg\n\tiPu/M7j6/kthRivP7rqmhJo4Atkuep9Yf0/4E5s5f1eaLSrQXJZyAuA/wdiZ5xaQhd\n\t3abyPf3F89c+b9m07wQeuPhX/c/jlAUYC6aQkISA=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Subject": "[PATCH v2 1/2] test: utils: Validate hex sign extension", "Date": "Thu, 30 Oct 2025 18:11:26 +0000", "Message-ID": "<20251030181127.1059501-2-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.50.1", "In-Reply-To": "<20251030181127.1059501-1-kieran.bingham@ideasonboard.com>", "References": "<20251030181127.1059501-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Converting strings to hex stores data in a uint64_t. This can\nincorrectly sign extend if the type being converted is signed.\n\nProvide tests to be sure that the signed conversion is correct.\n\nThis is known to fail, so report as expected failure.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n test/meson.build | 2 +-\n test/utils.cpp | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+), 1 deletion(-)", "diff": "diff --git a/test/meson.build b/test/meson.build\nindex 52f04364e4fc..96c4477f04b2 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -73,7 +73,7 @@ internal_tests = [\n {'name': 'timer-fail', 'sources': ['timer-fail.cpp'], 'should_fail': true},\n {'name': 'timer-thread', 'sources': ['timer-thread.cpp']},\n {'name': 'unique-fd', 'sources': ['unique-fd.cpp']},\n- {'name': 'utils', 'sources': ['utils.cpp']},\n+ {'name': 'utils', 'sources': ['utils.cpp'], 'should_fail': true},\n {'name': 'vector', 'sources': ['vector.cpp']},\n {'name': 'yaml-parser', 'sources': ['yaml-parser.cpp']},\n ]\ndiff --git a/test/utils.cpp b/test/utils.cpp\nindex ca2e4f3b3e85..b5ce94e5e912 100644\n--- a/test/utils.cpp\n+++ b/test/utils.cpp\n@@ -218,6 +218,23 @@ protected:\n \t\tos << utils::hex(static_cast<uint64_t>(0x42), 1) << \" \";\n \t\tref += \"0x42 \";\n \n+\t\tos << utils::hex(static_cast<int8_t>(-1)) << \" \";\n+\t\tref += \"0xff \";\n+\t\tos << utils::hex(static_cast<uint8_t>(-1)) << \" \";\n+\t\tref += \"0xff \";\n+\t\tos << utils::hex(static_cast<int16_t>(-1)) << \" \";\n+\t\tref += \"0xffff \";\n+\t\tos << utils::hex(static_cast<uint16_t>(-1)) << \" \";\n+\t\tref += \"0xffff \";\n+\t\tos << utils::hex(static_cast<int32_t>(-1)) << \" \";\n+\t\tref += \"0xffffffff \";\n+\t\tos << utils::hex(static_cast<uint32_t>(-1)) << \" \";\n+\t\tref += \"0xffffffff \";\n+\t\tos << utils::hex(static_cast<int64_t>(-1)) << \" \";\n+\t\tref += \"0xffffffffffffffff \";\n+\t\tos << utils::hex(static_cast<uint64_t>(-1)) << \" \";\n+\t\tref += \"0xffffffffffffffff \";\n+\n \t\tstd::string s = os.str();\n \t\tif (s != ref) {\n \t\t\tcerr << \"utils::hex() test failed, expected '\" << ref\n", "prefixes": [ "v2", "1/2" ] }