get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2222461/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2222461,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222461/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260412013451.2929001-8-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": "<20260412013451.2929001-8-sjg@chromium.org>",
    "date": "2026-04-12T01:34:35",
    "name": "[07/12] test: Enhance the ut command to pass test arguments",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "428abe95ce337a0def99d7481e7e77cc4a0ea73d",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "delegate": {
        "id": 3184,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/3184/?format=api",
        "username": "sjg",
        "first_name": "Simon",
        "last_name": "Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260412013451.2929001-8-sjg@chromium.org/mbox/",
    "series": [
        {
            "id": 499582,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499582/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=499582",
            "date": "2026-04-12T01:34:28",
            "name": "test: Add support for passing arguments to C unit tests",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499582/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222461/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222461/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=W9fyOSNQ;\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=\"W9fyOSNQ\";\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 4ftY662LP0z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 11:36:14 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 1FF48841DF;\n\tSun, 12 Apr 2026 03:35:37 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 0FF9C841DF; Sun, 12 Apr 2026 03:35:36 +0200 (CEST)",
            "from mail-ot1-x335.google.com (mail-ot1-x335.google.com\n [IPv6:2607:f8b0:4864:20::335])\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 C22F48421E\n for <u-boot@lists.denx.de>; Sun, 12 Apr 2026 03:35:32 +0200 (CEST)",
            "by mail-ot1-x335.google.com with SMTP id\n 46e09a7af769-7d7fdb922a5so2721610a34.3\n for <u-boot@lists.denx.de>; Sat, 11 Apr 2026 18:35:32 -0700 (PDT)",
            "from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7dc2d1aca3asm4242826a34.6.2026.04.11.18.35.24\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 11 Apr 2026 18:35:24 -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=1775957729; x=1776562529; 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=slbemFJ7O+Voa8j6kAVyUnqzR7AbnVylkHFvQnaQjlM=;\n b=W9fyOSNQ5kL6WA4ZHubw4XzPySpUbR6XQsCzHE+UT14fBJxWdBursWGtNnDxAQwQOU\n POXlaOh+J2+7/2IwzG9Z19Zq8aw5la6YMLUzAqC9qlZVvaZMC4+A54LfM3AM+Shj5JFS\n dhPZDykATAVPOGz5r2vJ77ZtDBfyKDgxaRYvw=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775957729; x=1776562529;\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=slbemFJ7O+Voa8j6kAVyUnqzR7AbnVylkHFvQnaQjlM=;\n b=AqzRqnEYaHL/taNQICkt9gphbCsW8OfXnZPmFjzqkRhSGmVG6+XzcF0no4XsnLDNWa\n 6mHmUJRw7e/LnA4sPvPsd/6hO883wgPZM26JhQnZKDkbtvuvXkxjQ45juOzF4rjAdAa4\n XBzU5vDzbsielx5iGnWp8o/cTGIH/YX4AOE1aAWk8kkR8ksUitokMUQ4EuB/8CEXAyWK\n 8gwGVQrZdjfu/2gv4WA27WcRmFGWk962JjI6CRb1+aUjNtfP2PPDwJLceeNm0vjlpmlU\n p4ogUzoGD6kCKSubyVG3m4A6K88zBMW0Z4Y0ktYHM0j10jK+SQMXjcjfVvdonNrJeGeZ\n F9QQ==",
        "X-Gm-Message-State": "AOJu0YxNGDrO7r4VYlJx4IuI2PZxkzGeOZkXO0KudYug+CsPN1p5NWXy\n ZPHglFW6vkQ6G7p1ZDH1tgpEJvg7XZtuiGVe4AnntG/jYKjn9WBY4rgCpXEUY+gmhqxMH2yvxFv\n dfv5gKg==",
        "X-Gm-Gg": "AeBDievkOEihknF0/CFlmljGBQecBQszSOQ/mLOAq83zXEDLbEldiV1XwgchFPuSIvb\n wB4m1dxq7BxWVa4egwFDcD7WC0nja7t77v5BDPij3jYj2q8QziO9DvmY6H7iAsrAzkarj0vQXbt\n ZRcfANjl4bGenCyb9dA5i5vl7a9iUZZmFwCLW9YvbZHl+RL1VXCooMS537fbAZlTC7ajVjYx6/L\n m8kZtUaR3srH0oKfLuRHMSJIXQo9SQVWlPiiefCqAcw6SO8g2/xxsWtLUbSfEF0u3HOaqcT88O0\n D9mKHCTwLNcbz1p2kNM0TTdiqtcUJLYIPONa7rLLn9SNdjkA33OaNpoQWOrv/yvWeXq3T2lmGkG\n aajmQ1ZBTBkbsaXLUpSZuaQUucyiXRbisusGlioc9TCIicjLNJNTVBcV8T1jL/MEt6gDoG9OfKi\n t2tGD1TnphmVqpPFFT0A==",
        "X-Received": "by 2002:a05:6830:b83:b0:7d7:ccd6:3cd4 with SMTP id\n 46e09a7af769-7dc27e2d3f6mr5371678a34.23.1775957729472;\n Sat, 11 Apr 2026 18:35:29 -0700 (PDT)",
        "From": "Simon Glass <sjg@chromium.org>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, Tom Rini <trini@konsulko.com>,\n Simon Glass <simon.glass@canonical.com>, Simon Glass <sjg@chromium.org>",
        "Subject": "[PATCH 07/12] test: Enhance the ut command to pass test arguments",
        "Date": "Sat, 11 Apr 2026 19:34:35 -0600",
        "Message-ID": "<20260412013451.2929001-8-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260412013451.2929001-1-sjg@chromium.org>",
        "References": "<20260412013451.2929001-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": "From: Simon Glass <simon.glass@canonical.com>\n\nUpdate the ut command to permit passing arguments to tests.\n\nUsage: ut -f fs test_name key1=value1 key2=value2\n\nSigned-off-by: Simon Glass <simon.glass@canonical.com>\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n doc/usage/cmd/ut.rst | 11 ++++++++++-\n test/cmd_ut.c        | 29 ++++++++++++++++++++---------\n 2 files changed, 30 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst\nindex 1acf3126680..d8c3cbf496c 100644\n--- a/doc/usage/cmd/ut.rst\n+++ b/doc/usage/cmd/ut.rst\n@@ -11,7 +11,7 @@ Synopsis\n \n ::\n \n-    ut [-r<runs>] [-f] [-I<n>:<one_test>] [-r<n>] [<suite> | 'all' [<test>]]\n+    ut [-r<runs>] [-f] [-I<n>:<one_test>] [<suite> | all [<test>]] [<args>...]\n     ut [-s] info\n \n Description\n@@ -37,6 +37,11 @@ test\n     causes another test to fail. If the one test fails, testing stops\n     immediately.\n \n+args\n+    Optional arguments to pass to the test, in `name=value` format. These are\n+    used by tests declared with `UNIT_TEST_ARGS()` which define expected\n+    argument names and types.\n+\n Typically the command is run on :ref:`arch/sandbox/sandbox:sandbox` since it\n includes a near-complete set of emulators, no code-size limits, many CONFIG\n options enabled and runs easily in CI without needing QEMU. It is also possible\n@@ -201,3 +206,7 @@ Run a selection of three suites::\n     Tests run: 10, 12 ms, average: 1 ms, failures: 0\n     Suites run: 3, total tests run: 37, 26 ms, average: 0 ms, failures: 0\n     Average test time: 0 ms, worst case 'mem' took 1 ms\n+\n+Run a test with arguments (used by tests declared with UNIT_TEST_ARGS)::\n+\n+    => ut -f fs fs_test_ls_norun fs_type=ext4 fs_image=/tmp/img small=1MB.file\ndiff --git a/test/cmd_ut.c b/test/cmd_ut.c\nindex 7304c32bec5..9d36bd5dc87 100644\n--- a/test/cmd_ut.c\n+++ b/test/cmd_ut.c\n@@ -30,7 +30,7 @@ struct suite {\n \n static int do_ut_all(struct unit_test_state *uts, const char *select_name,\n \t\t     int runs_per_test, bool force_run,\n-\t\t     const char *test_insert);\n+\t\t     const char *test_insert, int argc, char *const argv[]);\n \n static int do_ut_info(bool show_suites);\n \n@@ -120,7 +120,7 @@ static bool has_tests(struct suite *ste)\n /** run_suite() - Run a suite of tests */\n static int run_suite(struct unit_test_state *uts, struct suite *ste,\n \t\t     const char *select_name, int runs_per_test, bool force_run,\n-\t\t     const char *test_insert)\n+\t\t     const char *test_insert, int argc, char *const argv[])\n {\n \tint n_ents = ste->end - ste->start;\n \tchar prefix[30];\n@@ -131,7 +131,7 @@ static int run_suite(struct unit_test_state *uts, struct suite *ste,\n \n \tret = ut_run_list(uts, ste->name, prefix, ste->start, n_ents,\n \t\t\t  select_name, runs_per_test, force_run, test_insert,\n-\t\t\t  0, NULL);\n+\t\t\t  argc, argv);\n \n \treturn ret;\n }\n@@ -167,7 +167,8 @@ static void update_stats(struct unit_test_state *uts, const struct suite *ste)\n }\n \n static int do_ut_all(struct unit_test_state *uts, const char *select_name,\n-\t\t     int runs_per_test, bool force_run, const char *test_insert)\n+\t\t     int runs_per_test, bool force_run, const char *test_insert,\n+\t\t     int argc, char *const argv[])\n {\n \tint i;\n \tint retval;\n@@ -179,7 +180,7 @@ static int do_ut_all(struct unit_test_state *uts, const char *select_name,\n \t\tif (has_tests(ste)) {\n \t\t\tprintf(\"----Running %s tests----\\n\", ste->name);\n \t\t\tretval = run_suite(uts, ste, select_name, runs_per_test,\n-\t\t\t\t\t   force_run, test_insert);\n+\t\t\t\t\t   force_run, test_insert, argc, argv);\n \t\t\tif (!any_fail)\n \t\t\t\tany_fail = retval;\n \t\t\tupdate_stats(uts, ste);\n@@ -244,6 +245,8 @@ static struct suite *find_suite(const char *name)\n static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n {\n \tconst char *test_insert = NULL, *select_name;\n+\tint test_argc;\n+\tchar *const *test_argv;\n \tstruct unit_test_state uts;\n \tbool show_suites = false;\n \tbool force_run = false;\n@@ -285,9 +288,14 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n \tut_init_state(&uts);\n \tname = argv[0];\n \tselect_name = cmd_arg1(argc, argv);\n+\n+\t/* Test arguments are after suite name and test name */\n+\ttest_argc = argc > 2 ? argc - 2 : 0;\n+\ttest_argv = argc > 2 ? argv + 2 : NULL;\n+\n \tif (!strcmp(name, \"all\")) {\n \t\tret = do_ut_all(&uts, select_name, runs_per_text, force_run,\n-\t\t\t\ttest_insert);\n+\t\t\t\ttest_insert, test_argc, test_argv);\n \t} else if (!strcmp(name, \"info\")) {\n \t\tret = do_ut_info(show_suites);\n \t} else {\n@@ -306,7 +314,8 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n \t\t\t}\n \n \t\t\tret = run_suite(&uts, ste, select_name, runs_per_text,\n-\t\t\t\t\tforce_run, test_insert);\n+\t\t\t\t\tforce_run, test_insert, test_argc,\n+\t\t\t\t\ttest_argv);\n \t\t\tif (!any_fail)\n \t\t\t\tany_fail = ret;\n \t\t\tupdate_stats(&uts, ste);\n@@ -322,12 +331,14 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n }\n \n U_BOOT_LONGHELP(ut,\n-\t\"[-rs] [-f] [-I<n>:<one_test>][<suites>] - run unit tests\\n\"\n+\t\"[-rs] [-f] [-I<n>:<one_test>] <suite> [<test> [<args>...]] - run unit tests\\n\"\n \t\"   -r<runs>   Number of times to run each test\\n\"\n \t\"   -f         Force 'manual' tests to run as well\\n\"\n \t\"   -I         Test to run after <n> other tests have run\\n\"\n \t\"   -s         Show all suites with ut info\\n\"\n-\t\"   <suites>   Comma-separated list of suites to run\\n\"\n+\t\"   <suite>    Test suite to run (or comma-separated list)\\n\"\n+\t\"   <test>     Specific test to run (optional)\\n\"\n+\t\"   <args>     Test arguments as key=value pairs (optional)\\n\"\n \t\"\\n\"\n \t\"Options for <suite>:\\n\"\n \t\"all       - execute all enabled tests\\n\"\n",
    "prefixes": [
        "07/12"
    ]
}