get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218254,
    "url": "http://patchwork.ozlabs.org/api/patches/2218254/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260331194202.1722082-3-vipinsh@google.com/",
    "project": {
        "id": 70,
        "url": "http://patchwork.ozlabs.org/api/projects/70/?format=api",
        "name": "Linux KVM RISC-V",
        "link_name": "kvm-riscv",
        "list_id": "kvm-riscv.lists.infradead.org",
        "list_email": "kvm-riscv@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "http://lists.infradead.org/pipermail/kvm-riscv/",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260331194202.1722082-3-vipinsh@google.com>",
    "list_archive_url": null,
    "date": "2026-03-31T19:41:55",
    "name": "[v4,2/9] KVM: selftests: Provide executables path option to the KVM selftest runner",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b480f3293d0be01f74be4ccdfb97702b29e4df8e",
    "submitter": {
        "id": 86282,
        "url": "http://patchwork.ozlabs.org/api/people/86282/?format=api",
        "name": "Vipin Sharma",
        "email": "vipinsh@google.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260331194202.1722082-3-vipinsh@google.com/mbox/",
    "series": [
        {
            "id": 498244,
            "url": "http://patchwork.ozlabs.org/api/series/498244/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/list/?series=498244",
            "date": "2026-03-31T19:41:53",
            "name": "KVM: selftests: Create KVM selftests runner",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/498244/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218254/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218254/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=kC8efRlw;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256\n header.s=20251104 header.b=B8zFQLjL;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4fldmx009Nz1yHD\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 06:42:21 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7eyh-0000000DUNY-3pHl;\n\tTue, 31 Mar 2026 19:42:19 +0000",
            "from mail-pl1-x64a.google.com ([2607:f8b0:4864:20::64a])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7eyf-0000000DULo-2kVe\n\tfor kvm-riscv@lists.infradead.org;\n\tTue, 31 Mar 2026 19:42:18 +0000",
            "by mail-pl1-x64a.google.com with SMTP id\n d9443c01a7336-2b249541063so31964375ad.3\n        for <kvm-riscv@lists.infradead.org>;\n Tue, 31 Mar 2026 12:42:17 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID:\n\tReferences:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Owner;\n\tbh=8ULEXUPklnWTetqY+rw+6+1lXkJPaOA8XLEvrOcD/BY=; b=kC8efRlwRYxqCMqoo+cmIXx/H3\n\tWd7QrbV8n9wZx/TiHnGz3VelCHcZHgs/3v+y2BTx9VSm3+lXWm/f0Szfw8QGUZP87dmFsuInlfWAj\n\taWueJHNokKE2reYjbF3YGxNs38ugb+12GqCWIyB+KrZM7EDAdJqp7Z3onitQ3hZtY1t0LLlwN9JIm\n\tNnDw0/0jwKEZdv8Sbd/nHCxk0nIxk4jnv9Ju5NtTBlqTZlxJYp4Arg8tMoLI+exXmFqmQnvkgPexj\n\tcnF/9HM78b8eMODm5NVoKcustAkbm0Du/ijTG21Pp3AszZwv8eegn8usfJEmAHpZzdLGmtcmPS4tD\n\tLvb3O+XA==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1774986136; x=1775590936;\n darn=lists.infradead.org;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:from:to:cc:subject:date:message-id:reply-to;\n        bh=okyRWg6SJ1Nbhs5yC14NmJAon29R3bVuhvecgVY39ps=;\n        b=B8zFQLjLv4FH0W/NQdatOkyDLLnxcb3wYl++HLIoVjkzQ3dYlWmEK7a2Bwyre7W1+v\n         sovmrazy2SmjLmK4Xu3ATkwEAoMWC7KzSVXd2Fw6DK1mxd3AyZ1098NA7oC0jKEV3FUC\n         rJt2crfXDsxBqCgFWS7S8XWijXwt0QXgNrsNkIPjvruNYEDppR7O4iwLTFyTY955CHpy\n         gRiazwfyGc26L2Pe8TjNwXISu37uxjIsjYkI0SfEw1yiuRV33yUHt1fsBfgnnfIMK6cv\n         Vy3LOTmgWvYfScF9XKTYEA9Ht8Budhzxk2e6O/xzkekNiU+nDH0tGcw6LkZ8Upzv8xNg\n         49wA=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774986136; x=1775590936;\n        h=cc:to:from:subject:message-id:references:mime-version:in-reply-to\n         :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n        bh=okyRWg6SJ1Nbhs5yC14NmJAon29R3bVuhvecgVY39ps=;\n        b=NvzAQL/X/iYVEZaDMpZh3uG34dC1p2vccnB5zWY9CC2PxdKG4JovogcvGBjaV4TFDc\n         H8dtNSsxQfjuKglGief1FwJCVtquTIc8zinN+SOQcNyhvKlXQ23lq1K8v2ufACOlxE/m\n         vMmULs9N4bQ59JolzLskln1FjlX8Ys+2fAdjhjM72Va6WUOY7R5olZW5rHLKIsEF/P9X\n         8qZi5pq2K0/qcRTUisx8Rr6m2eTWmOv/0Z/W0Ca+NV6CDO6BSEH4Y4RcIplTO1hYgu9I\n         lH/gwrjDZm8EulwimHKY5qLxztoUDuJrAtXA2fiTDJ6YQZpAa+xSS+NvNJzuoDtIwYgC\n         /PPQ==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCU4KU77WKvk8k0fL3ufJW3ACTMzYtc6G9T0abLy+elLlncTpYtTQlJqlMkMSLLPbyqcqwpwnMlsAGM=@lists.infradead.org",
        "X-Gm-Message-State": "AOJu0Yw6NFm5wV5HKgMvYqGmErkgjbNSCfoE5KJ4NQuyh/zSP/KL2yAc\n\t/lDeysQ3IaWgqq9fH/WxXMJi5dDND/bLLO6ESxQUsByKlmA/N2g9UStusVQPXcp95wp2f+5zdpB\n\tV3rqeUaBzAQ==",
        "X-Received": "from plbmm7.prod.google.com ([2002:a17:903:a07:b0:2b0:4b14:f0e9])\n (user=vipinsh job=prod-delivery.src-stubby-dispatcher) by\n 2002:a17:903:fb0:b0:2ae:5eee:7a5\n with SMTP id d9443c01a7336-2b269aca7a0mr4064425ad.12.1774986135979; Tue, 31\n Mar 2026 12:42:15 -0700 (PDT)",
        "Date": "Tue, 31 Mar 2026 12:41:55 -0700",
        "In-Reply-To": "<20260331194202.1722082-1-vipinsh@google.com>",
        "Mime-Version": "1.0",
        "References": "<20260331194202.1722082-1-vipinsh@google.com>",
        "X-Mailer": "git-send-email 2.53.0.1118.gaef5881109-goog",
        "Message-ID": "<20260331194202.1722082-3-vipinsh@google.com>",
        "Subject": "[PATCH v4 2/9] KVM: selftests: Provide executables path option to the\n KVM selftest runner",
        "From": "Vipin Sharma <vipinsh@google.com>",
        "To": "kvm@vger.kernel.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org",
        "Cc": "seanjc@google.com, pbonzini@redhat.com, borntraeger@linux.ibm.com,\n\tfrankja@linux.ibm.com, imbrenda@linux.ibm.com, anup@brainfault.org,\n\tatish.patra@linux.dev, zhaotianrui@loongson.cn, maobibo@loongson.cn,\n\tchenhuacai@kernel.org, maz@kernel.org, oliver.upton@linux.dev,\n\tajones@ventanamicro.com, Vipin Sharma <vipinsh@google.com>",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260331_124217_717543_6363944A ",
        "X-CRM114-Status": "GOOD (  11.42  )",
        "X-Spam-Score": "-9.5 (---------)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Add command line option, -p/--path,\n to specify the directory\n    where test binaries exist. If this option is not provided then default to\n    the current directory. Example: python3 runner --dirs test -p\n ~/build/selftests    \n Content analysis details:   (-9.5 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:64a listed in]\n                             [list.dnswl.org]\n -7.5 USER_IN_DEF_DKIM_WL    From: address is in the default DKIM welcome-list\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.0 DKIMWL_WL_MED          DKIMwl.org - Medium trust sender",
        "X-BeenThere": "kvm-riscv@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<kvm-riscv.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/kvm-riscv/>",
        "List-Post": "<mailto:kvm-riscv@lists.infradead.org>",
        "List-Help": "<mailto:kvm-riscv-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/kvm-riscv>,\n <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"kvm-riscv\" <kvm-riscv-bounces@lists.infradead.org>",
        "Errors-To": "kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Add command line option, -p/--path, to specify the directory where\ntest binaries exist. If this option is not provided then default\nto the current directory.\n\nExample:\n  python3 runner --dirs test -p ~/build/selftests\n\nThis option enables executing tests from out-of-tree builds.\n\nSigned-off-by: Vipin Sharma <vipinsh@google.com>\n---\n tools/testing/selftests/kvm/runner/__main__.py    | 8 +++++++-\n tools/testing/selftests/kvm/runner/selftest.py    | 4 ++--\n tools/testing/selftests/kvm/runner/test_runner.py | 4 ++--\n 3 files changed, 11 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/tools/testing/selftests/kvm/runner/__main__.py b/tools/testing/selftests/kvm/runner/__main__.py\nindex db87f426331d..9b6c78e69c64 100644\n--- a/tools/testing/selftests/kvm/runner/__main__.py\n+++ b/tools/testing/selftests/kvm/runner/__main__.py\n@@ -31,6 +31,12 @@ def cli():\n                         default=[],\n                         help=\"Run the testcases present in the given directory and all of its sub directories. Provide the space separated paths to add multiple directories.\")\n \n+    parser.add_argument(\"-p\",\n+                        \"--path\",\n+                        nargs='?',\n+                        default=\".\",\n+                        help=\"Finds the test executables in the given path. Default is the current directory.\")\n+\n     return parser.parse_args()\n \n \n@@ -87,7 +93,7 @@ def main():\n     args = cli()\n     setup_logging()\n     testcases = fetch_testcases(args)\n-    return TestRunner(testcases).start()\n+    return TestRunner(testcases, args).start()\n \n \n if __name__ == \"__main__\":\ndiff --git a/tools/testing/selftests/kvm/runner/selftest.py b/tools/testing/selftests/kvm/runner/selftest.py\nindex 5a86f9ceedd4..c1720897c629 100644\n--- a/tools/testing/selftests/kvm/runner/selftest.py\n+++ b/tools/testing/selftests/kvm/runner/selftest.py\n@@ -28,12 +28,12 @@ class Selftest:\n     Extract the test execution command from test file and executes it.\n     \"\"\"\n \n-    def __init__(self, test_path):\n+    def __init__(self, test_path, path):\n         test_command = pathlib.Path(test_path).read_text().strip()\n         if not test_command:\n             raise ValueError(\"Empty test command in \" + test_path)\n \n-        test_command = os.path.join(\".\", test_command)\n+        test_command = os.path.join(path, test_command)\n         self.exists = os.path.isfile(test_command.split(maxsplit=1)[0])\n         self.test_path = test_path\n         self.command = test_command\ndiff --git a/tools/testing/selftests/kvm/runner/test_runner.py b/tools/testing/selftests/kvm/runner/test_runner.py\nindex 4418777d75e3..acc9fb3dabde 100644\n--- a/tools/testing/selftests/kvm/runner/test_runner.py\n+++ b/tools/testing/selftests/kvm/runner/test_runner.py\n@@ -11,11 +11,11 @@ logger = logging.getLogger(\"runner\")\n \n \n class TestRunner:\n-    def __init__(self, testcases):\n+    def __init__(self, testcases, args):\n         self.tests = []\n \n         for testcase in testcases:\n-            self.tests.append(Selftest(testcase))\n+            self.tests.append(Selftest(testcase, args.path))\n \n     def _log_result(self, test_result):\n         logger.info(\"*** stdout ***\\n\" + test_result.stdout)\n",
    "prefixes": [
        "v4",
        "2/9"
    ]
}