get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808937,
    "url": "http://patchwork.ozlabs.org/api/patches/808937/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901180340.30009-23-eblake@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170901180340.30009-23-eblake@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-01T18:03:33",
    "name": "[v6,22/29] tests/boot-sector: Drop dependence on global_qtest",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e144a8b9df6325be85d0be7370478fe2c1f67389",
    "submitter": {
        "id": 6591,
        "url": "http://patchwork.ozlabs.org/api/people/6591/?format=api",
        "name": "Eric Blake",
        "email": "eblake@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901180340.30009-23-eblake@redhat.com/mbox/",
    "series": [
        {
            "id": 1089,
            "url": "http://patchwork.ozlabs.org/api/series/1089/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1089",
            "date": "2017-09-01T18:03:12",
            "name": "Preliminary libqtest cleanups",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/1089/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808937/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808937/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx09.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=eblake@redhat.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkSNQ5Sm6z9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 04:25:41 +1000 (AEST)",
            "from localhost ([::1]:53467 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnqdO-0002aT-QX\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 14:25:38 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:56229)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnqIs-0007Vh-N9\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 14:04:27 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <eblake@redhat.com>) id 1dnqIn-0001xe-Rp\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 14:04:26 -0400",
            "from mx1.redhat.com ([209.132.183.28]:49536)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dnqIn-0001wQ-IT\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 14:04:21 -0400",
            "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 8E57A68B3;\n\tFri,  1 Sep 2017 18:04:20 +0000 (UTC)",
            "from red.redhat.com (ovpn-121-149.rdu2.redhat.com [10.10.121.149])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id F23D0627DE;\n\tFri,  1 Sep 2017 18:04:16 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 8E57A68B3",
        "From": "Eric Blake <eblake@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Fri,  1 Sep 2017 13:03:33 -0500",
        "Message-Id": "<20170901180340.30009-23-eblake@redhat.com>",
        "In-Reply-To": "<20170901180340.30009-1-eblake@redhat.com>",
        "References": "<20170901180340.30009-1-eblake@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]);\n\tFri, 01 Sep 2017 18:04:20 +0000 (UTC)",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "209.132.183.28",
        "Subject": "[Qemu-devel] [PATCH v6 22/29] tests/boot-sector: Drop dependence on\n\tglobal_qtest",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "pbonzini@redhat.com, Igor Mammedov <imammedo@redhat.com>,\n\tarmbru@redhat.com, Ben Warren <ben@skyportsystems.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "As a general rule, we prefer avoiding implicit global state\nbecause it makes code harder to safely copy and paste without\nthinking about the global state.  Adjust the helper code to\nuse explicit state instead, and update all callers.\n\nFix some trailing whitespace while touching the file.\n\nSigned-off-by: Eric Blake <eblake@redhat.com>\n---\n tests/boot-sector.h      | 6 ++++--\n tests/bios-tables-test.c | 2 +-\n tests/boot-sector.c      | 8 ++++----\n tests/pxe-test.c         | 2 +-\n tests/vmgenid-test.c     | 2 +-\n 5 files changed, 11 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/tests/boot-sector.h b/tests/boot-sector.h\nindex 35d61c7e2b..6ee6bb4d97 100644\n--- a/tests/boot-sector.h\n+++ b/tests/boot-sector.h\n@@ -5,7 +5,7 @@\n  *\n  * Authors:\n  *  Michael S. Tsirkin <mst@redhat.com>\n- *  Victor Kaplansky <victork@redhat.com>    \n+ *  Victor Kaplansky <victork@redhat.com>\n  *\n  * This work is licensed under the terms of the GNU GPL, version 2 or later.\n  * See the COPYING file in the top-level directory.\n@@ -14,11 +14,13 @@\n #ifndef TEST_BOOT_SECTOR_H\n #define TEST_BOOT_SECTOR_H\n\n+#include \"libqtest.h\"\n+\n /* Create boot disk file. fname must be a suitable string for mkstemp() */\n int boot_sector_init(char *fname);\n\n /* Loop until signature in memory is OK.  */\n-void boot_sector_test(void);\n+void boot_sector_test(QTestState *qts);\n\n /* unlink boot disk file.  */\n void boot_sector_cleanup(const char *fname);\ndiff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c\nindex 564da45f65..bde62bf1cf 100644\n--- a/tests/bios-tables-test.c\n+++ b/tests/bios-tables-test.c\n@@ -632,7 +632,7 @@ static void test_acpi_one(const char *params, test_data *data)\n\n     qtest_start(args);\n\n-    boot_sector_test();\n+    boot_sector_test(global_qtest);\n\n     test_acpi_rsdp_address(data);\n     test_acpi_rsdp_table(data);\ndiff --git a/tests/boot-sector.c b/tests/boot-sector.c\nindex 9ee85370b0..8c8ac7f124 100644\n--- a/tests/boot-sector.c\n+++ b/tests/boot-sector.c\n@@ -5,7 +5,7 @@\n  *\n  * Authors:\n  *  Michael S. Tsirkin <mst@redhat.com>\n- *  Victor Kaplansky <victork@redhat.com>    \n+ *  Victor Kaplansky <victork@redhat.com>\n  *\n  * This work is licensed under the terms of the GNU GPL, version 2 or later.\n  * See the COPYING file in the top-level directory.\n@@ -130,7 +130,7 @@ int boot_sector_init(char *fname)\n }\n\n /* Loop until signature in memory is OK.  */\n-void boot_sector_test(void)\n+void boot_sector_test(QTestState *qts)\n {\n     uint8_t signature_low;\n     uint8_t signature_high;\n@@ -146,8 +146,8 @@ void boot_sector_test(void)\n      * instruction.\n      */\n     for (i = 0; i < TEST_CYCLES; ++i) {\n-        signature_low = readb(SIGNATURE_ADDR);\n-        signature_high = readb(SIGNATURE_ADDR + 1);\n+        signature_low = qtest_readb(qts, SIGNATURE_ADDR);\n+        signature_high = qtest_readb(qts, SIGNATURE_ADDR + 1);\n         signature = (signature_high << 8) | signature_low;\n         if (signature == SIGNATURE) {\n             break;\ndiff --git a/tests/pxe-test.c b/tests/pxe-test.c\nindex 0d70afccd6..e2d3853534 100644\n--- a/tests/pxe-test.c\n+++ b/tests/pxe-test.c\n@@ -31,7 +31,7 @@ static void test_pxe_one(const char *params, bool ipv6)\n                            ipv6 ? \"on\" : \"off\", params);\n\n     qtest_start(args);\n-    boot_sector_test();\n+    boot_sector_test(global_qtest);\n     qtest_quit(global_qtest);\n     g_free(args);\n }\ndiff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c\nindex 3d5c1c3615..4bdc8a15e7 100644\n--- a/tests/vmgenid-test.c\n+++ b/tests/vmgenid-test.c\n@@ -47,7 +47,7 @@ static uint32_t acpi_find_vgia(void)\n     int i;\n\n     /* Wait for guest firmware to finish and start the payload. */\n-    boot_sector_test();\n+    boot_sector_test(global_qtest);\n\n     /* Tables should be initialized now. */\n     rsdp_offset = acpi_find_rsdp_address();\n",
    "prefixes": [
        "v6",
        "22/29"
    ]
}