get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111426,
    "url": "https://patches.dpdk.org/api/patches/111426/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220519124731.3120656-1-david.marchand@redhat.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20220519124731.3120656-1-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220519124731.3120656-1-david.marchand@redhat.com",
    "date": "2022-05-19T12:47:31",
    "name": "[RFC] app/test: invoke all telemetry commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "894a3052be5ae32e40183f5d53bed8222e7c295c",
    "submitter": {
        "id": 1173,
        "url": "https://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220519124731.3120656-1-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 23038,
            "url": "https://patches.dpdk.org/api/series/23038/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23038",
            "date": "2022-05-19T12:47:31",
            "name": "[RFC] app/test: invoke all telemetry commands",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/23038/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/111426/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/111426/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 CD21EA0503;\n\tThu, 19 May 2022 14:47:38 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6F9A540222;\n\tThu, 19 May 2022 14:47:38 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 0E85B40156\n for <dev@dpdk.org>; Thu, 19 May 2022 14:47:36 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-124-57sWe-NeNs-sIBRUBiRMRw-1; Thu, 19 May 2022 08:47:35 -0400",
            "from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com\n [10.11.54.2])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B23980B90A;\n Thu, 19 May 2022 12:47:35 +0000 (UTC)",
            "from fchome.home (unknown [10.40.194.86])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C3119400E400;\n Thu, 19 May 2022 12:47:33 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1652964456;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=fyvnDGJThZnlak+6TEys9jePBBs9zVNPLm1Vw1TGgO4=;\n b=AsyCFfxZQk5HYZjrFJI5kcV3Z6L3LoOilk+Bx2PaYrPhP3H+BBZJYQy4pctkTKKmOsaKDW\n e67RJRSK98ka1uhYVgmAhLfiFcb2dw1Xvjn8LDJSB5LhmAgUhJa6XkquQ+FAm7qh2P5ZCe\n 6Ql0dsiqA8el/dv+kvw4M6gMISxDpvs=",
        "X-MC-Unique": "57sWe-NeNs-sIBRUBiRMRw-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, Aaron Conole <aconole@redhat.com>,\n Michael Santana <maicolgabriel@hotmail.com>,\n Ciara Power <ciara.power@intel.com>",
        "Subject": "[RFC PATCH] app/test: invoke all telemetry commands",
        "Date": "Thu, 19 May 2022 14:47:31 +0200",
        "Message-Id": "<20220519124731.3120656-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.11.54.2",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Try and call all possible telemetry commands.\nEach commands is tested with no argument, 0 (for command that accepts\na single integer like for a port identifier) and z (to catch commands\nnot properly validating input).\nFake cryptodev, ethdev and eventdev ports are created using dummy\ndrivers.\n\nOutput of the commands is not checked, the point of this test is mainly\nto catch simple issues and leaks (when coupled with ASan in the CI).\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\nNote: sending this WIP patch as this is how I currently test telemetry\npatches. I am fine with whoever wants to take over and implement this in\nanother scripting language.\n\nCI will flag this patch as failing because of two pre-existing bugs\nfor which we have yet unmerged fixes:\n- https://patchwork.dpdk.org/project/dpdk/patch/20220513025357.52275-8-fengchengwen@huawei.com/\n- https://patchwork.dpdk.org/project/dpdk/patch/20220519122151.3119730-1-david.marchand@redhat.com/\n\n---\n .github/workflows/build.yml |  2 +-\n app/test/meson.build        | 29 ++++++++++++++++++++++++++++-\n app/test/test_telemetry.sh  | 28 ++++++++++++++++++++++++++++\n 3 files changed, 57 insertions(+), 2 deletions(-)\n create mode 100755 app/test/test_telemetry.sh",
    "diff": "diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml\nindex ad8ad1a187..70549d84ec 100644\n--- a/.github/workflows/build.yml\n+++ b/.github/workflows/build.yml\n@@ -134,7 +134,7 @@ jobs:\n         pkg-config-powerpc-linux-gnu\n     - name: Install test tools packages\n       if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RUN_TESTS == 'true'\n-      run: sudo apt install -y gdb\n+      run: sudo apt install -y gdb jq\n     - name: Install doc generation packages\n       if: env.BUILD_DOCS == 'true'\n       run: sudo apt install -y doxygen graphviz python3-sphinx\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex bb4621ed2a..760c2096c7 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -469,12 +469,14 @@ message('hugepage availability: @0@'.format(has_hugepage))\n timeout_seconds = 600\n timeout_seconds_fast = 10\n \n+test_no_huge_args = ['--no-huge', '-m', '2048']\n+\n foreach arg : fast_tests\n     test_args = []\n     run_test = true\n     if not has_hugepage\n         if arg[1]\n-            test_args += ['--no-huge', '-m', '2048']\n+            test_args += test_no_huge_args\n         else\n             run_test = false\n         endif\n@@ -506,6 +508,31 @@ foreach arg : fast_tests\n     endif\n endforeach\n \n+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')\n+    test_args = [dpdk_test]\n+    test_args += test_no_huge_args\n+    if get_option('default_library') == 'shared'\n+        foreach drv:dpdk_drivers\n+            test_args += ['-d', drv.full_path().split('.a')[0] + '.so']\n+        endforeach\n+    endif\n+    if dpdk_conf.has('RTE_CRYPTO_NULL')\n+        test_args += ['--vdev=crypto_null0']\n+    endif\n+    if dpdk_conf.has('RTE_EVENT_SKELETON')\n+        test_args += ['--vdev=event_skeleton0']\n+    endif\n+    if dpdk_conf.has('RTE_NET_NULL')\n+        test_args += ['--vdev=net_null0']\n+    endif\n+    test_args += ['-a', '0000:00:00.0']\n+    test('telemetry_all', find_program('test_telemetry.sh'),\n+            args: test_args,\n+            timeout : timeout_seconds_fast,\n+            is_parallel : false,\n+            suite : 'fast-tests')\n+endif\n+\n foreach arg : perf_test_names\n     test(arg, dpdk_test,\n             env : ['DPDK_TEST=' + arg],\ndiff --git a/app/test/test_telemetry.sh b/app/test/test_telemetry.sh\nnew file mode 100755\nindex 0000000000..ca6abe266e\n--- /dev/null\n+++ b/app/test/test_telemetry.sh\n@@ -0,0 +1,28 @@\n+#!/bin/sh -e\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2022 Red Hat, Inc.\n+\n+which jq || {\n+    echo \"No jq available, skipping test.\"\n+    exit 77\n+}\n+\n+rootdir=$(readlink -f $(dirname $(readlink -f $0))/../..)\n+tmpoutput=$(mktemp -t dpdk.test_telemetry.XXXXXX)\n+trap \"cat $tmpoutput; rm -f $tmpoutput\" EXIT\n+\n+call_all_telemetry() {\n+    telemetry_script=$rootdir/usertools/dpdk-telemetry.py\n+    echo >$tmpoutput\n+    echo \"Telemetry commands log:\" >>$tmpoutput\n+    for cmd in $(echo / | $telemetry_script | jq -r '.[\"/\"][]')\n+    do\n+        for input in $cmd $cmd,0 $cmd,z\n+        do\n+            echo Calling $input >> $tmpoutput\n+            echo $input | $telemetry_script >> $tmpoutput 2>&1\n+        done\n+    done\n+}\n+\n+(sleep 1 && call_all_telemetry && echo quit) | $@\n",
    "prefixes": [
        "RFC"
    ]
}