get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129687,
    "url": "http://patchwork.dpdk.org/api/patches/129687/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-6-bruce.richardson@intel.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": "<20230721115125.55137-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230721115125.55137-6-bruce.richardson@intel.com",
    "date": "2023-07-21T11:51:25",
    "name": "[RFC,5/5] app/test: add fast test suite to new build infrastructure",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3af2957964811850b27af846dac4fb40fad44905",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29000,
            "url": "http://patchwork.dpdk.org/api/series/29000/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29000",
            "date": "2023-07-21T11:51:20",
            "name": "replace build code for unit tests",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/29000/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/129687/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/129687/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 AF01B42ED9;\n\tFri, 21 Jul 2023 13:52:09 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5CE4542D36;\n\tFri, 21 Jul 2023 13:51:49 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 78ECB42D3C\n for <dev@dpdk.org>; Fri, 21 Jul 2023 13:51:47 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2023 04:51:47 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.156])\n by fmsmga006.fm.intel.com with ESMTP; 21 Jul 2023 04:51:46 -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=1689940307; x=1721476307;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JXZ2G/VvBDgi6SyO2DDx+W9HNJa+rIVLUZwW05s8GkI=;\n b=SKeQAv60rs6tH8r2ODbzouxMrN1Ni5Owni9QMSIxaqSriMviWogP4hUr\n OqBt1053cQMMw1kOx4Ns93VjuouYwGsZ9UGR09G2NHPB6DDD1+bRD6UuH\n oIuFm66Avo+SFA2g0XpplAPmU8lQBoSd6vSUq1dtwDaxgQhBjB99l7WOX\n l9Xix3NUHE4vx+5798E6P7Mwo1un8erFXSVBhh/iwOsiCmyDJ9/kptPUR\n dERrq//dleSNhMlFIv40GGrbfGo3rDg+WkS7uMT9zwwHEHuzbPfcYMmPo\n yWgzpDRkZt+Mo5aKVzawqRYFAcbsCYf+/ABAMd9Z4vg12ZhQdfG02uRea w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10777\"; a=\"346599205\"",
            "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"346599205\"",
            "E=McAfee;i=\"6600,9927,10777\"; a=\"971420618\"",
            "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"971420618\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[RFC PATCH 5/5] app/test: add fast test suite to new build\n infrastructure",
        "Date": "Fri, 21 Jul 2023 12:51:25 +0100",
        "Message-Id": "<20230721115125.55137-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230721115125.55137-1-bruce.richardson@intel.com>",
        "References": "<20230721115125.55137-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": "The fast-tests are special in that they have additional parameters\nassociated with them. This requires script changes and meson.build\nchanges to take account of these parameters.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/test/suites/meson.build                   | 56 +++++++++++++++++--\n buildtools/get-test-suites.py                 |  9 +++\n .../has-hugepages.py                          |  0\n buildtools/meson.build                        |  1 +\n 4 files changed, 61 insertions(+), 5 deletions(-)\n rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)",
    "diff": "diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build\nindex 135620578c..720b43eb62 100644\n--- a/app/test/suites/meson.build\n+++ b/app/test/suites/meson.build\n@@ -4,20 +4,24 @@\n # some perf tests (eg: memcpy perf autotest)take very long\n # to complete, so timeout to 10 minutes\n timeout_seconds = 600\n+timeout_seconds_fast = 10\n+\n+test_no_huge_args = ['--no-huge', '-m', '2048']\n+has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'\n+message('hugepage availability: @0@'.format(has_hugepage))\n \n # process source files to determine the different unit test suites\n # - fast_tests\n # - perf_tests\n # - driver_tests\n-test_suites = run_command(get_test_suites_cmd, autotest_sources).stdout().strip().split()\n+test_suites = run_command(get_test_suites_cmd, autotest_sources,\n+         check: true).stdout().strip().split()\n 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-    # special fast-test handling here\n-\n-    else\n+    if suite_name != 'fast-tests'\n+        # simple cases - tests without parameters or special handling\n         foreach t: suite_tests\n             test(t, dpdk_test,\n                     args: ['--', t],\n@@ -25,5 +29,47 @@ foreach suite:test_suites\n                     is_parallel: false,\n                     suite: suite_name)\n         endforeach\n+    else\n+    # special fast-test handling here\n+        foreach t: suite_tests\n+            params = t.split(':')\n+            test_name = params[0]\n+            nohuge = params[1] == 'true'\n+            asan = params[2] == 'true'\n+\n+            test_args = []\n+            if nohuge\n+                test_args += test_no_huge_args\n+            elif not has_hugepage\n+                continue  #skip this tests\n+            endif\n+            if not asan and (get_option('b_sanitize') == 'address'\n+                    or get_option('b_sanitize') == 'address,undefined')\n+                continue  # skip this test\n+            endif\n+\n+            if (get_option('default_library') == 'shared' \n+                    and test_name == 'event_eth_tx_adapter_autotest')\n+                test_args += ['-d', dpdk_drivers_build_dir]\n+            endif\n+            if is_linux\n+                test_args += ['--file-prefix=@0@'.format(arg[0])]\n+            endif\n+\n+            test(test_name, dpdk_test,\n+                args : test_args + ['--', test_name],\n+                timeout : timeout_seconds_fast,\n+                is_parallel : false,\n+                suite : 'fast-tests')\n+            if not is_windows and test_name == 'trace_autotest'\n+                test_args += ['--trace=.*']\n+                test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]\n+                test(test_name + '_with_traces', dpdk_test,\n+                    args : test_args + ['--', test_name],\n+                    timeout : timeout_seconds_fast,\n+                    is_parallel : false,\n+                    suite : 'fast-tests')\n+            endif\n+        endforeach\n     endif\n endforeach\ndiff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py\nindex 43cde80970..95a9cad4c8 100644\n--- a/buildtools/get-test-suites.py\n+++ b/buildtools/get-test-suites.py\n@@ -9,6 +9,13 @@\n test_def_regex = re.compile(\"REGISTER_([A-Z]+)_TEST\\s*\\(\\s*([a-z0-9_]+)\")\n test_suites = {}\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@@ -19,6 +26,8 @@\n             test_suites[suite_name].append(test_name)\n         else:\n             test_suites[suite_name] = [test_name]\n+        if suite_name == \"fast-tests\":\n+            test_suites[\"fast-tests\"][-1] += get_fast_test_params(test_name, ln)\n \n for suite in test_suites.keys():\n     print(f\"{suite}={','.join(test_suites[suite])}\")\ndiff --git a/app/test/has_hugepage.py b/buildtools/has-hugepages.py\nsimilarity index 100%\nrename from app/test/has_hugepage.py\nrename to buildtools/has-hugepages.py\ndiff --git a/buildtools/meson.build b/buildtools/meson.build\nindex 12e4b36165..ac5e4dcf08 100644\n--- a/buildtools/meson.build\n+++ b/buildtools/meson.build\n@@ -19,6 +19,7 @@ sphinx_wrapper = py3 + files('call-sphinx-build.py')\n get_cpu_count_cmd = py3 + files('get-cpu-count.py')\n get_numa_count_cmd = py3 + files('get-numa-count.py')\n get_test_suites_cmd = py3 + files('get-test-suites.py')\n+has_hugepages_cmd = py3 + files('has-hugepages.py')\n binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +\n                         [objdump] + cc.cmd_array())\n \n",
    "prefixes": [
        "RFC",
        "5/5"
    ]
}