get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111553,
    "url": "http://patches.dpdk.org/api/patches/111553/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220520145631.137962-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": "<20220520145631.137962-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220520145631.137962-3-bruce.richardson@intel.com",
    "date": "2022-05-20T14:56:31",
    "name": "[2/2] test: use cmdline library to validate args",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "36785e3b060c6481af7e2446d1b85044e1088970",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220520145631.137962-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 23068,
            "url": "http://patches.dpdk.org/api/series/23068/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23068",
            "date": "2022-05-20T14:56:29",
            "name": "fix uncallable unit tests (Bugzilla 1002)",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/23068/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/111553/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/111553/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 BCAAAA0503;\n\tFri, 20 May 2022 16:57:02 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 49F4642B70;\n\tFri, 20 May 2022 16:57:02 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id 723A5427F8;\n Fri, 20 May 2022 16:57:00 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 May 2022 07:56:59 -0700",
            "from silpixa00401385.ir.intel.com (HELO\n silpixa00401385.ger.corp.intel.com.) ([10.237.223.87])\n by orsmga008.jf.intel.com with ESMTP; 20 May 2022 07:56:57 -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=1653058620; x=1684594620;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=fQleqdprc8AbxgntnmqoxqIqkz/nj+F7LqOX7L5iSyA=;\n b=T2tpem8u7jNZ9djHlkAQMIjW+Nm3FFXNMIFkY685dF+yX15S7uy15NoD\n 80TG+/FcdkPTkjCXk5GPj7zU4z/uXaY4IOYXm5iUFz0zWlODIM3ByEMeD\n i1CzTul6S+WnsjUaclzE/46DaxYhwqvC+ST879uw+SOhwe5PyUhScYZlb\n TiCh2a1PueLokRv0ZatGzBMfbh7uamue90FDzhg3nPuC9iawMXo3FHHlq\n PZi6lAPk2BnOyE8JVi31N2/oBLH+MaGdORT2LwuSxCg1oGW85Zo0rEp0k\n iyEzHFthHdTr5JSzliEdU0XYR23GDnEL72Z6hYGJ2cfGIkNwTsi5bFqXf Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10353\"; a=\"271444697\"",
            "E=Sophos;i=\"5.91,239,1647327600\"; d=\"scan'208\";a=\"271444697\"",
            "E=Sophos;i=\"5.91,239,1647327600\"; d=\"scan'208\";a=\"599257521\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org, weiyuanx.li@intel.com, xuemingx.zhang@intel.com,\n Bruce Richardson <bruce.richardson@intel.com>,\n Pablo de Lara <pablo.de.lara.guarch@intel.com>,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Aaron Conole <aconole@redhat.com>",
        "Subject": "[PATCH 2/2] test: use cmdline library to validate args",
        "Date": "Fri, 20 May 2022 15:56:31 +0100",
        "Message-Id": "<20220520145631.137962-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220520145631.137962-1-bruce.richardson@intel.com>",
        "References": "<20220520145631.137962-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 binrary 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>\n---\n app/test/commands.c | 11 -----------\n app/test/test.c     | 25 ++++++++-----------------\n 2 files changed, 8 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 e69cae3eea..5b308ea6a3 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,12 @@ 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}\n+\t\t\telse 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": [
        "2/2"
    ]
}