get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139092,
    "url": "http://patchwork.dpdk.org/api/patches/139092/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240403221319.499014-3-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240403221319.499014-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240403221319.499014-3-stephen@networkplumber.org",
    "date": "2024-04-03T22:11:08",
    "name": "[v2,2/2] test: add functional test for uuid",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "053c3fc6a4e4b2ebbcec3d487e3fd7fbc24f170f",
    "submitter": {
        "id": 27,
        "url": "http://patchwork.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240403221319.499014-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31674,
            "url": "http://patchwork.dpdk.org/api/series/31674/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31674",
            "date": "2024-04-03T22:11:06",
            "name": "uuid: add generate functions and tests",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/31674/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/139092/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/139092/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A7F2043DF1;\n\tThu,  4 Apr 2024 00:13:43 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 68C9C402F1;\n\tThu,  4 Apr 2024 00:13:35 +0200 (CEST)",
            "from mail-pj1-f49.google.com (mail-pj1-f49.google.com\n [209.85.216.49]) by mails.dpdk.org (Postfix) with ESMTP id 99FD7402E3\n for <dev@dpdk.org>; Thu,  4 Apr 2024 00:13:32 +0200 (CEST)",
            "by mail-pj1-f49.google.com with SMTP id\n 98e67ed59e1d1-2a074187a42so234923a91.0\n for <dev@dpdk.org>; Wed, 03 Apr 2024 15:13:32 -0700 (PDT)",
            "from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])\n by smtp.gmail.com with ESMTPSA id\n 1-20020a17090a0f0100b002a261d1da0dsm224218pjy.24.2024.04.03.15.13.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 03 Apr 2024 15:13:31 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712182412;\n x=1712787212; darn=dpdk.org;\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=Q+LQEw2nT/iZn580xWJEOTpT6bMAqfC/BtHS/Kzliig=;\n b=mQ0AJwifxaD2dNZD5IqEEu/ooTVN/UUt5Iy0uTf4HALVZ9AXrEyv6MubSII3lxe2Ed\n PYuZvfJPyKGJSkC2Es79bubffn3IpSFQz4dPqu1aYy2QOVC8QX0m7mUuqOzWWdySLYoC\n ngFyGoFjZaGvAAqQ4Nf9g1vbfkWoQ8eBsXTYSH1z+B3r70ZGcGKzdZYu7pYumW2h7rP0\n TLOWksyBTTWsC1QAIwvMPXQMQGfcxAPVRQG3ruI/Mo+LH2mnq1F4MzchCZsx7Sl9LsZK\n EPnJQi9HKPjZqiJORFRM0tDX1PzWXT4q8Cbz8VR7vzBE6fOJraFbHyJWs4P/zFEoh9P6\n oPQg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1712182412; x=1712787212;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=Q+LQEw2nT/iZn580xWJEOTpT6bMAqfC/BtHS/Kzliig=;\n b=KDWuGme718lx2AH10H1ESQb7iEafLCfRPkD5kDum5cYv2guPHuG0BSR6zsnaK8aLtl\n Fdfc2FCrE+A2bKWpx9zT6l8GO4vO5tvHgoE1K+GVAc0EEo4C5dCl0DNYwIuszKy75wbK\n ORLey3moSkkdS3JjRAv6xudMht9OibZlMmB4E8vREUC/IPJ3rJPzbI3ATdWyEinIKNxL\n bJWkZihuwbh4BpYvpI/wU92fHiPxSTODEYo07J644gAcR8RPlOaK6Hf5LSQAaYbd8I+q\n qdXfvqOklLD6eo0EYDmhNywEKO0Ul4QDSFTYBLGdUm0F0hVsBZSdsvFMIs3Pi0ZV9hPm\n uKEQ==",
        "X-Gm-Message-State": "AOJu0Yz1eK4YqLNwjW2T4kJvXMpgxhUyuWi7/hUaurcHgScvpeK8uWC2\n /awUP5hBscdjwqM3+h9XxeYaPXmoOqjX6KyY9o3RyZYwjVw1TpYr0Ds0IckoHOUWhr4xW6366fz\n Bx84TOQ==",
        "X-Google-Smtp-Source": "\n AGHT+IFTz/IXAXDhojfq7996pVlZX/8IlUkjGMRQP1iuL5IpUtcABwXYXVtDHRggxMJWIwpT3Dc0tQ==",
        "X-Received": "by 2002:a17:90a:f417:b0:29b:b163:181a with SMTP id\n ch23-20020a17090af41700b0029bb163181amr809629pjb.42.1712182411708;\n Wed, 03 Apr 2024 15:13:31 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v2 2/2] test: add functional test for uuid",
        "Date": "Wed,  3 Apr 2024 15:11:08 -0700",
        "Message-ID": "<20240403221319.499014-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240403221319.499014-1-stephen@networkplumber.org>",
        "References": "<20240403163432.437275-1-stephen@networkplumber.org>\n <20240403221319.499014-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "The uuid functions in EAL were not covered by existing functional\ntests.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n app/test/meson.build |   1 +\n app/test/test_uuid.c | 135 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 136 insertions(+)\n create mode 100644 app/test/test_uuid.c",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 7d909039ae..11fb7dbffa 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -198,6 +198,7 @@ source_file_deps = {\n     'test_trace.c': [],\n     'test_trace_perf.c': [],\n     'test_trace_register.c': [],\n+    'test_uuid.c' : [],\n     'test_vdev.c': ['kvargs', 'bus_vdev'],\n     'test_version.c': [],\n }\ndiff --git a/app/test/test_uuid.c b/app/test/test_uuid.c\nnew file mode 100644\nindex 0000000000..669ed82243\n--- /dev/null\n+++ b/app/test/test_uuid.c\n@@ -0,0 +1,135 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2024 Stephen Hemminger\n+ */\n+\n+#include <rte_uuid.h>\n+\n+#include \"test.h\"\n+\n+#define NROUNDS 100\n+\n+static int\n+check_duplicate_uuid(rte_uuid_t uids[])\n+{\n+\tint i, j;\n+\tchar out[256];\n+\n+\tfor (i = 0; i < NROUNDS - 1; i++) {\n+\t\tfor (j = i + 1; j < NROUNDS; j++) {\n+\t\t\tif (rte_uuid_compare(uids[i], uids[j]) == 0) {\n+\t\t\t\trte_uuid_unparse(uids[i], out, sizeof(out));\n+\t\t\t\tprintf(\"Generated duplicate random uuids %d == %d : %s\\n\",\n+\t\t\t\t       i, j, out);\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\t\t}\n+\t}\n+\treturn TEST_SUCCESS;\n+}\n+\n+\n+static const struct uuid_case {\n+\tconst char *in;\n+\trte_uuid_t result;\n+} good_cases[] = {\n+\t{ \"02ce8e94-5b84-47fc-8f86-72633c5b5061\", RTE_UUID_INIT(0x02ce8e94, 0x5b84, 0x47fc, 0x8f86, 0x72633c5b5061) },\n+\t{ \"2c72af87-d220-4931-98ec-45c8520c94e1\", RTE_UUID_INIT(0x2c72af87, 0xd220, 0x4931, 0x98ec, 0x45c8520c94e1) },\n+\t{ \"441edca1-0942-4ccd-9b33-233e0454fe5b\", RTE_UUID_INIT(0x441edca1, 0x0942, 0x4ccd, 0x9b33, 0x233e0454fe5b) },\n+};\n+\n+static const char * const bad_cases[] = {\n+\t\"\",\t\t\t\t\t/* empty */\n+\t\"41edca1-0942-4ccd-9b33-233e0454fe5b\",  /* too short */\n+\t\"d5cecbac-531b-4527-b0629-2bc3011dc9c\", /* hyphen in wrong place */\n+\t\"db318745-1347-4f5e-m142-d86dc41172b2\", /* bad hex */\n+};\n+\n+static int\n+test_uuid(void)\n+{\n+\trte_uuid_t uids[NROUNDS] = { };\n+\trte_uuid_t clone[NROUNDS] = { };\n+\tunsigned int i;\n+\tint ret;\n+\n+\t/* Test generate random uuid */\n+\tfor (i = 0; i < NROUNDS; i++) {\n+\t\tif (!rte_uuid_is_null(uids[i])) {\n+\t\t\tprintf(\"Zero'd uuid %d is not null\\n\", i);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\n+\t\trte_uuid_generate_random(uids[i]);\n+\n+\t\tif (rte_uuid_is_null(uids[i])) {\n+\t\t\tprintf(\"Generated random uuid %d is null\\n\", i);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\tret = check_duplicate_uuid(uids);\n+\tif (ret != TEST_SUCCESS)\n+\t\treturn ret;\n+\n+\t/* Test generate time */\n+\tfor (i = 0; i < NROUNDS; i++) {\n+\t\trte_uuid_generate_time(uids[i]);\n+\n+\t\tif (rte_uuid_is_null(uids[i])) {\n+\t\t\tprintf(\"Generated random uuid %d is null\\n\", i);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\n+\t/* Test that copy works */\n+\tfor (i = 0; i < NROUNDS; i++) {\n+\t\tif (!rte_uuid_is_null(clone[i])) {\n+\t\t\tprintf(\"Zero'd clone %d is not null\\n\", i);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\n+\t\trte_uuid_copy(clone[i], uids[i]);\n+\n+\t\tif (rte_uuid_compare(uids[i], clone[i]) != 0) {\n+\t\t\tprintf(\"Copied uuid does not match\\n\");\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\tfor (i = 0; i < RTE_DIM(good_cases); i++) {\n+\t\tconst struct uuid_case *c = &good_cases[i];\n+\t\tchar out[37];\n+\t\trte_uuid_t uu;\n+\n+\t\tif (rte_uuid_parse(c->in, uu) != 0) {\n+\t\t\tprintf(\"Failed to parse '%s'\\n\", c->in);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t\tif (rte_uuid_compare(uu, c->result) != 0) {\n+\t\t\tprintf(\"Parse mismatch for '%s'\\n\", c->in);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\n+\t\trte_uuid_unparse(uu, out, sizeof(out));\n+\t\tif (strcmp(out, c->in) != 0) {\n+\t\t\tprintf(\"Parse/unparse mismatch (%s != %s)\\n\",\n+\t\t\t       out, c->in);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\tfor (i = 0; i < RTE_DIM(bad_cases); i++) {\n+\t\tconst char *s = bad_cases[i];\n+\t\trte_uuid_t uu;\n+\n+\t\tif (rte_uuid_parse(s, uu) == 0) {\n+\t\t\tprintf(\"Accepted parse of '%s'\\n\", s);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\treturn TEST_SUCCESS;\n+}\n+\n+\n+REGISTER_FAST_TEST(uuid_autotest, true, true, test_uuid);\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}