get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111556,
    "url": "http://patches.dpdk.org/api/patches/111556/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220520151240.139566-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": "<20220520151240.139566-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220520151240.139566-3-bruce.richardson@intel.com",
    "date": "2022-05-20T15:12:40",
    "name": "[v2,2/2] test: use cmdline library to validate args",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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": 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/20220520151240.139566-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 23069,
            "url": "http://patches.dpdk.org/api/series/23069/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23069",
            "date": "2022-05-20T15:12:38",
            "name": "fix uncallable unit tests (Bugzilla 1002)",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/23069/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/111556/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/111556/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 CE10CA0503;\n\tFri, 20 May 2022 17:13:06 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E097442B77;\n\tFri, 20 May 2022 17:12:59 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 94E7D4280B;\n Fri, 20 May 2022 17:12:58 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 May 2022 08:12:58 -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 08:12:55 -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=1653059578; x=1684595578;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=6LO0wGuJEvm1WJfEeNHKZVHasfYnG9lqdgpiBuPgyEk=;\n b=iekRJR0mtxNRrgKJCMwvcydQVZJ7NMStBP/h4DmcF7hk16rl4NUpc73k\n ir9nfqjYSGdKkiOCchdjjy0E+9rVQqsFJcUzd+DVrLR19wUR32dMMb6t3\n O2Zkc0ARdcACz0YSEVotDnqRNfCpbqyEkaaCtLNK0iiy4YdWCK0e6+4j6\n H3RYHWH08dJH0r01HpGavhnTHoKUPjXL3Brq71hQ7i9u4dPRie4P65kF6\n nz9Lm/cIELB2S883Wo3AXvk+rFoFLqHFoB9AKKC/NxCHUmcddI0um+HCH\n CV/R57GQI8RPoN4ZSOrI2GvQlTX7bakLuqtvw73DZ1l/fFo3gLMHkP+Zs g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10353\"; a=\"260216952\"",
            "E=Sophos;i=\"5.91,239,1647327600\"; d=\"scan'208\";a=\"260216952\"",
            "E=Sophos;i=\"5.91,239,1647327600\"; d=\"scan'208\";a=\"599263772\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org, weiyuanx.li@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 v2 2/2] test: use cmdline library to validate args",
        "Date": "Fri, 20 May 2022 16:12:40 +0100",
        "Message-Id": "<20220520151240.139566-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20220520151240.139566-1-bruce.richardson@intel.com>",
        "References": "<20220520145631.137962-1-bruce.richardson@intel.com>\n <20220520151240.139566-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     | 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 e69cae3eea..ce25f468a6 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": [
        "v2",
        "2/2"
    ]
}