get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114433,
    "url": "http://patches.dpdk.org/api/patches/114433/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220729095400.774303-1-david.marchand@redhat.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": "<20220729095400.774303-1-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220729095400.774303-1-david.marchand@redhat.com",
    "date": "2022-07-29T09:54:00",
    "name": "app/test: invoke all telemetry commands",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "38e24d3af07c3acb8f472e5f3162dddf7c4a2647",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.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/20220729095400.774303-1-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 24132,
            "url": "http://patches.dpdk.org/api/series/24132/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24132",
            "date": "2022-07-29T09:54:00",
            "name": "app/test: invoke all telemetry commands",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/24132/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114433/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/114433/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 F0747A04FD;\n\tFri, 29 Jul 2022 11:54:11 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DD8074069C;\n\tFri, 29 Jul 2022 11:54:11 +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 9870240151\n for <dev@dpdk.org>; Fri, 29 Jul 2022 11:54:10 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com\n [66.187.233.73]) 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-30-nWqD9TY7Nhyd-_6PI51t6g-1; Fri, 29 Jul 2022 05:54:07 -0400",
            "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com\n [10.11.54.7])\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 9BB7F2919EB3;\n Fri, 29 Jul 2022 09:54:06 +0000 (UTC)",
            "from fchome.redhat.com (unknown [10.40.195.18])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 3FAE11415118;\n Fri, 29 Jul 2022 09:54:05 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1659088450;\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=2TTOfGccWnM2cgtBL2OAKPXRc5aVRX5rc+61qH2I49I=;\n b=A+nlEWVGsFmh1ePYHYqlOk0s88gp89miyRICtNVzjrZwCyv3+zlL/d7PAvzjzmY3gio949\n 0ijALyYoa1jJklfTAfL/pZ9YYChJOnwLmOWarqkDLbl63ago/DdPP+0T8NdalWaIUWaBFz\n Ojmpd0DTKuwip6/FQenKr7tg8ejhzzM=",
        "X-MC-Unique": "nWqD9TY7Nhyd-_6PI51t6g-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "Chengwen Feng <fengchengwen@huawei.com>,\n Aaron Conole <aconole@redhat.com>,\n Michael Santana <maicolgabriel@hotmail.com>,\n Ciara Power <ciara.power@intel.com>",
        "Subject": "[PATCH] app/test: invoke all telemetry commands",
        "Date": "Fri, 29 Jul 2022 11:54:00 +0200",
        "Message-Id": "<20220729095400.774303-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.85 on 10.11.54.7",
        "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, dmadev, ethdev, eventdev and rawdev devices are created\nusing dummy drivers.\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>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n .github/workflows/build.yml |  2 +-\n app/test/meson.build        | 35 ++++++++++++++++++++++++++++++++++-\n app/test/test_telemetry.sh  | 28 ++++++++++++++++++++++++++++\n 3 files changed, 63 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 6f04e7071c..bf17d2b278 100644\n--- a/.github/workflows/build.yml\n+++ b/.github/workflows/build.yml\n@@ -140,7 +140,7 @@ jobs:\n       run: sudo apt install -y crossbuild-essential-riscv64\n     - name: Install test tools packages\n       if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != '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 431c5bd318..e60fc64a37 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -473,12 +473,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@@ -520,6 +522,37 @@ 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_DMA_SKELETON')\n+        test_args += ['--vdev=dma_skeleton0']\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+    if dpdk_conf.has('RTE_RAW_SKELETON')\n+        test_args += ['--vdev=rawdev_skeleton0']\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": []
}