get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97032,
    "url": "http://patchwork.dpdk.org/api/patches/97032/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1629267476-901-13-git-send-email-jizh@linux.microsoft.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": "<1629267476-901-13-git-send-email-jizh@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1629267476-901-13-git-send-email-jizh@linux.microsoft.com",
    "date": "2021-08-18T06:17:55",
    "name": "[v1,12/13] app/test: replace .sh scripts with .py scripts",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "271ebcdcd6166b2825ce08f875fb2b2f4da2f47e",
    "submitter": {
        "id": 1934,
        "url": "http://patchwork.dpdk.org/api/people/1934/?format=api",
        "name": "Jie Zhou",
        "email": "jizh@linux.microsoft.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/1629267476-901-13-git-send-email-jizh@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 18321,
            "url": "http://patchwork.dpdk.org/api/series/18321/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18321",
            "date": "2021-08-18T06:17:45",
            "name": "app/test: enable subset of tests on Windows",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18321/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/97032/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/97032/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 7D9F4A0C46;\n\tWed, 18 Aug 2021 08:19:22 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AC2BD4120F;\n\tWed, 18 Aug 2021 08:18:20 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id A80974118B\n for <dev@dpdk.org>; Wed, 18 Aug 2021 08:18:03 +0200 (CEST)",
            "from\n linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net\n (linux.microsoft.com [13.77.154.182])\n by linux.microsoft.com (Postfix) with ESMTPSA id C313820C3321;\n Tue, 17 Aug 2021 23:18:02 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com C313820C3321",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1629267482;\n bh=VmSNG0XsaQuUFBmswrELfnAdkzbrA8tQRglVj4C6yl0=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=heKbATVrfgleRF+42Bvv/c5r1JSkW3/84ktMlFAsbHeTcdexYgv3lhEwC3xPbI8fZ\n hkzRbgn3syUh20o7HjpiC077LUotRd1/eXLX1F4wrCcGo5X1H7LXFYdTmtXXT26MB+\n drN4+dOd/4ieDrb1rDogkYxbCwhYeDjgDsEApd1o=",
        "From": "Jie Zhou <jizh@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "dmitry.kozliuk@gmail.com, roretzla@microsoft.com,\n navasile@linux.microsoft.com, dmitrym@microsoft.com,\n pallavi.kadam@intel.com, talshn@nvidia.com, thomas@monjalon.net,\n aconole@redhat.com",
        "Date": "Tue, 17 Aug 2021 23:17:55 -0700",
        "Message-Id": "<1629267476-901-13-git-send-email-jizh@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1629267476-901-1-git-send-email-jizh@linux.microsoft.com>",
        "References": "<1629267476-901-1-git-send-email-jizh@linux.microsoft.com>",
        "Subject": "[dpdk-dev] [PATCH v1 12/13] app/test: replace .sh scripts with .py\n scripts",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "- Add python scripts to get coremask and check hugepage config\n- Remove two corresponding .sh scripts\n- Replace calling of .sh with corresponding .py in meson.build\n\nSigned-off-by: Jie Zhou <jizh@linux.microsoft.com>\n---\n app/test/get-coremask.sh | 13 -------------\n app/test/get_coremask.py |  8 ++++++++\n app/test/has-hugepage.sh | 11 -----------\n app/test/has_hugepage.py | 41 ++++++++++++++++++++++++++++++++++++++++\n app/test/meson.build     |  7 ++++---\n 5 files changed, 53 insertions(+), 27 deletions(-)\n delete mode 100755 app/test/get-coremask.sh\n create mode 100644 app/test/get_coremask.py\n delete mode 100755 app/test/has-hugepage.sh\n create mode 100644 app/test/has_hugepage.py",
    "diff": "diff --git a/app/test/get-coremask.sh b/app/test/get-coremask.sh\ndeleted file mode 100755\nindex bb8cf404d2..0000000000\n--- a/app/test/get-coremask.sh\n+++ /dev/null\n@@ -1,13 +0,0 @@\n-#! /bin/sh -e\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2019 Intel Corporation\n-\n-if [ \"$(uname)\" = \"Linux\" ] ; then\n-\tcat /sys/devices/system/cpu/present\n-elif [ \"$(uname)\" = \"FreeBSD\" ] ; then\n-\tncpus=$(/sbin/sysctl -n hw.ncpu)\n-\techo 0-$(expr $ncpus - 1)\n-else\n-# fallback\n-\techo 0-3\n-fi\ndiff --git a/app/test/get_coremask.py b/app/test/get_coremask.py\nnew file mode 100644\nindex 0000000000..3d0947e8ff\n--- /dev/null\n+++ b/app/test/get_coremask.py\n@@ -0,0 +1,8 @@\n+#! /usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 Microsoft Corporation\n+\n+import multiprocessing\n+\n+c = multiprocessing.cpu_count()\n+print(\"0-\"+str(c-1))\ndiff --git a/app/test/has-hugepage.sh b/app/test/has-hugepage.sh\ndeleted file mode 100755\nindex d600fad319..0000000000\n--- a/app/test/has-hugepage.sh\n+++ /dev/null\n@@ -1,11 +0,0 @@\n-#! /bin/sh\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright 2020 Mellanox Technologies, Ltd\n-\n-if [ \"$(uname)\" = \"Linux\" ] ; then\n-\tcat /proc/sys/vm/nr_hugepages || echo 0\n-elif [ \"$(uname)\" = \"FreeBSD\" ] ; then\n-\techo 1 # assume FreeBSD always has hugepages\n-else\n-\techo 0\n-fi\ndiff --git a/app/test/has_hugepage.py b/app/test/has_hugepage.py\nnew file mode 100644\nindex 0000000000..decf47df45\n--- /dev/null\n+++ b/app/test/has_hugepage.py\n@@ -0,0 +1,41 @@\n+#! /usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 Microsoft Corporation\n+\n+import os\n+import platform\n+\n+osName = platform.system()\n+if osName == \"Linux\":\n+        file_o=open(\"/proc/sys/vm/nr_hugepages\")\n+        content=file_o.read()\n+        print(content)\n+        file_o.close()\n+elif osName == \"FreeBSD\":\n+        # Assume FreeBSD always has hugepages enabled\n+        print(\"1\")\n+elif osName == \"Windows\":\n+        # On Windows, check if the Administrator has \"Lock pages in memory\" security setting\n+        # to determine if large page is enabled or not\n+\n+        # Export the USER_RIGHTS security settings\n+        # Use os.popen instead of os.system to suppress the output of secedit to stdout\n+        userRightsfile = \"userrights.inf\"\n+        os.popen('secedit /export /areas USER_RIGHTS /cfg \"' + userRightsfile + '\"')\n+\n+        # Parse the exported user rights setting to determine if Administrator\n+        # SeLockMemoryPrivilege being set or not\n+        largepageEnabledStr = 'SeLockMemoryPrivilege = Administrator'\n+        enabled = 0\n+        # On different OS versions tested, the exported inf file has utf-16 encoding\n+        with open(userRightsfile, encoding = 'utf-16') as f:\n+            urcontent = f.readlines()\n+            for line in urcontent:\n+                if largepageEnabledStr in line:\n+                    enabled = 1\n+                    break\n+\n+        f.close()\n+        print(enabled)\n+else:\n+        print(\"0\")\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex a7611686ad..7240304916 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -450,7 +450,7 @@ dpdk_test = executable('dpdk-test',\n              driver_install_path),\n         install: true)\n \n-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'\n+has_hugepage = run_command('has_hugepage.py').stdout().strip() != '0'\n message('hugepage availability: @0@'.format(has_hugepage))\n \n # some perf tests (eg: memcpy perf autotest)take very long\n@@ -458,8 +458,9 @@ message('hugepage availability: @0@'.format(has_hugepage))\n timeout_seconds = 600\n timeout_seconds_fast = 10\n \n-get_coremask = find_program('get-coremask.sh')\n-num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()\n+list_of_cores = run_command('get_coremask.py').stdout().strip()\n+message('list of cores: @0@'.format(list_of_cores))\n+num_cores_arg = '-l ' + list_of_cores\n \n default_test_args = [num_cores_arg]\n \n",
    "prefixes": [
        "v1",
        "12/13"
    ]
}