Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/81612/?format=api
https://patches.dpdk.org/api/patches/81612/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201020162018.10058-5-stephen@networkplumber.org/", "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": "<20201020162018.10058-5-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20201020162018.10058-5-stephen@networkplumber.org", "date": "2020-10-20T16:20:17", "name": "[v2,4/5] app/test: use new allowlist and blocklist", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6854ffe767e222018830879de8f06c37e2cc422d", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "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/20201020162018.10058-5-stephen@networkplumber.org/mbox/", "series": [ { "id": 13152, "url": "https://patches.dpdk.org/api/series/13152/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13152", "date": "2020-10-20T16:20:13", "name": "replace blacklist/whitelist with block/allow", "version": 2, "mbox": "https://patches.dpdk.org/series/13152/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/81612/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/81612/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5E9ADA04DD;\n\tTue, 20 Oct 2020 18:21:52 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 05201AD02;\n\tTue, 20 Oct 2020 18:20:42 +0200 (CEST)", "from mail-pj1-f41.google.com (mail-pj1-f41.google.com\n [209.85.216.41]) by dpdk.org (Postfix) with ESMTP id 8C0D1A9C7\n for <dev@dpdk.org>; Tue, 20 Oct 2020 18:20:36 +0200 (CEST)", "by mail-pj1-f41.google.com with SMTP id hk7so1219363pjb.2\n for <dev@dpdk.org>; Tue, 20 Oct 2020 09:20:36 -0700 (PDT)", "from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id 8sm2393015pjk.20.2020.10.20.09.20.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 20 Oct 2020 09:20:33 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=k1G03dkv5xc23/0pGa6N/Q0eC6Xa6yaClKZq6KkZgIg=;\n b=1wuz/D/+iLYnA1pgpD8tXgZsW4ByCyr0qZOcFb7+oQbyIteh2ijC6Y8gk87SmYvtoI\n zFOWKYw8VniWOguWfTBYRttLdSX8TQvWpANhq6JdCjh3xr+5hl/Q9hFx78Uqa2fkWxVl\n FpqVaviMOAKz2LYmqQcg/kGvkmNBsHKEn0TH7CNuf0aCG/5cbWlFg4veCdwfDBNPbW42\n hWF/P6bglfwbASH7ERaW4VYlks52EhrpFc5cohNx5aFpBuVBeeeZgdb8c/6MG7yBrUtJ\n 7iAKLlBTmByh5ahcsWmseCzWhZSqRBII4kW7m7kzep6MiikHeA07mOO9gA+HiPGYEFq0\n UdSw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=k1G03dkv5xc23/0pGa6N/Q0eC6Xa6yaClKZq6KkZgIg=;\n b=pxHDvoaw19sm9nQb+XHafIR4bEh+CUO+u4US49kc31p8+rSppB7dMf056E/SbDVa2t\n aTD1Gh8A7eUqO3sJvGM4uOJRR6azhiSl4A4Rlp6B30XLV6jZVm1bQrdh1qhDitmoM5Vc\n C4ZTSKzTwMuQ4QRPllwpT/0sH736lb9TiGrn0mX0briHOU1y92gyXzLT/y0I74qaYM3O\n tVQt7jPa/tYSGi3MUF4di6Q7351k/RwRj8cBPmP8LiVdm60YHNMVTtj54tWrcfa6Omf8\n mRzjX2E+SkVGM9BfeVvUA+2jUPiDXmc9om/w46EDhlwDsV2e2f66CfRwyGLXBlELke+j\n eBeQ==", "X-Gm-Message-State": "AOAM5312HUenF5qV0NpGAQF6Bm83WMXcPfeRGxTL3W5epjty1dDYSBVL\n Z6NrtGOPXuBRm/7tNIyDCCf25tKAlNJokA==", "X-Google-Smtp-Source": "\n ABdhPJwOFHlwvlLrlkjfQ1VJFJrW4S5SUQ+b8HYlcTqDwnt6ExrS3M1j517QovZsyHuXI4mqLV+NdQ==", "X-Received": "by 2002:a17:90a:1704:: with SMTP id\n z4mr3372282pjd.7.1603210834157;\n Tue, 20 Oct 2020 09:20:34 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Luca Boccassi <bluca@debian.org>", "Date": "Tue, 20 Oct 2020 09:20:17 -0700", "Message-Id": "<20201020162018.10058-5-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20201020162018.10058-1-stephen@networkplumber.org>", "References": "<20200922143202.8755-1-stephen@networkplumber.org>\n <20201020162018.10058-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 4/5] app/test: use new allowlist and blocklist", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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": "Test the renamed blocklist and allowlist arguments.\nUse new terms in test variable names as well.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Luca Boccassi <bluca@debian.org>\n---\n app/test/autotest.py | 16 +++----\n app/test/autotest_runner.py | 18 ++++----\n app/test/test.c | 2 +-\n app/test/test_eal_flags.c | 52 +++++++++++-----------\n lib/librte_eal/common/eal_common_options.c | 4 +-\n 5 files changed, 46 insertions(+), 46 deletions(-)", "diff": "diff --git a/app/test/autotest.py b/app/test/autotest.py\nindex 9eef1efbe565..988d054ba6c8 100644\n--- a/app/test/autotest.py\n+++ b/app/test/autotest.py\n@@ -10,7 +10,7 @@\n \n def usage():\n print(\"Usage: autotest.py [test app|test iso image] \",\n- \"[target] [whitelist|-blacklist]\")\n+ \"[target] [allowlist|-blocklist]\")\n \n if len(sys.argv) < 3:\n usage()\n@@ -18,18 +18,18 @@ def usage():\n \n target = sys.argv[2]\n \n-test_whitelist = None\n-test_blacklist = None\n+test_allowlist = None\n+test_blocklist = None\n \n-# get blacklist/whitelist\n+# get blocklist/allowlist\n if len(sys.argv) > 3:\n testlist = sys.argv[3].split(',')\n testlist = [test.lower() for test in testlist]\n if testlist[0].startswith('-'):\n testlist[0] = testlist[0].lstrip('-')\n- test_blacklist = testlist\n+ test_blocklist = testlist\n else:\n- test_whitelist = testlist\n+ test_allowlist = testlist\n \n cmdline = \"%s -c f\" % (sys.argv[1])\n \n@@ -39,8 +39,8 @@ def usage():\n # processes, so make it 1, otherwise make it 4. ignored for non-parallel tests\n n_processes = 1 if \"bsd\" in target else 4\n \n-runner = autotest_runner.AutotestRunner(cmdline, target, test_blacklist,\n- test_whitelist, n_processes)\n+runner = autotest_runner.AutotestRunner(cmdline, target, test_blocklist,\n+ test_allowlist, n_processes)\n \n runner.parallel_tests = autotest_data.parallel_test_list[:]\n runner.non_parallel_tests = autotest_data.non_parallel_test_list[:]\ndiff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py\nindex 998fe57a55d1..9fb94ae27352 100644\n--- a/app/test/autotest_runner.py\n+++ b/app/test/autotest_runner.py\n@@ -188,14 +188,14 @@ class AutotestRunner:\n n_tests = 0\n fails = 0\n log_buffers = []\n- blacklist = []\n- whitelist = []\n+ blocklist = []\n+ allowlist = []\n \n- def __init__(self, cmdline, target, blacklist, whitelist, n_processes):\n+ def __init__(self, cmdline, target, blocklist, allowlist, n_processes):\n self.cmdline = cmdline\n self.target = target\n- self.blacklist = blacklist\n- self.whitelist = whitelist\n+ self.blocklist = blocklist\n+ self.allowlist = allowlist\n self.skipped = []\n self.parallel_tests = []\n self.non_parallel_tests = []\n@@ -269,7 +269,7 @@ def __process_result(self, result):\n self.csvwriter.writerow([test_name, test_result, result_str])\n \n # this function checks individual test and decides if this test should be in\n- # the group by comparing it against whitelist/blacklist. it also checks if\n+ # the group by comparing it against allowlist/blocklist. it also checks if\n # the test is compiled into the binary, and marks it as skipped if necessary\n def __filter_test(self, test):\n test_cmd = test[\"Command\"]\n@@ -279,10 +279,10 @@ def __filter_test(self, test):\n if \"_autotest\" in test_id:\n test_id = test_id[:-len(\"_autotest\")]\n \n- # filter out blacklisted/whitelisted tests\n- if self.blacklist and test_id in self.blacklist:\n+ # filter out blocklisted/allowlisted tests\n+ if self.blocklist and test_id in self.blocklist:\n return False\n- if self.whitelist and test_id not in self.whitelist:\n+ if self.allowlist and test_id not in self.allowlist:\n return False\n \n # if test wasn't compiled in, remove it as well\ndiff --git a/app/test/test.c b/app/test/test.c\nindex f27a56e03390..d78eb04a25e4 100644\n--- a/app/test/test.c\n+++ b/app/test/test.c\n@@ -61,7 +61,7 @@ do_recursive_call(void)\n \t\t\t{ \"test_main_lcore_flag\", no_action },\n \t\t\t{ \"test_invalid_n_flag\", no_action },\n \t\t\t{ \"test_no_hpet_flag\", no_action },\n-\t\t\t{ \"test_whitelist_flag\", no_action },\n+\t\t\t{ \"test_allowlist_flag\", no_action },\n \t\t\t{ \"test_invalid_b_flag\", no_action },\n \t\t\t{ \"test_invalid_vdev_flag\", no_action },\n \t\t\t{ \"test_invalid_r_flag\", no_action },\ndiff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c\nindex da119d4e4a92..3d3032bb4577 100644\n--- a/app/test/test_eal_flags.c\n+++ b/app/test/test_eal_flags.c\n@@ -30,7 +30,7 @@\n #define no_hpet \"--no-hpet\"\n #define no_huge \"--no-huge\"\n #define no_shconf \"--no-shconf\"\n-#define pci_whitelist \"--pci-whitelist\"\n+#define allow \"--allow\"\n #define vdev \"--vdev\"\n #define memtest \"memtest\"\n #define memtest1 \"memtest1\"\n@@ -223,12 +223,12 @@ get_number_of_sockets(void)\n #endif\n \n /*\n- * Test that the app doesn't run with invalid whitelist option.\n+ * Test that the app doesn't run with invalid allow option.\n * Final tests ensures it does run with valid options as sanity check (one\n * test for with Domain+BDF, second for just with BDF)\n */\n static int\n-test_whitelist_flag(void)\n+test_allow_flag(void)\n {\n \tunsigned i;\n #ifdef RTE_EXEC_ENV_FREEBSD\n@@ -245,45 +245,45 @@ test_whitelist_flag(void)\n \n \tconst char *wlinval[][7] = {\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"error\", \"\", \"\"},\n+\t\t\t\tallow, \"error\", \"\", \"\"},\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"0:0:0\", \"\", \"\"},\n+\t\t\t\tallow, \"0:0:0\", \"\", \"\"},\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"0:error:0.1\", \"\", \"\"},\n+\t\t\t\tallow, \"0:error:0.1\", \"\", \"\"},\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"0:0:0.1error\", \"\", \"\"},\n+\t\t\t\tallow, \"0:0:0.1error\", \"\", \"\"},\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"error0:0:0.1\", \"\", \"\"},\n+\t\t\t\tallow, \"error0:0:0.1\", \"\", \"\"},\n \t\t{prgname, prefix, mp_flag,\n-\t\t\t\tpci_whitelist, \"0:0:0.1.2\", \"\", \"\"},\n+\t\t\t\tallow, \"0:0:0.1.2\", \"\", \"\"},\n \t};\n-\t/* Test with valid whitelist option */\n+\t/* Test with valid allow option */\n \tconst char *wlval1[] = {prgname, prefix, mp_flag,\n-\t\t\tpci_whitelist, \"00FF:09:0B.3\"};\n+\t\t\tallow, \"00FF:09:0B.3\"};\n \tconst char *wlval2[] = {prgname, prefix, mp_flag,\n-\t\t\tpci_whitelist, \"09:0B.3\", pci_whitelist, \"0a:0b.1\"};\n+\t\t\tallow, \"09:0B.3\", allow, \"0a:0b.1\"};\n \tconst char *wlval3[] = {prgname, prefix, mp_flag,\n-\t\t\tpci_whitelist, \"09:0B.3,type=test\",\n-\t\t\tpci_whitelist, \"08:00.1,type=normal\",\n+\t\t\tallow, \"09:0B.3,type=test\",\n+\t\t\tallow, \"08:00.1,type=normal\",\n \t};\n \n \tfor (i = 0; i < RTE_DIM(wlinval); i++) {\n \t\tif (launch_proc(wlinval[i]) == 0) {\n \t\t\tprintf(\"Error - process did run ok with invalid \"\n-\t\t\t \"whitelist parameter\\n\");\n+\t\t\t \"allow parameter\\n\");\n \t\t\treturn -1;\n \t\t}\n \t}\n \tif (launch_proc(wlval1) != 0 ) {\n-\t\tprintf(\"Error - process did not run ok with valid whitelist\\n\");\n+\t\tprintf(\"Error - process did not run ok with valid allow\\n\");\n \t\treturn -1;\n \t}\n \tif (launch_proc(wlval2) != 0 ) {\n-\t\tprintf(\"Error - process did not run ok with valid whitelist value set\\n\");\n+\t\tprintf(\"Error - process did not run ok with valid allow value set\\n\");\n \t\treturn -1;\n \t}\n \tif (launch_proc(wlval3) != 0 ) {\n-\t\tprintf(\"Error - process did not run ok with valid whitelist + args\\n\");\n+\t\tprintf(\"Error - process did not run ok with valid allow + args\\n\");\n \t\treturn -1;\n \t}\n \n@@ -291,7 +291,7 @@ test_whitelist_flag(void)\n }\n \n /*\n- * Test that the app doesn't run with invalid blacklist option.\n+ * Test that the app doesn't run with invalid blocklist option.\n * Final test ensures it does run with valid options as sanity check\n */\n static int\n@@ -317,7 +317,7 @@ test_invalid_b_flag(void)\n \t\t{prgname, prefix, mp_flag, \"-b\", \"error0:0:0.1\"},\n \t\t{prgname, prefix, mp_flag, \"-b\", \"0:0:0.1.2\"},\n \t};\n-\t/* Test with valid blacklist option */\n+\t/* Test with valid blocklist option */\n \tconst char *blval[] = {prgname, prefix, mp_flag,\n \t\t\t \"-b\", \"FF:09:0B.3\"};\n \n@@ -326,12 +326,12 @@ test_invalid_b_flag(void)\n \tfor (i = 0; i != RTE_DIM(blinval); i++) {\n \t\tif (launch_proc(blinval[i]) == 0) {\n \t\t\tprintf(\"Error - process did run ok with invalid \"\n-\t\t\t \"blacklist parameter\\n\");\n+\t\t\t \"blocklist parameter\\n\");\n \t\t\treturn -1;\n \t\t}\n \t}\n \tif (launch_proc(blval) != 0) {\n-\t\tprintf(\"Error - process did not run ok with valid blacklist value\\n\");\n+\t\tprintf(\"Error - process did not run ok with valid blocklist value\\n\");\n \t\treturn -1;\n \t}\n \treturn 0;\n@@ -419,7 +419,7 @@ test_invalid_r_flag(void)\n \t\t\t{prgname, prefix, mp_flag, \"-r\", \"-1\"},\n \t\t\t{prgname, prefix, mp_flag, \"-r\", \"17\"},\n \t};\n-\t/* Test with valid blacklist option */\n+\t/* Test with valid blocklist option */\n \tconst char *rval[] = {prgname, prefix, mp_flag, \"-r\", \"16\"};\n \n \tint i;\n@@ -1492,9 +1492,9 @@ test_eal_flags(void)\n \t\treturn ret;\n \t}\n \n-\tret = test_whitelist_flag();\n+\tret = test_allow_flag();\n \tif (ret < 0) {\n-\t\tprintf(\"Error in test_invalid_whitelist_flag()\\n\");\n+\t\tprintf(\"Error in test_invalid_allow_flag()\\n\");\n \t\treturn ret;\n \t}\n \n@@ -1546,7 +1546,7 @@ REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);\n REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);\n REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);\n REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);\n-REGISTER_TEST_COMMAND(eal_flags_w_opt_autotest, test_whitelist_flag);\n+REGISTER_TEST_COMMAND(eal_flags_w_opt_autotest, test_allow_flag);\n REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);\n REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);\n REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 96ba5fe9f632..879a384fb7c1 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -90,8 +90,8 @@ eal_long_options[] = {\n \t{OPT_NO_HUGE, 0, NULL, OPT_NO_HUGE_NUM },\n \t{OPT_NO_PCI, 0, NULL, OPT_NO_PCI_NUM },\n \t{OPT_NO_SHCONF, 0, NULL, OPT_NO_SHCONF_NUM },\n-\t{OPT_IN_MEMORY, 0, NULL, OPT_IN_MEMORY_NUM },\n-\t{OPT_DEV_BLOCK, \t1, NULL, OPT_DEV_BLOCK_NUM\t },\n+\t{OPT_IN_MEMORY,\t\t0, NULL, OPT_IN_MEMORY_NUM\t },\n+\t{OPT_DEV_BLOCK,\t\t1, NULL, OPT_DEV_BLOCK_NUM\t },\n \t{OPT_DEV_ALLOW,\t\t1, NULL, OPT_DEV_ALLOW_NUM\t },\n \t{OPT_PROC_TYPE, 1, NULL, OPT_PROC_TYPE_NUM },\n \t{OPT_SOCKET_MEM, 1, NULL, OPT_SOCKET_MEM_NUM },\n", "prefixes": [ "v2", "4/5" ] }{ "id": 81612, "url": "