get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222455,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222455/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260412013451.2929001-2-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-2-sjg@chromium.org>",
    "date": "2026-04-12T01:34:29",
    "name": "[01/12] test: Add ut_asserteq_regex() for regex pattern matching",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3e803f1173705f6f5e61726e01de974c093fffad",
    "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-2-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/2222455/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222455/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=kf8sRXL4;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; 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=\"kf8sRXL4\";\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 [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftY525Cngz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 11:35:18 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id C159384119;\n\tSun, 12 Apr 2026 03:35:11 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id E119384181; Sun, 12 Apr 2026 03:35:09 +0200 (CEST)",
            "from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com\n [IPv6:2607:f8b0:4864:20::32a])\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 9D8A0839D9\n for <u-boot@lists.denx.de>; Sun, 12 Apr 2026 03:35:06 +0200 (CEST)",
            "by mail-ot1-x32a.google.com with SMTP id\n 46e09a7af769-7d7ebe11bffso2887177a34.0\n for <u-boot@lists.denx.de>; Sat, 11 Apr 2026 18:35:06 -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.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 11 Apr 2026 18:35:00 -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=1775957704; x=1776562504; 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=cyLEl7CFJqYARK3ivXz1vsLYN0g21lVWNoS2PyIY9DA=;\n b=kf8sRXL4E3xUd5pl/7w9nOJepnjL0Qv4BbQOvwFA7Y8R+zppw4wa+ShJHavdMXoaaN\n ZcM1OqL6Rae6DtRpEQMV+zJqaLni9OimOBzeqmBimVmJx/IbYnmXvbDXZha97yMi5Wlf\n O/XKI710X8Xhw5/bbzwnsoX5KNQH7zdiD17PI=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775957704; x=1776562504;\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=cyLEl7CFJqYARK3ivXz1vsLYN0g21lVWNoS2PyIY9DA=;\n b=tPwDH2qtBzv4rJ4JWtduRL3ClUDgSvBdhgeGMebwL/0OfxAqVRLvQOWejBUvfCjlTW\n PEKZudGv8iX5Tv/uODsO9md93BY3tLhmXpP7jHA0foHQk5LBsKiOQ/RdrEa0JYj7utln\n nEuFNdBy+FxTYj6Nyt0y/fTL3n9qdccl/BmUpC40xlxEbmA/pgz7H+GxMb/uLf/sMlxy\n udhMct+vGpGHMQMdawh0VPdysqHT8235i4SSNZrbIMB+09cnsXxBMvySqPVQgvEdMlpl\n in1Q7HLXFeHsQQTbk7NaqMhE6XAuuZy3ub558fZDwsg/ocVhXb8OjIo3m57RvyzpjWpC\n gVWQ==",
        "X-Gm-Message-State": "AOJu0Yxzs0xF6QFgg7W1G09kY+W4OJRKe1Uospw8nqbQqoh7BBjBVaLa\n WjAGuA4GPVgDNDfETn0WTPeTu3oBP7dpP7p70ecvqb0QNTjPPMSWI3KgNX8L/ydmmuJWt5KxGno\n jXzpGeQ==",
        "X-Gm-Gg": "AeBDiev72UkM3mBmALOeDBXCqVTc+VilR0MUgVSyEUB+kPZv2QU4ckiwIX055g2/GYr\n WwfobxcnL3AxI4CvJg4WxD6ykEyEeiqKyJQSRC4OXsTXmRBj68yEj81SKTYBgJP6ylIuvpJicfA\n eA2zKuy7W7tmVEIJvRiI5udj3UhJoe+Mu3Jxdj1gjWIiJE/paoEWvtIg/FceQSeMBZhF+xRYKAl\n upfR/j/lgdPAvj4laJRFeEnpqwFa1QJT2RUWe8bDxQlsY64RvAYid28EDUv7EJiqhH1OD1x1hn7\n FcjQJcGEt2hXu1RGG509H3ZjQ9cb0ung+RzNIwuCc+UE4UVvi4SnaBSeYz4pA3djf6wgVn7wJbR\n BVuR2krU1zuNjsDNC5Xi6A33y6I9xwogtAC3hH3Q7rhJm/+tv25PXn5Un4D0QACJ9q6CjZkwlVF\n ONmwRvI7Y5UjaJL5dXJA==",
        "X-Received": "by 2002:a05:6830:710c:b0:7d7:570b:6800 with SMTP id\n 46e09a7af769-7dc27f7ce91mr5071256a34.23.1775957704232;\n Sat, 11 Apr 2026 18:35:04 -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 01/12] test: Add ut_asserteq_regex() for regex pattern\n matching",
        "Date": "Sat, 11 Apr 2026 19:34:29 -0600",
        "Message-ID": "<20260412013451.2929001-2-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\nAdd a new assertion macro ut_asserteq_regex() that checks if a string\nmatches a regular expression pattern using the SLRE library.\n\nThis is useful for tests where exact string-matching is difficult, such\nas when output contains line numbers or other variable content.\n\nUse a helper function ut_check_regex() to avoid including slre.h in the\nheader.\n\nSigned-off-by: Simon Glass <simon.glass@canonical.com>\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n include/test/ut.h | 36 +++++++++++++++++++++++++++++-------\n test/ut.c         | 30 ++++++++++++++++++++++++++++++\n 2 files changed, 59 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/include/test/ut.h b/include/test/ut.h\nindex 6510c35997f..cda15f3a7a9 100644\n--- a/include/test/ut.h\n+++ b/include/test/ut.h\n@@ -13,6 +13,9 @@\n #include <linux/err.h>\n #include <test/test.h>\n \n+/* Size of error buffer for ut_check_regex() */\n+#define UT_REGEX_ERR_SIZE\t256\n+\n struct unit_test_state;\n \n /**\n@@ -41,6 +44,16 @@ void ut_failf(struct unit_test_state *uts, const char *fname, int line,\n \t      const char *func, const char *cond, const char *fmt, ...)\n \t\t\t__attribute__ ((format (__printf__, 6, 7)));\n \n+/**\n+ * ut_check_regex() - Check if a string matches a regex pattern\n+ *\n+ * @pattern: Regular expression pattern\n+ * @str: String to match against\n+ * @err: Buffer to hold error message on failure (UT_REGEX_ERR_SIZE bytes)\n+ * Return: 0 if match, -EINVAL if pattern is invalid, -ENOENT if no match\n+ */\n+int ut_check_regex(const char *pattern, const char *str, char *err);\n+\n /**\n  * ut_check_console_line() - Check the next console line against expectations\n  *\n@@ -264,13 +277,22 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);\n \t__ret;\t\t\t\t\t\t\t\t\\\n })\n \n-/**\n- * ut_asserteq_mem() - Assert that two memory areas are equal\n- *\n- * @expr1:\texpected value\n- * @expr2:\tactual value\n- * @len:\tlength of the memory areas\n- */\n+/* Assert that a string matches a regex pattern */\n+#define ut_asserteq_regex(pattern, str) ({\t\t\t\t\\\n+\tconst char *_pattern = (pattern), *_str = (str);\t\t\\\n+\tchar _err[UT_REGEX_ERR_SIZE];\t\t\t\t\t\\\n+\tint __ret = 0;\t\t\t\t\t\t\t\\\n+\t\t\t\t\t\t\t\t\t\\\n+\t__ret = ut_check_regex(_pattern, _str, _err);\t\t\t\\\n+\tif (__ret) {\t\t\t\t\t\t\t\\\n+\t\tut_failf(uts, __FILE__, __LINE__, __func__,\t\t\\\n+\t\t\t #pattern \" matches \" #str, \"%s\", _err);\t\\\n+\t\treturn CMD_RET_FAILURE;\t\t\t\t\t\\\n+\t}\t\t\t\t\t\t\t\t\\\n+\t__ret;\t\t\t\t\t\t\t\t\\\n+})\n+\n+/* Assert that two memory areas are equal */\n #define ut_asserteq_mem(expr1, expr2, len) ({\t\t\t\t\\\n \tconst u8 *_val1 = (u8 *)(expr1), *_val2 = (u8 *)(expr2);\t\\\n \tconst uint __len = len;\t\t\t\t\t\t\\\ndiff --git a/test/ut.c b/test/ut.c\nindex a16fdfb3a93..b4f2a8bf40f 100644\n--- a/test/ut.c\n+++ b/test/ut.c\n@@ -6,7 +6,10 @@\n  */\n \n #include <console.h>\n+#include <errno.h>\n #include <malloc.h>\n+#include <slre.h>\n+#include <vsprintf.h>\n #ifdef CONFIG_SANDBOX\n #include <asm/state.h>\n #endif\n@@ -38,6 +41,33 @@ void ut_failf(struct unit_test_state *uts, const char *fname, int line,\n \tuts->cur.fail_count++;\n }\n \n+int ut_check_regex(const char *pattern, const char *str, char *err)\n+{\n+\tstruct slre slre;\n+\n+\tif (!pattern || !str) {\n+\t\tsnprintf(err, UT_REGEX_ERR_SIZE,\n+\t\t\t \"NULL value: pattern=%s, str=%s\",\n+\t\t\t pattern ? pattern : \"(null)\",\n+\t\t\t str ? str : \"(null)\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!slre_compile(&slre, pattern)) {\n+\t\tsnprintf(err, UT_REGEX_ERR_SIZE,\n+\t\t\t \"Invalid regex '%s': %s\", pattern, slre.err_str);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!slre_match(&slre, str, strlen(str), NULL)) {\n+\t\tsnprintf(err, UT_REGEX_ERR_SIZE,\n+\t\t\t \"No match: pattern '%s', str '%s'\", pattern, str);\n+\t\treturn -ENOENT;\n+\t}\n+\n+\treturn 0;\n+}\n+\n ulong ut_check_free(void)\n {\n \tstruct mallinfo info = mallinfo();\n",
    "prefixes": [
        "01/12"
    ]
}