Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/12373/?format=api
https://patches.dpdk.org/api/patches/12373/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1462383137-24045-1-git-send-email-thomas.monjalon@6wind.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": "<1462383137-24045-1-git-send-email-thomas.monjalon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1462383137-24045-1-git-send-email-thomas.monjalon@6wind.com", "date": "2016-05-04T17:32:17", "name": "[dpdk-dev] app/test: shorten execution time", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1b5ccf1c7cb1ab246cc4fc1609b04abdb6bb7c4a", "submitter": { "id": 1, "url": "https://patches.dpdk.org/api/people/1/?format=api", "name": "Thomas Monjalon", "email": "thomas.monjalon@6wind.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1462383137-24045-1-git-send-email-thomas.monjalon@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/12373/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/12373/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 6DC6E37B8;\n\tWed, 4 May 2016 19:32:31 +0200 (CEST)", "from mail-wm0-f42.google.com (mail-wm0-f42.google.com\n\t[74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 65F36376D\n\tfor <dev@dpdk.org>; Wed, 4 May 2016 19:32:29 +0200 (CEST)", "by mail-wm0-f42.google.com with SMTP id n129so198444106wmn.1\n\tfor <dev@dpdk.org>; Wed, 04 May 2016 10:32:29 -0700 (PDT)", "from XPS13.localdomain (184.203.134.77.rev.sfr.net.\n\t[77.134.203.184]) by smtp.gmail.com with ESMTPSA id\n\tb1sm6111436wma.13.2016.05.04.10.32.28\n\tfor <dev@dpdk.org> (version=TLSv1/SSLv3 cipher=OTHER);\n\tWed, 04 May 2016 10:32:28 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:subject:date:message-id;\n\tbh=sYJQEFjZuhvtUpVOKVMwa75SfK5SgWXNrXXz++kFst0=;\n\tb=o0EWdiJsT3uA0EcYt2c2rwCgnEAeGnfHSyE8fLkRQB5905TayoZ2cHZhZ9Dk5Iv/7q\n\tZPWKdOukUReRXpX1bGe75/5eMIlWm1XGj81IFl6tw5Fn/wi2iKJ+UXTSG4lSl9bAjsXT\n\tN8K2TpXe9dW6rZEeL/x6Hs/iEFu8rTHbs9CY3V68/e7r4iL1QJwtuC4TtTIVm91pxL+E\n\tGniuXg3Izko6kvxwlLocoyB5+hQw9g8LZo1en7fg7aeclg7IFAKow3f4uqLUBGremtdF\n\t2CSdPILmJ1z1dOaTczAhHyZxfbS93JAE1KWnkDscdT3kK3P6FgTDlkpKTDilBwsr5czQ\n\tzM6w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:subject:date:message-id;\n\tbh=sYJQEFjZuhvtUpVOKVMwa75SfK5SgWXNrXXz++kFst0=;\n\tb=YRmhrDP4S5RpEXgB3R6ZMPm7/mgYyuUfLdC2MJceif2rrkxq0GThfwvRFMJ036PKgg\n\twthKsfiZdj8AD9o/wNJf15igFABH6A5lEsXSppsrNiam9oOcWQ5mR/EQnjz2+UV3K2mz\n\tftVLorjz8m4VtLewht3GVS7o8oN+ETqBXWvfAzrDgU+0stMj23sgXvFuNodAN335rgCT\n\tIy933qmV6S7T7jOQQo/q3NmkYmrSY+3Hon5zNFSGoOFIM6Uf7KtDzrATWB9x46r9Ql9I\n\tkjVKfe7VYGdiAlZKxi9NJFAXkVt9+U69mymLQCmE/GxGLH0ANJnlKoPcjq5j3HOnaQMB\n\tm/6g==", "X-Gm-Message-State": "AOPr4FWDCDzN6BneYjybLEkP/4bs0V7NoKE7KLIRRphUSuzIVOq7Jb9Gmxach2ZHmRqgQ0lU", "X-Received": "by 10.194.114.228 with SMTP id jj4mr9927647wjb.121.1462383149106;\n\tWed, 04 May 2016 10:32:29 -0700 (PDT)", "From": "Thomas Monjalon <thomas.monjalon@6wind.com>", "To": "dev@dpdk.org", "Date": "Wed, 4 May 2016 19:32:17 +0200", "Message-Id": "<1462383137-24045-1-git-send-email-thomas.monjalon@6wind.com>", "X-Mailer": "git-send-email 2.7.0", "Subject": "[dpdk-dev] [PATCH] app/test: shorten execution time", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The autotests are too long to be run often.\nThis patch reduces the needed time of some tests in fast_test.\nThe others will be analyzed when they will be able to run in a\nVM with a reasonnable amount of memory.\n\nThe current status in a small VM is below:\n\n> make fast_test\n/root/dpdk/build/app/test -c f -n 4\n\nTest name Test result Test\nTotal", "diff": "================================================================================\nStart group_1: Success [00m 00s]\nTimer autotest: Success [00m 02s]\nDebug autotest: Success [00m 00s]\nErrno autotest: Success [00m 00s]\nMeter autotest: Success [00m 00s]\nCommon autotest: Success [00m 01s]\nDump log history: Success [00m 00s]\nDump rings: Success [00m 00s]\nDump mempools: Success [00m 00s] [00m 05s]\nStart group_2: Success [00m 00s]\nMemory autotest: Success [00m 00s]\nRead/write lock autotest: Success [00m 00s]\nLogs autotest: Success [00m 00s]\nCPU flags autotest: Success [00m 00s]\nVersion autotest: Success [00m 00s]\nEAL filesystem autotest: Success [00m 00s]\nEAL flags autotest: Success [00m 05s]\nHash autotest: Success [00m 00s] [00m 11s]\nStart group_3: Fail [No prompt] [00m 00s]\nLPM autotest: Fail [No prompt] [00m 00s]\nIVSHMEM autotest: Fail [No prompt] [00m 00s]\nMemcpy autotest: Fail [No prompt] [00m 00s]\nMemzone autotest: Fail [No prompt] [00m 00s]\nString autotest: Fail [No prompt] [00m 00s]\nAlarm autotest: Fail [No prompt] [00m 00s] [00m 11s]\nStart group_4: Success [00m 00s]\nPCI autotest: Success [00m 00s]\nMalloc autotest: Success [00m 00s]\nMulti-process autotest: Success [00m 00s]\nMbuf autotest: Success [00m 02s]\nPer-lcore autotest: Success [00m 00s]\nRing autotest: Success [00m 00s] [00m 16s]\nStart group_5: Success [00m 00s]\nSpinlock autotest: Success [00m 00s]\nByte order autotest: Success [00m 00s]\nTAILQ autotest: Success [00m 00s]\nCommand-line autotest: Success [00m 00s]\nInterrupts autotest: Success [00m 00s] [00m 18s]\nStart group_6: Fail [No prompt] [00m 00s]\nFunction reentrancy autotest: Fail [No prompt] [00m 00s]\nMempool autotest: Fail [No prompt] [00m 00s]\nAtomics autotest: Fail [No prompt] [00m 00s]\nPrefetch autotest: Fail [No prompt] [00m 00s]\nRed autotest: Fail [No prompt] [00m 00s] [00m 18s]\nStart group_7: Success [00m 00s]\nPMD ring autotest: Success [00m 00s]\nAccess list control autotest: Success [00m 01s]\nSched autotest: Success [00m 00s] [00m 20s]\nStart kni: Fail [No prompt] [00m 00s]\nKNI autotest: Fail [No prompt] [00m 00s] [00m 20s]\nStart mempool_perf: Success [00m 00s]\nCycles autotest: Success [00m 01s] [00m 22s]\nStart power: Fail [No prompt] [00m 00s]\nPower autotest: Fail [No prompt] [00m 00s] [00m 22s]\nStart power_acpi_cpufreq: Fail [No prompt] [00m 00s]\nPower ACPI cpufreq autotest: Fail [No prompt] [00m 00s] [00m 22s]\nStart power_kvm_vm: Fail [No prompt] [00m 00s]\nPower KVM VM autotest: Fail [No prompt] [00m 00s] [00m 23s]\nStart timer_perf: Fail [No prompt] [00m 00s]\nTimer performance autotest: Fail [No prompt] [00m 00s] [00m 23s]\n================================================================================\nTotal run time: 00m 23s\nNumber of failed tests: 16\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n app/test/autotest_test_funcs.py | 14 +++++++-------\n app/test/test_hash.c | 8 ++++----\n app/test/test_interrupts.c | 4 ++--\n app/test/test_mbuf.c | 2 +-\n app/test/test_per_lcore.c | 4 ++--\n app/test/test_ring.c | 7 +++----\n app/test/test_spinlock.c | 6 +++---\n app/test/test_timer.c | 20 ++++++++++----------\n 8 files changed, 32 insertions(+), 33 deletions(-)\n\ndiff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py\nindex f04909d..5222f6e 100644\n--- a/app/test/autotest_test_funcs.py\n+++ b/app/test/autotest_test_funcs.py\n@@ -83,7 +83,7 @@ def spinlock_autotest(child, test_name):\n \t\t\t\"Test Failed\",\n \t\t\t\"Hello from core ([0-9]*) !\",\n \t\t\t\"Hello from within recursive locks from ([0-9]*) !\",\n-\t\tpexpect.TIMEOUT], timeout = 20)\n+\t\tpexpect.TIMEOUT], timeout = 5)\n \t\t# ok\n \t\tif index == 0:\n \t\t\tbreak\n@@ -177,9 +177,9 @@ def timer_autotest(child, test_name):\n \ti = 0\n \tchild.sendline(test_name)\n \n-\tindex = child.expect([\"Start timer stress tests \\(20 seconds\\)\",\n+\tindex = child.expect([\"Start timer stress tests\",\n \t\t\"Test Failed\",\n-\t\tpexpect.TIMEOUT], timeout = 10)\n+\t\tpexpect.TIMEOUT], timeout = 5)\n \n \tif index == 1:\n \t\treturn -1, \"Fail\"\n@@ -188,16 +188,16 @@ def timer_autotest(child, test_name):\n \n \tindex = child.expect([\"Start timer stress tests 2\",\n \t\t\"Test Failed\",\n-\t\tpexpect.TIMEOUT], timeout = 40)\n+\t\tpexpect.TIMEOUT], timeout = 5)\n \n \tif index == 1:\n \t\treturn -1, \"Fail\"\n \telif index == 2:\n \t\treturn -1, \"Fail [Timeout]\"\n \n-\tindex = child.expect([\"Start timer basic tests \\(20 seconds\\)\",\n+\tindex = child.expect([\"Start timer basic tests\",\n \t\t\"Test Failed\",\n-\t\tpexpect.TIMEOUT], timeout = 20)\n+\t\tpexpect.TIMEOUT], timeout = 5)\n \n \tif index == 1:\n \t\treturn -1, \"Fail\"\n@@ -277,7 +277,7 @@ def timer_autotest(child, test_name):\n def ring_autotest(child, test_name):\n \tchild.sendline(test_name)\n \tindex = child.expect([\"Test OK\", \"Test Failed\",\n-\t\tpexpect.TIMEOUT], timeout = 15)\n+\t\tpexpect.TIMEOUT], timeout = 2)\n \tif index == 1:\n \t\treturn -1, \"Fail\"\n \telif index == 2:\ndiff --git a/app/test/test_hash.c b/app/test/test_hash.c\nindex 61fc0a0..7e41725 100644\n--- a/app/test/test_hash.c\n+++ b/app/test/test_hash.c\n@@ -176,7 +176,7 @@ static struct rte_hash_parameters ut_params = {\n \t.socket_id = 0,\n };\n \n-#define CRC32_ITERATIONS (1U << 20)\n+#define CRC32_ITERATIONS (1U << 10)\n #define CRC32_DWORDS (1U << 6)\n /*\n * Test if all CRC32 implementations yield the same hash value\n@@ -1081,7 +1081,7 @@ test_hash_creation_with_good_parameters(void)\n \treturn 0;\n }\n \n-#define ITERATIONS 50\n+#define ITERATIONS 3\n /*\n * Test to see the average table utilization (entries added/max entries)\n * before hitting a random entry that cannot be added\n@@ -1098,7 +1098,7 @@ static int test_average_table_utilization(void)\n \t \"\\n before adding elements begins to fail\\n\");\n \tprintf(\"Measuring performance, please wait\");\n \tfflush(stdout);\n-\tut_params.entries = 1 << 20;\n+\tut_params.entries = 1 << 16;\n \tut_params.name = \"test_average_utilization\";\n \tut_params.hash_func = rte_jhash;\n \thandle = rte_hash_create(&ut_params);\n@@ -1138,7 +1138,7 @@ static int test_average_table_utilization(void)\n \treturn 0;\n }\n \n-#define NUM_ENTRIES 1024\n+#define NUM_ENTRIES 256\n static int test_hash_iteration(void)\n {\n \tstruct rte_hash *handle;\ndiff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c\nindex 6e3dec3..df6d261 100644\n--- a/app/test/test_interrupts.c\n+++ b/app/test/test_interrupts.c\n@@ -41,7 +41,7 @@\n \n #include \"test.h\"\n \n-#define TEST_INTERRUPT_CHECK_INTERVAL 1000 /* ms */\n+#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */\n \n /* predefined interrupt handle types */\n enum test_interrupt_handle_type {\n@@ -372,7 +372,7 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)\n \tif (test_interrupt_trigger_interrupt() < 0)\n \t\treturn -1;\n \n-\t/* check flag in 3 seconds */\n+\t/* check flag */\n \tfor (count = 0; flag == 0 && count < 3; count++)\n \t\trte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL);\n \ndiff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c\nindex 98ff93a..59f9979 100644\n--- a/app/test/test_mbuf.c\n+++ b/app/test/test_mbuf.c\n@@ -748,7 +748,7 @@ test_refcnt_iter(unsigned lcore, unsigned iter)\n \t\t\t __func__, lcore, iter, tref);\n \t\t\treturn;\n \t\t}\n-\t\trte_delay_ms(1000);\n+\t\trte_delay_ms(100);\n \t}\n \n \trte_panic(\"(lcore=%u, iter=%u): after %us only \"\ndiff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c\nindex b16449a..f452cdb 100644\n--- a/app/test/test_per_lcore.c\n+++ b/app/test/test_per_lcore.c\n@@ -92,8 +92,8 @@ display_vars(__attribute__((unused)) void *arg)\n static int\n test_per_lcore_delay(__attribute__((unused)) void *arg)\n {\n-\trte_delay_ms(5000);\n-\tprintf(\"wait 5000ms on lcore %u\\n\", rte_lcore_id());\n+\trte_delay_ms(100);\n+\tprintf(\"wait 100ms on lcore %u\\n\", rte_lcore_id());\n \n \treturn 0;\n }\ndiff --git a/app/test/test_ring.c b/app/test/test_ring.c\nindex 0d7523e..d18812e 100644\n--- a/app/test/test_ring.c\n+++ b/app/test/test_ring.c\n@@ -101,7 +101,6 @@\n #define RING_SIZE 4096\n #define MAX_BULK 32\n #define N 65536\n-#define TIME_S 5\n \n static rte_atomic32_t synchro;\n \n@@ -130,7 +129,7 @@ check_live_watermark_change(__attribute__((unused)) void *dummy)\n \n \t/* init the object table */\n \tmemset(obj_table, 0, sizeof(obj_table));\n-\tend_time = rte_get_timer_cycles() + (hz * 2);\n+\tend_time = rte_get_timer_cycles() + (hz / 4);\n \n \t/* check that bulk and watermark are 4 and 32 (respectively) */\n \twhile (diff >= 0) {\n@@ -194,9 +193,9 @@ test_live_watermark_change(void)\n \t * watermark and quota */\n \trte_eal_remote_launch(check_live_watermark_change, NULL, lcore_id2);\n \n-\trte_delay_ms(1000);\n+\trte_delay_ms(100);\n \trte_ring_set_water_mark(r, 32);\n-\trte_delay_ms(1000);\n+\trte_delay_ms(100);\n \n \tif (rte_eal_wait_lcore(lcore_id2) < 0)\n \t\treturn -1;\ndiff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c\nindex 16ced7f..180d6de 100644\n--- a/app/test/test_spinlock.c\n+++ b/app/test/test_spinlock.c\n@@ -129,7 +129,7 @@ test_spinlock_recursive_per_core(__attribute__((unused)) void *arg)\n static rte_spinlock_t lk = RTE_SPINLOCK_INITIALIZER;\n static uint64_t lock_count[RTE_MAX_LCORE] = {0};\n \n-#define TIME_S 5\n+#define TIME_MS 100\n \n static int\n load_loop_fn(void *func_param)\n@@ -145,7 +145,7 @@ load_loop_fn(void *func_param)\n \t\twhile (rte_atomic32_read(&synchro) == 0);\n \n \tbegin = rte_get_timer_cycles();\n-\twhile (time_diff / hz < TIME_S) {\n+\twhile (time_diff < hz * TIME_MS / 1000) {\n \t\tif (use_lock)\n \t\t\trte_spinlock_lock(&lk);\n \t\tlcount++;\n@@ -258,7 +258,7 @@ test_spinlock(void)\n \n \tRTE_LCORE_FOREACH_SLAVE(i) {\n \t\trte_spinlock_unlock(&sl_tab[i]);\n-\t\trte_delay_ms(100);\n+\t\trte_delay_ms(10);\n \t}\n \n \trte_eal_mp_wait_lcore();\ndiff --git a/app/test/test_timer.c b/app/test/test_timer.c\nindex 944e2ad..bc07925 100644\n--- a/app/test/test_timer.c\n+++ b/app/test/test_timer.c\n@@ -137,7 +137,7 @@\n #include <rte_random.h>\n #include <rte_malloc.h>\n \n-#define TEST_DURATION_S 20 /* in seconds */\n+#define TEST_DURATION_S 1 /* in seconds */\n #define NB_TIMER 4\n \n #define RTE_LOGTYPE_TESTTIMER RTE_LOGTYPE_USER3\n@@ -305,7 +305,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg)\n {\n \tstatic struct rte_timer *timers;\n \tint i, ret;\n-\tuint64_t delay = rte_get_timer_hz() / 4;\n+\tuint64_t delay = rte_get_timer_hz() / 20;\n \tunsigned lcore_id = rte_lcore_id();\n \tunsigned master = rte_get_master_lcore();\n \tint32_t my_collisions = 0;\n@@ -346,7 +346,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg)\n \t\trte_atomic32_add(&collisions, my_collisions);\n \n \t/* wait long enough for timers to expire */\n-\trte_delay_ms(500);\n+\trte_delay_ms(100);\n \n \t/* all cores rendezvous */\n \tif (lcore_id == master) {\n@@ -396,7 +396,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg)\n \t}\n \n \t/* wait long enough for timers to expire */\n-\trte_delay_ms(500);\n+\trte_delay_ms(100);\n \n \t/* now check that we get the right number of callbacks */\n \tif (lcore_id == master) {\n@@ -495,13 +495,13 @@ timer_basic_main_loop(__attribute__((unused)) void *arg)\n \n \t/* launch all timers on core 0 */\n \tif (lcore_id == rte_get_master_lcore()) {\n-\t\tmytimer_reset(&mytiminfo[0], hz, SINGLE, lcore_id,\n+\t\tmytimer_reset(&mytiminfo[0], hz/4, SINGLE, lcore_id,\n \t\t\t timer_basic_cb);\n-\t\tmytimer_reset(&mytiminfo[1], hz*2, SINGLE, lcore_id,\n+\t\tmytimer_reset(&mytiminfo[1], hz/2, SINGLE, lcore_id,\n \t\t\t timer_basic_cb);\n-\t\tmytimer_reset(&mytiminfo[2], hz, PERIODICAL, lcore_id,\n+\t\tmytimer_reset(&mytiminfo[2], hz/4, PERIODICAL, lcore_id,\n \t\t\t timer_basic_cb);\n-\t\tmytimer_reset(&mytiminfo[3], hz, PERIODICAL,\n+\t\tmytimer_reset(&mytiminfo[3], hz/4, PERIODICAL,\n \t\t\t rte_get_next_lcore(lcore_id, 0, 1),\n \t\t\t timer_basic_cb);\n \t}\n@@ -591,7 +591,7 @@ test_timer(void)\n \tend_time = cur_time + (hz * TEST_DURATION_S);\n \n \t/* start other cores */\n-\tprintf(\"Start timer stress tests (%d seconds)\\n\", TEST_DURATION_S);\n+\tprintf(\"Start timer stress tests\\n\");\n \trte_eal_mp_remote_launch(timer_stress_main_loop, NULL, CALL_MASTER);\n \trte_eal_mp_wait_lcore();\n \n@@ -612,7 +612,7 @@ test_timer(void)\n \tend_time = cur_time + (hz * TEST_DURATION_S);\n \n \t/* start other cores */\n-\tprintf(\"\\nStart timer basic tests (%d seconds)\\n\", TEST_DURATION_S);\n+\tprintf(\"\\nStart timer basic tests\\n\");\n \trte_eal_mp_remote_launch(timer_basic_main_loop, NULL, CALL_MASTER);\n \trte_eal_mp_wait_lcore();\n \n", "prefixes": [ "dpdk-dev" ] }{ "id": 12373, "url": "