get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112656,
    "url": "http://patches.dpdk.org/api/patches/112656/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220610142406.580943-3-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20220610142406.580943-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220610142406.580943-3-bruce.richardson@intel.com",
    "date": "2022-06-10T14:24:06",
    "name": "[v3,2/2] test: use cmdline library to validate args",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "317d80eea0ec468d58e59fabdab690d91ffee4eb",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220610142406.580943-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 23469,
            "url": "http://patches.dpdk.org/api/series/23469/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23469",
            "date": "2022-06-10T14:24:04",
            "name": "fix uncallable unit tests (Bugzilla 1002)",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/23469/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/112656/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/112656/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 DD97CA0553;\n\tFri, 10 Jun 2022 16:24:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3808E427E9;\n\tFri, 10 Jun 2022 16:24:21 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by mails.dpdk.org (Postfix) with ESMTP id D808A4281A\n for <dev@dpdk.org>; Fri, 10 Jun 2022 16:24:19 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Jun 2022 07:24:19 -0700",
            "from silpixa00401385.ir.intel.com (HELO\n silpixa00401385.ger.corp.intel.com.) ([10.237.223.181])\n by fmsmga002.fm.intel.com with ESMTP; 10 Jun 2022 07:24:18 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1654871060; x=1686407060;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=RtERYlHE0ndwzh/8iBxgPrltN9s4LtBWzTm/nG+13nM=;\n b=Yt2HyDyJiqo5PDGy1KbWumQT3t4dJdEcCLeiD5uT6BYRjYUBWQIKqM1e\n EH7AyR0reWiAdKw2hX5mDvmTEQ37tRtvlRbpiyrSbhNuCfJkoZXYkor9x\n 3SKErezxx1Cit7c01RTU+eH4gss9Y2Rf5apO0p3MqdGuxR4IMckoOVh+C\n seBwm5FSvb8Y4qk1a1ZGEOSIopoLkvbKl0+hek/L/RvIWnnX440zUzvxs\n G48T9SVbY/vEoOpelI32wrWUfl5gog7xltD4nRR+uo1ZSKjkhlONF9ZOG\n u48PTkoi1eqQtW9edRH6gA0rLpa5ZtnDU07VVtbDkz7tLeyvjeXIdASHN w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10373\"; a=\"258079392\"",
            "E=Sophos;i=\"5.91,290,1647327600\"; d=\"scan'208\";a=\"258079392\"",
            "E=Sophos;i=\"5.91,290,1647327600\"; d=\"scan'208\";a=\"684568727\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "olivier.matz@6wind.com,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH v3 2/2] test: use cmdline library to validate args",
        "Date": "Fri, 10 Jun 2022 15:24:06 +0100",
        "Message-Id": "<20220610142406.580943-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220610142406.580943-1-bruce.richardson@intel.com>",
        "References": "<20220520145631.137962-1-bruce.richardson@intel.com>\n <20220610142406.580943-1-bruce.richardson@intel.com>",
        "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": "When passing in test names to run via either the DPDK_TEST environment\nvariable or via extra argv parameters, the checks run on those commands\ncan miss valid commands that are registered with the cmdline library in\nthe initial context used to set it up. This is seen in the fact that the\n\"dump_*\" set of commands are not callable via argv parameters, but can\nbe called manually.\n\nTo fix this, just use the commandline library to validate each command\nbefore executing it, stopping execution when an error is encountered.\nThis also has the benefit of not having the test binray drop to\ninteractive mode if all commandline parameters given are invalid.\n\nFixes: 9b848774a5dc (\"test: use env variable to run tests\")\nFixes: ace2f054ed43 (\"test: take test names from command line\")\nBugzilla ID: 1002\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test/commands.c | 11 -----------\n app/test/test.c     | 24 +++++++-----------------\n 2 files changed, 7 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/app/test/commands.c b/app/test/commands.c\nindex 887cabad64..31259e5c21 100644\n--- a/app/test/commands.c\n+++ b/app/test/commands.c\n@@ -378,14 +378,3 @@ int commands_init(void)\n \tcmd_autotest_autotest.string_data.str = commands;\n \treturn 0;\n }\n-\n-int command_valid(const char *cmd)\n-{\n-\tstruct test_command *t;\n-\n-\tTAILQ_FOREACH(t, &commands_list, next) {\n-\t\tif (strcmp(t->command, cmd) == 0)\n-\t\t\treturn 1;\n-\t}\n-\treturn 0;\n-}\ndiff --git a/app/test/test.c b/app/test/test.c\nindex 8a7dddde9b..fb073ff795 100644\n--- a/app/test/test.c\n+++ b/app/test/test.c\n@@ -186,22 +186,10 @@ main(int argc, char **argv)\n #ifdef RTE_LIB_CMDLINE\n \tchar *dpdk_test = getenv(\"DPDK_TEST\");\n \n-\tif (dpdk_test && strlen(dpdk_test) == 0)\n-\t\tdpdk_test = NULL;\n-\n-\tif (dpdk_test && !command_valid(dpdk_test)) {\n-\t\tRTE_LOG(WARNING, APP, \"Invalid DPDK_TEST value '%s'\\n\", dpdk_test);\n-\t\tdpdk_test = NULL;\n-\t}\n-\n-\tif (dpdk_test)\n+\tif (dpdk_test && strlen(dpdk_test) > 0)\n \t\ttests[test_count++] = dpdk_test;\n-\tfor (i = 1; i < argc; i++) {\n-\t\tif (!command_valid(argv[i]))\n-\t\t\tRTE_LOG(WARNING, APP, \"Invalid test requested: '%s'\\n\", argv[i]);\n-\t\telse\n-\t\t\ttests[test_count++] = argv[i];\n-\t}\n+\tfor (i = 1; i < argc; i++)\n+\t\ttests[test_count++] = argv[i];\n \n \tif (test_count > 0) {\n \t\tchar buf[1024];\n@@ -214,9 +202,11 @@ main(int argc, char **argv)\n \n \t\tfor (i = 0; i < test_count; i++) {\n \t\t\tsnprintf(buf, sizeof(buf), \"%s\\n\", tests[i]);\n-\t\t\tif (cmdline_in(cl, buf, strlen(buf)) < 0) {\n+\t\t\tif (cmdline_parse_check(cl, buf) < 0) {\n+\t\t\t\tprintf(\"Error: invalid test command: '%s'\\n\", tests[i]);\n+\t\t\t\tret = -1;\n+\t\t\t} else if (cmdline_in(cl, buf, strlen(buf)) < 0) {\n \t\t\t\tprintf(\"error on cmdline input\\n\");\n-\n \t\t\t\tret = -1;\n \t\t\t} else\n \t\t\t\tret = last_test_result;\n",
    "prefixes": [
        "v3",
        "2/2"
    ]
}