get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 131504,
    "url": "http://patches.dpdk.org/api/patches/131504/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230915115206.132198-2-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": "<20230915115206.132198-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230915115206.132198-2-bruce.richardson@intel.com",
    "date": "2023-09-15T11:52:05",
    "name": "[1/2] app/test: emit warning for tests not in a test suite",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "29f8c2be16b3daef8c1c79df0ce9c69e3c97a429",
    "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/20230915115206.132198-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29522,
            "url": "http://patches.dpdk.org/api/series/29522/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29522",
            "date": "2023-09-15T11:52:04",
            "name": "add checks for tests not in a suite",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29522/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/131504/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/131504/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 1D809425A4;\n\tFri, 15 Sep 2023 13:52:32 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 608AB406B4;\n\tFri, 15 Sep 2023 13:52:30 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 4C3C4402D7\n for <dev@dpdk.org>; Fri, 15 Sep 2023 13:52:29 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Sep 2023 04:52:15 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.14])\n by orsmga005.jf.intel.com with ESMTP; 15 Sep 2023 04:52:14 -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=1694778749; x=1726314749;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=hOqMFsmY06YtN35eu+oMgcYWLx6apd8xyqN04h6MokM=;\n b=iAFYbcKqMXc2ckpWUQZVHM5uA7s1GWM+rSUp9cTQrVVYwe3+xiN8Lcce\n qUq/TRJ5BqI5E7XjPLPZ6e8ZNy9gDFmWUjlipOdRTY35eOxfraBjdm66P\n jiU7SDuC/XgeffoH9UZja81RpJeNuIpVdwsX4rT8Rr+SYyrnzvs1S0sjS\n fb6y7kcr/xLQBNkKrjeRRq1mjgXs8PZL7Yl+kLltupUNuEShDjSI9LLQa\n iNDTyIs4e9RUXkd7o3+/fYasxQwr3F1Vw9FNv0zJjwmTFmeqK+7PYD5jy\n Mgm/PAd19uhxFDoYyi1ziWJago/LMCe1ngAUNEXVQO6wQuP/xWOHEznE6 w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10833\"; a=\"379149155\"",
            "E=Sophos;i=\"6.02,149,1688454000\"; d=\"scan'208\";a=\"379149155\"",
            "E=McAfee;i=\"6600,9927,10833\"; a=\"918631210\"",
            "E=Sophos;i=\"6.02,149,1688454000\"; d=\"scan'208\";a=\"918631210\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH 1/2] app/test: emit warning for tests not in a test suite",
        "Date": "Fri, 15 Sep 2023 12:52:05 +0100",
        "Message-Id": "<20230915115206.132198-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230915115206.132198-1-bruce.richardson@intel.com>",
        "References": "<20230915115206.132198-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 doing a scan for tests to add to test suites, we can also detect\nthe tests which have not been added to any suite. By doing so:\n\na) we can emit a warning informing the developer that the test is not in\n   a suite (if developer mode is enabled)\nb) we can still register a test for that command making these tests\n   callable through \"meson test\"\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/test/suites/meson.build   | 13 ++++++++++++-\n buildtools/get-test-suites.py | 12 +++++++++---\n 2 files changed, 21 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build\nindex 19a6b902fa..478f245a54 100644\n--- a/app/test/suites/meson.build\n+++ b/app/test/suites/meson.build\n@@ -21,7 +21,18 @@ foreach suite:test_suites\n     suite = suite.split('=')\n     suite_name = suite[0]\n     suite_tests = suite[1].split(',')\n-    if suite_name != 'fast-tests'\n+    if suite_name == 'non_suite_tests'\n+        # tests not in any suite\n+        foreach t: suite_tests\n+            if developer_mode\n+                warning('Test \"@0@\" is not defined in any test suite'.format(t))\n+            endif\n+            test(t, dpdk_test,\n+                    env: ['DPDK_TEST=' + t],\n+                    timeout: timeout_seconds,\n+                    is_parallel: false)\n+        endforeach\n+    elif suite_name != 'fast-tests'\n         # simple cases - tests without parameters or special handling\n         foreach t: suite_tests\n             test(t, dpdk_test,\ndiff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py\nindex 95a9cad4c8..574c233aa8 100644\n--- a/buildtools/get-test-suites.py\n+++ b/buildtools/get-test-suites.py\n@@ -8,18 +8,23 @@\n input_list = sys.argv[1:]\n test_def_regex = re.compile(\"REGISTER_([A-Z]+)_TEST\\s*\\(\\s*([a-z0-9_]+)\")\n test_suites = {}\n+# track tests not in any test suite.\n+non_suite_regex = re.compile(\"REGISTER_TEST_COMMAND\\s*\\(\\s*([a-z0-9_]+)\")\n+non_suite_tests = []\n \n def get_fast_test_params(test_name, ln):\n     \"Extract the extra fast-test parameters from the line\"\n-    #print(f\"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}\")\n     (_, rest_of_line) = ln.split(test_name, 1)\n     (_, nohuge, asan, _func) = rest_of_line.split(',', 3)\n     return f\":{nohuge.strip().lower()}:{asan.strip().lower()}\"\n \n for fname in input_list:\n     with open(fname) as f:\n-        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]\n-    for ln in contents:\n+        contents = [ln.strip() for ln in f.readlines()]\n+        test_lines = [ln for ln in contents if test_def_regex.match(ln)]\n+        non_suite_tests.extend([non_suite_regex.match(ln).group(1)\n+                for ln in contents if non_suite_regex.match(ln)])\n+    for ln in test_lines:\n         (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)\n         suite_name = f\"{test_suite.lower()}-tests\"\n         if suite_name in test_suites:\n@@ -31,3 +36,4 @@ def get_fast_test_params(test_name, ln):\n \n for suite in test_suites.keys():\n     print(f\"{suite}={','.join(test_suites[suite])}\")\n+print(f\"non_suite_tests={','.join(non_suite_tests)}\")\n",
    "prefixes": [
        "1/2"
    ]
}