Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222492/?format=api
{ "id": 2222492, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222492/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260412111958.943933-5-sjg@chromium.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/1.1/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260412111958.943933-5-sjg@chromium.org>", "date": "2026-04-12T11:19:41", "name": "[v2,04/12] test: Add argument-type definitions", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "22d4964e04baa160f641891d295ed6c7db655905", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/1.1/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/1.1/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260412111958.943933-5-sjg@chromium.org/mbox/", "series": [ { "id": 499596, "url": "http://patchwork.ozlabs.org/api/1.1/series/499596/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=499596", "date": "2026-04-12T11:19:37", "name": "test: Add support for passing arguments to C unit tests", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499596/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222492/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222492/checks/", "tags": {}, "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=hpEer5WP;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"hpEer5WP\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftp8q5B2zz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 21:24:27 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id DB949841FF;\n\tSun, 12 Apr 2026 13:24:15 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id 8317D841D5; Sun, 12 Apr 2026 13:24:14 +0200 (CEST)", "from mail-oi1-x241.google.com (mail-oi1-x241.google.com\n [IPv6:2607:f8b0:4864:20::241])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 5C384841D6\n for <u-boot@lists.denx.de>; Sun, 12 Apr 2026 13:24:12 +0200 (CEST)", "by mail-oi1-x241.google.com with SMTP id\n 5614622812f47-464bc03efd8so2010721b6e.2\n for <u-boot@lists.denx.de>; Sun, 12 Apr 2026 04:24:12 -0700 (PDT)", "from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-423dd395606sm6622071fac.1.2026.04.12.04.24.07\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 12 Apr 2026 04:24:08 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1775993050; x=1776597850; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=gd5ka50w82XQuShn1IDs16nRmP+r3WISm8LWruzN950=;\n b=hpEer5WPwEet8tXDuyWBIfrYW/iXfwt1lyNOgK3Z0SzWbsQ/8WHV011TS4+zSfA7Vf\n FN/7luaA8sIAXGuOCbEAoYNnvaXRS1NCB8Gpl7AV5woXhXSHzfOLnsLHDZRvclVW4y/n\n tBJ0vsefUFshASPGwShJqNfbyrPZ13vax33C4=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775993050; x=1776597850;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=gd5ka50w82XQuShn1IDs16nRmP+r3WISm8LWruzN950=;\n b=SUR2bxsHQUH28EinyrWqxsXFRMARgjj4oA5Ot2VtelR+LChtApiG1pmuGQiY9uxilt\n qk6EhI1XujJ5s1jXVfJGkyQRmEs86Dfa+RichgfOwvuOexbJo/CDl52e5VidDRxpyJ81\n O/6LgrPXSKbzxioAzrXh2uC+/jSl2raVVIrcG7TPKS9RxY/QDmUq9GJL/CavLsvp49Ms\n z+Yvx1ww2qeG0uisXaQ5f52iASsVSjxRgYUZcXJZPdaXsClhJWc1VdjW8GrDYXZnK+OM\n mXCzUKCv9G9aZMQOP9KMkguOXqwKJzfUFrAu+m8d3DGbaB6UYiS54DeUGzmXWCqNCnwx\n rGMQ==", "X-Gm-Message-State": "AOJu0Yy/rKz6WpU1oTR227W13aFsINwI1tR9FNqWBNMs8T8a7cHjKzIq\n HRxRC7pJt5LSz0aWo8zhaFFYibzV+e7istADkEdapT7vvg1Q029hI6DN2/AD7a0DDiU4FEPX8SX\n tEbMq0tM5", "X-Gm-Gg": "AeBDieu7Srel46UO92zxFLqsFSDbLiYlfyxOG7izUOwJvXzTDz2cmxxJ6JpK6IEE84U\n zy2XBQ/6hBbiLZdEFwxUU4xS9B7kuSY88WL5AJf1ePX4eVDCS7CTJCYwj0FFu+ddJ55EHFNsswN\n BCTcV+bSs8T8B5dHW4PnI5tRpdlbyz75baxlOqhlLDVGi9oMkWV2qQ1lYHNtuXiBdvQRmQGwBG6\n cPvaGljELPpbsh47LvZzt3hujVhJZL0UvT76xg+UItFQcDbRuG/dYvWvjDUH0JWJSuAA1D0GRM0\n joih5Vs+bEo0CrrxPI5Q8biGIY9LIw+YMYgwkeGYG89JuO7j+oepti45h89ZsPuO7y8hG47YqvD\n JpfhhNEoxav4FiAKWT4UsygsbJnqA06Eafy+jlpxBsA9CQxA18lcsCS5kXvFD3tOe6FEkcLF86v\n OsWI/RH/gQMV/jeMqsuw==", "X-Received": "by 2002:a05:6808:c2b8:b0:467:2926:1252 with SMTP id\n 5614622812f47-4789f9ff601mr4845821b6e.30.1775993050239;\n Sun, 12 Apr 2026 04:24:10 -0700 (PDT)", "From": "Simon Glass <sjg@chromium.org>", "To": "u-boot@lists.denx.de", "Cc": "Tom Rini <trini@konsulko.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Simon Glass <sjg@chromium.org>", "Subject": "[PATCH v2 04/12] test: Add argument-type definitions", "Date": "Sun, 12 Apr 2026 05:19:41 -0600", "Message-ID": "<20260412111958.943933-5-sjg@chromium.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260412111958.943933-1-sjg@chromium.org>", "References": "<20260412111958.943933-1-sjg@chromium.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Add types for declaring and storing unit test arguments:\n- enum ut_arg_type: INT, BOOL, STR types\n- enum ut_arg_flags: OPTIONAL flag for non-required args\n- struct ut_arg_def: declares expected args with defaults\n- struct ut_arg: holds parsed argument values\n\nThis prepares for passing key=value arguments to tests via the 'ut'\ncommand instead of needing to use environment variables.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n(no changes since v1)\n\n include/test/test.h | 65 +++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 65 insertions(+)", "diff": "diff --git a/include/test/test.h b/include/test/test.h\nindex f8a80a88959..c9b56c66eae 100644\n--- a/include/test/test.h\n+++ b/include/test/test.h\n@@ -29,6 +29,40 @@ struct ut_stats {\n \tulong duration_ms;\n };\n \n+/**\n+ * enum ut_arg_type - Type of a unit test argument\n+ *\n+ * @UT_ARG_INT: Integer argument (hex with 0x prefix, or decimal) -> vint\n+ * @UT_ARG_BOOL: Boolean argument (0 or 1) -> vbool\n+ * @UT_ARG_STR: String argument -> vstr\n+ */\n+enum ut_arg_type {\n+\tUT_ARG_INT,\n+\tUT_ARG_BOOL,\n+\tUT_ARG_STR,\n+};\n+\n+/**\n+ * struct ut_arg - Parsed unit test argument value\n+ *\n+ * Holds the parsed value of an argument after command-line processing.\n+ *\n+ * @name: Name of the argument (points to ut_arg_def.name)\n+ * @type: Type of the argument\n+ * @vint: Integer value (when type is UT_ARG_INT)\n+ * @vbool: Boolean value (when type is UT_ARG_BOOL)\n+ * @vstr: String value (when type is UT_ARG_STR, points into argv)\n+ */\n+struct ut_arg {\n+\tconst char *name;\n+\tenum ut_arg_type type;\n+\tunion {\n+\t\tlong vint;\n+\t\tbool vbool;\n+\t\tconst char *vstr;\n+\t};\n+};\n+\n /*\n * struct unit_test_state - Entire state of test system\n *\n@@ -108,6 +142,37 @@ enum ut_flags {\n \tUTF_UNINIT\t= BIT(13),\t/* test uninits a suite */\n };\n \n+/**\n+ * enum ut_arg_flags - Flags for unit test arguments\n+ *\n+ * @UT_ARGF_OPTIONAL: Argument is optional; use default value if not provided\n+ */\n+enum ut_arg_flags {\n+\tUT_ARGF_OPTIONAL\t= BIT(0),\n+};\n+\n+/**\n+ * struct ut_arg_def - Definition of a unit test argument\n+ *\n+ * Declares an expected argument for a test, including its name, type,\n+ * whether it is optional, and its default value.\n+ *\n+ * @name: Name of the argument (used in key=value matching)\n+ * @type: Type of the argument (int, bool, or string)\n+ * @flags: Argument flags (e.g., UT_ARGF_OPTIONAL)\n+ * @def: Default value (used when argument is optional and not provided)\n+ */\n+struct ut_arg_def {\n+\tconst char *name;\n+\tenum ut_arg_type type;\n+\tint flags;\n+\tunion {\n+\t\tlong vint;\n+\t\tbool vbool;\n+\t\tconst char *vstr;\n+\t} def;\n+};\n+\n /**\n * struct unit_test - Information about a unit test\n *\n", "prefixes": [ "v2", "04/12" ] }