get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218257,
    "url": "http://patchwork.ozlabs.org/api/patches/2218257/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/kvm-riscv/patch/20260331194202.1722082-6-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-6-vipinsh@google.com>",
    "list_archive_url": null,
    "date": "2026-03-31T19:41:58",
    "name": "[v4,5/9] KVM: selftests: Run tests concurrently in KVM selftests runner",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0f3981968f3d0a607a3bb602897d16659a2c73dd",
    "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-6-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/2218257/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218257/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=Xz7Re44J;\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=mcSDuaNw;\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 4fldmy3drHz1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 06:42:26 +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 1w7eym-0000000DUQY-3rS3;\n\tTue, 31 Mar 2026 19:42:24 +0000",
            "from mail-pf1-x44a.google.com ([2607:f8b0:4864:20::44a])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w7eyl-0000000DUOv-14Vn\n\tfor kvm-riscv@lists.infradead.org;\n\tTue, 31 Mar 2026 19:42:24 +0000",
            "by mail-pf1-x44a.google.com with SMTP id\n d2e1a72fcca58-82c9364612fso10001164b3a.2\n        for <kvm-riscv@lists.infradead.org>;\n Tue, 31 Mar 2026 12:42:22 -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=PxdfncEcoHLJVPg+4ylJBZ7BASy7OrhH/P8uTeU9wN4=; b=Xz7Re44Jk+R8swAbmGL0Xd7B34\n\tNwlitgB3HjwooeJKppGGyIL/fEIZ/qkI4cYjIEFMQGumVJEoll7xSOhgRcLqcRV0XFQVHY6wVG7zt\n\tLxJBkMIe0lSZemgagJ3LSN3j6arb3eOpQEIMWyYxXL9A5SD2k20Ta1oLCiYk9zC5HJgo4Wh40bie8\n\t0UnsAq87gqVDBIX3pjc9HhMWuOFYlaKHwRZuZjXfcngaQyRZSvDdDdIZEbIKsRl3UZeFzses5QSk0\n\tnG8G6CZAgFAIKlZ9nh5gCWTfNczVpE3lP0qm0gsRvk4H/rZ+xQIO3Y7IClfS0B1Fhaik/rClLfVWs\n\ttQCXy8pA==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=google.com; s=20251104; t=1774986142; x=1775590942;\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=moQABiS7cv82z1Yz7qoQD99nIXpPdwRqLpnQn6Ns6AY=;\n        b=mcSDuaNwN2xZ6R7Fz+EyGlSRylCg5sgDlpt/vw+dULZeP5Mm9F/j7B8KVE4D6NT9yn\n         x5eH1F0moDKf1bbAhnWu17gztkLE9QIN/vGjChPj0ylIv5PTyxjPpn1AIMfDyMw52aFa\n         CXrAww66zIss7cO8cJUoY8PeNfBL1hbPrbZuXYkUlYs8pPoMsdrvSoZLzgHXkh2zjVXy\n         i6qw/4qFAGzWVfmLP5K3KCSWM4JALG6N+H9efLmaTzgUdHHQVG5OwGivLx1ytWReaZsM\n         hixO9DbhhgE4jt8yPTbdgOzrV5zNHvCXsuBHb3rCg2xhZ24eFljdKQJsbaHoqSZjdaRa\n         Ggrg=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774986142; x=1775590942;\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=moQABiS7cv82z1Yz7qoQD99nIXpPdwRqLpnQn6Ns6AY=;\n        b=cISLRaRIpUl5EfUsumMoYPQ6y6NXYKYenV6Mxl4YyO5HZiwz3aaYR1JIyELnYUr/vf\n         mRPUuhXtlqiGbYg5FF2qdT/ZRcvGwWHGIlh/VvePsoe6LpOPWsD31ouKSli6UBxYTq6j\n         gR8LIf6XkAyUJ0sKxwB3oIWOPYT40D5RMznCQSqpVaU6+5CIFB+ec6c6JsRleJZT8J4u\n         bJCNmIpbF6h3astugiZpDQ7n+b3k7OC4PpjTNSgCPid3We2c2Qu+dhA9GWOWoUbl9ofc\n         3V02ot9msvef0nEZH7bBWdvpXiALbElY6hSjWhwaIjs9X6O5cyMzkBVPqfjIsVMc3XC6\n         KtLA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVvkFa49eJCWFIxeZuO5t2xifWIOqgG/0NPNrHKzVJcEufqmKRboFWG8bo9IedyXd4CSpAa5E1Lhn0=@lists.infradead.org",
        "X-Gm-Message-State": "AOJu0Ywokh6L9EMzQD26MNgED4jFK71F8PX0CbzPxwADp/kp69/5FzLX\n\tnMvZihTjNw7Kapzr/ZFDXA9kQ9XcIcvigJEvUCTeuMoVvldhbBl7ow6+GbxKPlkYhrfCrYMrAkr\n\tWclo882USvQ==",
        "X-Received": "from pfbjf1.prod.google.com\n ([2002:a05:6a00:6e41:b0:821:82a1:fe7d])\n (user=vipinsh job=prod-delivery.src-stubby-dispatcher) by\n 2002:a05:6a00:600d:b0:827:3946:a23c\n with SMTP id d2e1a72fcca58-82ce88d3bd7mr811773b3a.10.1774986141556; Tue, 31\n Mar 2026 12:42:21 -0700 (PDT)",
        "Date": "Tue, 31 Mar 2026 12:41:58 -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-6-vipinsh@google.com>",
        "Subject": "[PATCH v4 5/9] KVM: selftests: Run tests concurrently in KVM\n selftests 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_124223_296137_0F73ACE3 ",
        "X-CRM114-Status": "GOOD (  11.39  )",
        "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 a command line argument, --jobs,\n to specify how many tests\n    can execute concurrently. Set default to 1. Example: python3 runner\n --test-dirs\n    tests -j 10 Signed-off-by: Vipin Sharma <vipinsh@google.com> ---\n .../testing/selftests/kvm/runner/__main__.py\n    | 6 ++++ .../selftests/kvm/runner/test_runner.py | 28 +++++++++++++------\n    2 files changed, 26 insertio [...]\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:44a 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 a command line argument, --jobs, to specify how many tests can\nexecute concurrently. Set default to 1.\n\nExample:\n  python3 runner --test-dirs tests -j 10\n\nSigned-off-by: Vipin Sharma <vipinsh@google.com>\n---\n .../testing/selftests/kvm/runner/__main__.py  |  6 ++++\n .../selftests/kvm/runner/test_runner.py       | 28 +++++++++++++------\n 2 files changed, 26 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/tools/testing/selftests/kvm/runner/__main__.py b/tools/testing/selftests/kvm/runner/__main__.py\nindex 5ea5ee8957c4..96402c89aea9 100644\n--- a/tools/testing/selftests/kvm/runner/__main__.py\n+++ b/tools/testing/selftests/kvm/runner/__main__.py\n@@ -54,6 +54,12 @@ def cli():\n                         default=False,\n                         help=\"Appends timestamp to the output directory.\")\n \n+    parser.add_argument(\"-j\",\n+                        \"--jobs\",\n+                        default=1,\n+                        type=int,\n+                        help=\"Maximum number of tests that can be run concurrently. (Default: 1)\")\n+\n     return parser.parse_args()\n \n \ndiff --git a/tools/testing/selftests/kvm/runner/test_runner.py b/tools/testing/selftests/kvm/runner/test_runner.py\nindex b9101f0e0432..92eec18fe5c6 100644\n--- a/tools/testing/selftests/kvm/runner/test_runner.py\n+++ b/tools/testing/selftests/kvm/runner/test_runner.py\n@@ -4,6 +4,8 @@\n # Author: vipinsh@google.com (Vipin Sharma)\n \n import logging\n+import concurrent.futures\n+\n from selftest import Selftest\n from selftest import SelftestStatus\n \n@@ -14,11 +16,16 @@ class TestRunner:\n     def __init__(self, testcases, args):\n         self.tests = []\n         self.output_dir = args.output\n+        self.jobs = args.jobs\n \n         for testcase in testcases:\n             self.tests.append(Selftest(testcase, args.path, args.timeout,\n                                        args.output))\n \n+    def _run_test(self, test):\n+        test.run()\n+        return test\n+\n     def _log_result(self, test_result):\n         logger.info(\"*** stdout ***\\n\" + test_result.stdout)\n         logger.info(\"*** stderr ***\\n\" + test_result.stderr)\n@@ -28,12 +35,17 @@ class TestRunner:\n     def start(self):\n         ret = 0\n \n-        for test in self.tests:\n-            test.run()\n-            self._log_result(test)\n-\n-            if (test.status not in [SelftestStatus.PASSED,\n-                                    SelftestStatus.NO_RUN,\n-                                    SelftestStatus.SKIPPED]):\n-                ret = 1\n+        with concurrent.futures.ProcessPoolExecutor(max_workers=self.jobs) as executor:\n+            all_futures = []\n+            for test in self.tests:\n+                future = executor.submit(self._run_test, test)\n+                all_futures.append(future)\n+\n+            for future in concurrent.futures.as_completed(all_futures):\n+                test_result = future.result()\n+                self._log_result(test_result)\n+                if (test_result.status not in [SelftestStatus.PASSED,\n+                                               SelftestStatus.NO_RUN,\n+                                               SelftestStatus.SKIPPED]):\n+                    ret = 1\n         return ret\n",
    "prefixes": [
        "v4",
        "5/9"
    ]
}