Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/101548/?format=api
http://patches.dpdk.org/api/patches/101548/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1634187170-3986-12-git-send-email-jizh@linux.microsoft.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": "<1634187170-3986-12-git-send-email-jizh@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1634187170-3986-12-git-send-email-jizh@linux.microsoft.com", "date": "2021-10-14T04:52:49", "name": "[v5,11/12] app/test: replace .sh scripts with .py scripts", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "79c520dc3b126925fd9662fc39eda26920c4c8b9", "submitter": { "id": 1934, "url": "http://patches.dpdk.org/api/people/1934/?format=api", "name": "Jie Zhou", "email": "jizh@linux.microsoft.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/1634187170-3986-12-git-send-email-jizh@linux.microsoft.com/mbox/", "series": [ { "id": 19628, "url": "http://patches.dpdk.org/api/series/19628/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19628", "date": "2021-10-14T04:52:40", "name": "app/test: enable subset of tests on Windows", "version": 5, "mbox": "http://patches.dpdk.org/series/19628/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/101548/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/101548/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 1B98BA0C53;\n\tThu, 14 Oct 2021 06:54:06 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1DF24411F4;\n\tThu, 14 Oct 2021 06:53:10 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id AB1E140041\n for <dev@dpdk.org>; Thu, 14 Oct 2021 06:52:56 +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 8014320B9D16;\n Wed, 13 Oct 2021 21:52:55 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 8014320B9D16", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1634187175;\n bh=gi2/6VZPgeudBvovS6dxBH4A0VwkpNotD9d0mVL/MgA=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=MdeMttczx2LeJQkMn8G/oZH+o4oEky4BjkQLtfZGan1JQvrNGk3Z5DamJsswTpPYC\n 0RXvvmKPNg4B8DZE4PKnN0qKPbraqku3AISOYGr1kYBKh4w45SMf0TsSgaW7kdi97s\n 75oFLOThSg6nyvtLbnHCZkLY927Rp+eRkFdD6RLI=", "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": "Wed, 13 Oct 2021 21:52:49 -0700", "Message-Id": "<1634187170-3986-12-git-send-email-jizh@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1634187170-3986-1-git-send-email-jizh@linux.microsoft.com>", "References": "<1634182214-24540-1-git-send-email-jizh@linux.microsoft.com>\n <1634187170-3986-1-git-send-email-jizh@linux.microsoft.com>", "Subject": "[dpdk-dev] [PATCH v5 11/12] 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 script to get coremask\n- Add python script to check if system supports hugepages\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 | 12 ++++++++++++\n app/test/has-hugepage.sh | 11 -----------\n app/test/has_hugepage.py | 25 +++++++++++++++++++++++++\n app/test/meson.build | 7 ++++---\n 5 files changed, 41 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..13939bcf78\n--- /dev/null\n+++ b/app/test/get_coremask.py\n@@ -0,0 +1,12 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 Microsoft Corporation\n+\"\"\"This script returns the system cpu range\"\"\"\n+\n+import multiprocessing\n+\n+cpucount = multiprocessing.cpu_count()\n+if cpucount is None:\n+ # use fallback cpu count\n+ print(\"0-3\")\n+else:\n+ print(\"0-\" + str(cpucount - 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..70107c61fd\n--- /dev/null\n+++ b/app/test/has_hugepage.py\n@@ -0,0 +1,25 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (c) 2021 Microsoft Corporation\n+\"\"\"This script checks if the system supports huge pages\"\"\"\n+\n+import platform\n+import ctypes\n+\n+osName = platform.system()\n+if osName == \"Linux\":\n+ with open(\"/proc/sys/vm/nr_hugepages\") as file_o:\n+ content = file_o.read()\n+ print(content)\n+elif osName == \"FreeBSD\":\n+ # Assume FreeBSD always has hugepages enabled\n+ print(\"1\")\n+elif osName == \"Windows\":\n+ # On Windows, determine if large page is supported based on the\n+ # value returned by GetLargePageMinimum. If the return value is zero,\n+ # the processor does not support large pages.\n+ if ctypes.windll.kernel32.GetLargePageMinimum() > 0:\n+ print(\"1\")\n+ else:\n+ print(\"0\")\n+else:\n+ print(\"0\")\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex f144d8b8ed..e1d003eff4 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -451,7 +451,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(py3, '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@@ -459,8 +459,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(py3, '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": [ "v5", "11/12" ] }{ "id": 101548, "url": "