get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67259,
    "url": "http://patchwork.dpdk.org/api/patches/67259/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200327080955.19571-2-olivier.matz@6wind.com/",
    "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": "<20200327080955.19571-2-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200327080955.19571-2-olivier.matz@6wind.com",
    "date": "2020-03-27T08:09:53",
    "name": "[v2,1/3] tests/kvargs: fix to consider empty elements as valid",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "428d3241edc687e319c8f730885b944df2ef3bb9",
    "submitter": {
        "id": 8,
        "url": "http://patchwork.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200327080955.19571-2-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 9072,
            "url": "http://patchwork.dpdk.org/api/series/9072/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9072",
            "date": "2020-03-27T08:09:53",
            "name": "kvargs fixes",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/9072/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/67259/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/67259/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 33316A057C;\n\tFri, 27 Mar 2020 09:10:49 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EB3A31C030;\n\tFri, 27 Mar 2020 09:10:47 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 3DBB71C028;\n Fri, 27 Mar 2020 09:10:46 +0100 (CET)",
            "from glumotte.dev.6wind.com. (unknown [10.16.0.195])\n by proxy.6wind.com (Postfix) with ESMTP id 0B76E3B1DF3;\n Fri, 27 Mar 2020 09:10:46 +0100 (CET)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "wangyunjian@huawei.com",
        "Cc": "dev@dpdk.org, jerry.lilijun@huawei.com, olivier.matz@6wind.com,\n stable@dpdk.org, xudingke@huawei.com",
        "Date": "Fri, 27 Mar 2020 09:09:53 +0100",
        "Message-Id": "<20200327080955.19571-2-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200327080955.19571-1-olivier.matz@6wind.com>",
        "References": "<1584592680-14000-1-git-send-email-wangyunjian@huawei.com>\n <20200327080955.19571-1-olivier.matz@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 1/3] tests/kvargs: fix to consider empty\n\telements as valid",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Empty elements passed to the kvargs parser are silently\nignored. Examples of valid strings:\n  \"\"\n  \",\"\n  \",,,,,,key=val,,,,\"\n\nFix the unit tests to conform to this behavior.\n\nNote: the test_invalid_kvargs() function is currently broken, which\nexplain why the tests were not failing. It is fixed in the next commit.\n\nFixes: e495f5435524 (\"kvargs: add test case in app/test\")\nCc: stable@dpdk.org\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test/test_kvargs.c | 37 +++++++++++++++++++++++++++++++++++--\n 1 file changed, 35 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c\nindex a42056f36..d3db88a57 100644\n--- a/app/test/test_kvargs.c\n+++ b/app/test/test_kvargs.c\n@@ -142,7 +142,7 @@ static int test_valid_kvargs(void)\n \tvalid_keys = valid_keys_list;\n \tkvlist = rte_kvargs_parse(args, valid_keys);\n \tif (kvlist == NULL) {\n-\t\tprintf(\"rte_kvargs_parse() error\");\n+\t\tprintf(\"rte_kvargs_parse() error\\n\");\n \t\tgoto fail;\n \t}\n \tif (strcmp(kvlist->pairs[0].value, \"[0,1]\") != 0) {\n@@ -157,6 +157,40 @@ static int test_valid_kvargs(void)\n \t}\n \trte_kvargs_free(kvlist);\n \n+\t/* test using empty string (it is valid) */\n+\targs = \"\";\n+\tkvlist = rte_kvargs_parse(args, NULL);\n+\tif (kvlist == NULL) {\n+\t\tprintf(\"rte_kvargs_parse() error\\n\");\n+\t\tgoto fail;\n+\t}\n+\tif (rte_kvargs_count(kvlist, NULL) != 0) {\n+\t\tprintf(\"invalid count value\\n\");\n+\t\tgoto fail;\n+\t}\n+\trte_kvargs_free(kvlist);\n+\n+\t/* test using empty elements (it is valid) */\n+\targs = \"foo=1,,check=value2,,\";\n+\tkvlist = rte_kvargs_parse(args, NULL);\n+\tif (kvlist == NULL) {\n+\t\tprintf(\"rte_kvargs_parse() error\\n\");\n+\t\tgoto fail;\n+\t}\n+\tif (rte_kvargs_count(kvlist, NULL) != 2) {\n+\t\tprintf(\"invalid count value\\n\");\n+\t\tgoto fail;\n+\t}\n+\tif (rte_kvargs_count(kvlist, \"foo\") != 1) {\n+\t\tprintf(\"invalid count value for 'foo'\\n\");\n+\t\tgoto fail;\n+\t}\n+\tif (rte_kvargs_count(kvlist, \"check\") != 1) {\n+\t\tprintf(\"invalid count value for 'check'\\n\");\n+\t\tgoto fail;\n+\t}\n+\trte_kvargs_free(kvlist);\n+\n \treturn 0;\n \n  fail:\n@@ -179,7 +213,6 @@ static int test_invalid_kvargs(void)\n \tconst char *args_list[] = {\n \t\t\"wrong-key=x\",     /* key not in valid_keys_list */\n \t\t\"foo=1,foo=\",      /* empty value */\n-\t\t\"foo=1,,foo=2\",    /* empty key/value */\n \t\t\"foo=1,foo\",       /* no value */\n \t\t\"foo=1,=2\",        /* no key */\n \t\t\"foo=[1,2\",        /* no closing bracket in value */\n",
    "prefixes": [
        "v2",
        "1/3"
    ]
}