Show a cover letter.

GET /api/1.2/covers/2222454/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2222454,
    "url": "http://patchwork.ozlabs.org/api/1.2/covers/2222454/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/cover/20260412013451.2929001-1-sjg@chromium.org/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.2/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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260412013451.2929001-1-sjg@chromium.org>",
    "list_archive_url": null,
    "date": "2026-04-12T01:34:28",
    "name": "[00/12] test: Add support for passing arguments to C unit tests",
    "submitter": {
        "id": 6170,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/6170/?format=api",
        "name": "Simon Glass",
        "email": "sjg@chromium.org"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/cover/20260412013451.2929001-1-sjg@chromium.org/mbox/",
    "series": [
        {
            "id": 499582,
            "url": "http://patchwork.ozlabs.org/api/1.2/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/covers/2222454/comments/",
    "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=bJVFP1/N;\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=\"bJVFP1/N\";\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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftY4z1ChNz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 11:35:15 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id A893A83BC4;\n\tSun, 12 Apr 2026 03:35:06 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 6F28283BC4; Sun, 12 Apr 2026 03:35:06 +0200 (CEST)",
            "from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com\n [IPv6:2607:f8b0:4864:20::32d])\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 3C203839D9\n for <u-boot@lists.denx.de>; Sun, 12 Apr 2026 03:35:03 +0200 (CEST)",
            "by mail-ot1-x32d.google.com with SMTP id\n 46e09a7af769-7d4be94eeacso3587899a34.2\n for <u-boot@lists.denx.de>; Sat, 11 Apr 2026 18:35:03 -0700 (PDT)",
            "from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7dc2d1aca3asm4242826a34.6.2026.04.11.18.34.55\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 11 Apr 2026 18:34:56 -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=1775957699; x=1776562499; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=RCvyO9pkFGp1KaRPANhQl0H3irN6t+JcR5K5h+0hORs=;\n b=bJVFP1/N8tH18HPrTNIys4Ww+fGuls1F/BYjW62f6RbUvyrJDgv1oaOdE4uLohPOVW\n sokYKyEuNnCKR0jEO9uZawMg+5SQdLlznzDHCrEr9O2MBK75swX3aUqnXblhn4I3RgiQ\n 5ngoSkx1UtpDLjgi0tW8X0t2Tdy/dLGbW9INM=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775957699; x=1776562499;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=RCvyO9pkFGp1KaRPANhQl0H3irN6t+JcR5K5h+0hORs=;\n b=K1EYSpA6h0yp5agLSFOWCj5LEqYfKJf5gtloja/iW/PrchsGc4UTqwyJhSIm2r2VVf\n yHH3mHBJZHM3Y3HuGN/URSF2rhdvGBrLQL0QJvsfyxz0vUg051FRwsN9cQjfLULTdB75\n rJHdckDwHJ7MUURTF94L+81SK0fYgRBAZUkBYHqEHZxCYodSmQ4F0M/6bUaJRTmfS9EX\n UY0WB9Q8AuRkojeu9QgZBzVZLbsM7RuGsK9s/diYsMfIrY8qWsW3ElOw7FQ8iqk0sMft\n HtUblSiIddLlbqbXQbrp2PkYrkg55qYl/X/DsyROODlKAyd8tzadaMapAli8X+sl/HWa\n y8hw==",
        "X-Gm-Message-State": "AOJu0Yx4pkO5eiBY4hHH8RUefZ2iCU4bCl/Oey6uN278F+YCzbTF5uR4\n zLKl0Rmsw3skMAvK0FmkUliStd+sAo8TPwb8KMg2+6MYdOXEtjA9gHgfKDtZfU85207cpeQFS6h\n M+JqgMA==",
        "X-Gm-Gg": "AeBDieu+vIj008vkYwpfFOtH7zt/47DN1+M+aO2JQzFSfy2oVG4TpFGuIosmoUcgMh2\n EyMM7AWIaLPlize+XWO7bIe6QqpgVuYwnZ+TJJpc4pOUFFlSK0EqQs9uAxmSCbAYcDwW83QFPCw\n 1UgpUzG/6LaWG0uqq2widwO63CeYkvb2cH7GOW32HUyBDK8Vt3CxC3r/Y1TmPtEqf8mzczLPqXE\n ogbTLvEVKdDn5W9L2kDDrTIFt595IFRTFsi2ttyrjY2y/8Ox2Dc2Feg67Aq+vSFstOOl4CqhNNq\n lCnr+X274cuhjtv9dxPrsyleaefYJUI7KU9MUQOeRa46VgP5iYMwC90bnW9IG80iC/eFCOlNPVr\n 9oyVur54/SHrXSy9+JyBkhkx++9UU5Uomnh9MyH0QP+RTC/xV1Xl/M91TK9nMOyzmpVXG2OGEHF\n yAo5BYmjMtYFI1k5tym+uaxeYrbgdd",
        "X-Received": "by 2002:a05:6830:81f7:b0:7d7:e844:7f4e with SMTP id\n 46e09a7af769-7dc27f1ca2emr5349189a34.22.1775957699069;\n Sat, 11 Apr 2026 18:34:59 -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 <sjg@chromium.org>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>, Marek Vasut <marex@denx.de>",
        "Subject": "[PATCH 00/12] test: Add support for passing arguments to C unit tests",
        "Date": "Sat, 11 Apr 2026 19:34:28 -0600",
        "Message-ID": "<20260412013451.2929001-1-sjg@chromium.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "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": "Some tests have two parts: a Python test which handles setup, such as\ncreating filesystem images or configuring the environment, and a C\ntest which does the bulk of the work including assertions. At present\nthere is no way to pass information between these two parts, so\nthings like paths and device names must be hard-coded in the C test.\n\nThis tends to make people write tests in Python, but this is not ideal\nfor several reasons:\n\n- Python lacks access to things like return codes and has to scan the\n  console output to figure out what happened\n- Python lacks access to internal state, so it cannot directly check\n  the result of an operation\n- Python is ~100x slower due to console interaction, etc.\n- C tests can be stepped through in gdb, which is much harder with\n  Python driving the console\n- C tests can exercise internal APIs directly (e.g. fs_read(),\n  fs_size()) rather than going through the command layer, so they\n  test more precisely what they intend to\n\nThis series adds infrastructure for passing typed, runtime arguments\nfrom Python to C unit tests, using a name=value format on the ut\ncommand line.\n\nThe series includes:\n\n- Regex assertion helpers for matching variable output in tests\n\n- A private buffer in unit_test_state for test-local temporary data\n\n- Argument-type definitions (string, integer, boolean) with optional\n  flags and default values\n\n- A new UNIT_TEST_ARGS() macro for declaring tests with typed\n  arguments\n\n- Argument parsing in the test framework, accepting name=value format\n\n- Updates to the ut command to pass arguments through to tests\n\n- Type-checked accessor macros ut_str(), ut_int(), and ut_bool()\n  with bounds validation\n\n- Tests for the argument feature covering type checking, optional\n  arguments, and argument-parsing failures\n\n- Documentation for the test-parameter feature\n\n- C-based filesystem tests as an example of the hybrid approach,\n  with Python wrappers that pass filesystem type, image path, and\n  expected MD5 values to the C tests\n\n\nSimon Glass (12):\n  test: Add ut_asserteq_regex() for regex pattern matching\n  test: Add a helper to check the next line against a regex\n  test: Add a private buffer for tests\n  test: Add argument-type definitions\n  test: Add a macro to declare unit tests with arguments\n  test: Add support for passing arguments to C tests\n  test: Enhance the ut command to pass test arguments\n  test: Add type-checked argument accessor functions\n  test: Add tests for unit-test arguments\n  test: Add documentation for the test framework\n  test: fs: add C-based filesystem tests\n  test: fs: Update Python tests to call C implementations\n\n arch/sandbox/cpu/spl.c              |   3 +-\n doc/develop/tests_writing.rst       | 169 ++++++++++++\n doc/usage/cmd/ut.rst                |  18 +-\n include/test/fs.h                   |  39 +++\n include/test/test.h                 | 107 ++++++++\n include/test/ut.h                   | 123 ++++++++-\n test/Makefile                       |   1 +\n test/cmd_ut.c                       |  32 ++-\n test/common/Makefile                |   1 +\n test/common/test_args.c             | 176 ++++++++++++\n test/fs/Makefile                    |   3 +\n test/fs/fs_basic.c                  | 407 ++++++++++++++++++++++++++++\n test/py/tests/test_fs/conftest.py   |   4 +-\n test/py/tests/test_fs/test_basic.py | 346 +++++++----------------\n test/test-main.c                    | 170 +++++++++++-\n test/ut.c                           | 117 ++++++++\n 16 files changed, 1437 insertions(+), 279 deletions(-)\n create mode 100644 include/test/fs.h\n create mode 100644 test/common/test_args.c\n create mode 100644 test/fs/Makefile\n create mode 100644 test/fs/fs_basic.c"
}