From patchwork Tue Jun 4 08:59:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54332 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0AC601BB5A; Tue, 4 Jun 2019 11:00:14 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id F19631BB32; Tue, 4 Jun 2019 11:00:12 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 688F3309B14E; Tue, 4 Jun 2019 09:00:12 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C2535D9D2; Tue, 4 Jun 2019 09:00:07 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org Date: Tue, 4 Jun 2019 10:59:39 +0200 Message-Id: <1559638792-8608-2-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 04 Jun 2019 09:00:12 +0000 (UTC) Subject: [dpdk-dev] [PATCH 01/14] test/bonding: add missing sources for link bonding RSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test/meson.build b/app/test/meson.build index 83391ce..faf16ee 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -58,6 +58,7 @@ test_sources = files('commands.c', 'test_latencystats.c', 'test_link_bonding.c', 'test_link_bonding_mode4.c', + 'test_link_bonding_rssconf.c', 'test_logs.c', 'test_lpm.c', 'test_lpm6.c', From patchwork Tue Jun 4 08:59:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54333 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32B771BB91; Tue, 4 Jun 2019 11:00:18 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 425651BB7D; Tue, 4 Jun 2019 11:00:16 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A81B1B2DEF; Tue, 4 Jun 2019 09:00:15 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id C69845DD6D; Tue, 4 Jun 2019 09:00:12 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org Date: Tue, 4 Jun 2019 10:59:40 +0200 Message-Id: <1559638792-8608-3-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Jun 2019 09:00:15 +0000 (UTC) Subject: [dpdk-dev] [PATCH 02/14] test/crypto: move tests to the driver specific list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For consistency, put all specific crypto driver tests in the dedicated list (in alphabetic order). While at it: - remove dead reference to cryptodev_sw_mrvl_autotest (renamed as cryptodev_sw_mvsam_autotest), - call the crypto scheduler test only when built, Fixes: 9eabcb682493 ("test: update autotest list") Fixes: 3d20ffe6ddb1 ("test: reorder test cases in meson") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/autotest_data.py | 4 ++-- app/test/meson.build | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 0f2c9a7..6cf7eca 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -393,8 +393,8 @@ "Report": None, }, { - "Name": "Cryptodev sw mrvl autotest", - "Command": "cryptodev_sw_mrvl_autotest", + "Name": "Cryptodev sw mvsam autotest", + "Command": "cryptodev_sw_mvsam_autotest", "Func": default_autotest, "Report": None, }, diff --git a/app/test/meson.build b/app/test/meson.build index faf16ee..d428e02 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -196,10 +196,7 @@ fast_parallel_test_names = [ # All test cases in fast_non_parallel_test_names list are non-parallel fast_non_parallel_test_names = [ 'bitratestats_autotest', - 'cryptodev_sw_armv8_autotest', 'crc_autotest', - 'cryptodev_openssl_asym_autotest', - 'cryptodev_sw_mvsam_autotest', 'delay_us_sleep_autotest', 'distributor_autotest', 'eventdev_common_autotest', @@ -255,21 +252,22 @@ perf_test_names = [ # All test cases in driver_test_names list are non-parallel driver_test_names = [ - 'link_bonding_autotest', - 'link_bonding_mode4_autotest', - 'link_bonding_rssconf_autotest', - 'cryptodev_sw_mrvl_autotest', - 'cryptodev_dpaa2_sec_autotest', - 'cryptodev_dpaa_sec_autotest', - 'cryptodev_qat_autotest', 'cryptodev_aesni_mb_autotest', - 'cryptodev_openssl_autotest', - 'cryptodev_scheduler_autotest', 'cryptodev_aesni_gcm_autotest', + 'cryptodev_dpaa_sec_autotest', + 'cryptodev_dpaa2_sec_autotest', 'cryptodev_null_autotest', - 'cryptodev_sw_snow3g_autotest', + 'cryptodev_openssl_autotest', + 'cryptodev_openssl_asym_autotest', + 'cryptodev_qat_autotest', + 'cryptodev_sw_armv8_autotest', 'cryptodev_sw_kasumi_autotest', + 'cryptodev_sw_mvsam_autotest', + 'cryptodev_sw_snow3g_autotest', 'cryptodev_sw_zuc_autotest', + 'link_bonding_autotest', + 'link_bonding_mode4_autotest', + 'link_bonding_rssconf_autotest', ] # All test cases in dump_test_names list are non-parallel @@ -325,6 +323,10 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') endif endif +if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER') + driver_test_names += 'cryptodev_scheduler_autotest' +endif + foreach d:test_deps def_lib = get_option('default_library') test_dep_objs += get_variable(def_lib + '_rte_' + d) From patchwork Tue Jun 4 08:59:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54334 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3419A1BB86; Tue, 4 Jun 2019 11:00:22 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B7E591BBD5; Tue, 4 Jun 2019 11:00:20 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 368FD30C0DC9; Tue, 4 Jun 2019 09:00:20 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13E4817D9F; Tue, 4 Jun 2019 09:00:15 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org Date: Tue, 4 Jun 2019 10:59:41 +0200 Message-Id: <1559638792-8608-4-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 04 Jun 2019 09:00:20 +0000 (UTC) Subject: [dpdk-dev] [PATCH 03/14] test/eventdev: move tests to the driver specific list X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Same treatment than crypto tests, move the eventdev drivers tests in the driver list. While at it: - eventdev_octeontx_autotest has been renamed as eventdev_selftest_octeontx, - eventdev_sw_autotest has been renamed as eventdev_selftest_sw, Fixes: 50fb749a3972 ("event/octeontx: move test to driver") Fixes: 85fb515b7318 ("event/sw: move test to driver") Fixes: 123d67c73b06 ("test/event: register selftests") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index d428e02..eb3df24 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -200,8 +200,6 @@ fast_non_parallel_test_names = [ 'delay_us_sleep_autotest', 'distributor_autotest', 'eventdev_common_autotest', - 'eventdev_octeontx_autotest', - 'eventdev_sw_autotest', 'fbarray_autotest', 'hash_readwrite_autotest', 'hash_readwrite_lf_autotest', @@ -237,7 +235,6 @@ perf_test_names = [ 'timer_racecond_autotest', 'efd_autotest', 'hash_functions_autotest', - 'eventdev_selftest_sw', 'member_perf_autotest', 'efd_perf_autotest', 'lpm6_perf_autotest', @@ -265,6 +262,8 @@ driver_test_names = [ 'cryptodev_sw_mvsam_autotest', 'cryptodev_sw_snow3g_autotest', 'cryptodev_sw_zuc_autotest', + 'eventdev_selftest_octeontx', + 'eventdev_selftest_sw', 'link_bonding_autotest', 'link_bonding_mode4_autotest', 'link_bonding_rssconf_autotest', From patchwork Tue Jun 4 08:59:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54335 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5C061BBE3; Tue, 4 Jun 2019 11:00:29 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 619E21BB65; Tue, 4 Jun 2019 11:00:28 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C87A33107B29; Tue, 4 Jun 2019 09:00:27 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9638D5DD6D; Tue, 4 Jun 2019 09:00:20 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson , Pablo de Lara Date: Tue, 4 Jun 2019 10:59:42 +0200 Message-Id: <1559638792-8608-5-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:27 +0000 (UTC) Subject: [dpdk-dev] [PATCH 04/14] test/hash: fix off-by-one check on core count X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This subtest wants to start rwc_core_cnt[n] reader threads, while the master core is waiting for them to report. Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole Acked-by: Yipeng Wang --- app/test/test_hash_readwrite_lf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 343a338..f9f233a 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -939,7 +939,7 @@ struct { } for (n = 0; n < NUM_TEST; n++) { unsigned int tot_lcore = rte_lcore_count(); - if (tot_lcore < rwc_core_cnt[n]) + if (tot_lcore < rwc_core_cnt[n] + 1) goto finish; printf("\nNumber of readers: %u\n", rwc_core_cnt[n]); From patchwork Tue Jun 4 08:59:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54336 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 518A11BBE2; Tue, 4 Jun 2019 11:00:36 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3F6931BB78; Tue, 4 Jun 2019 11:00:35 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0E8FC1EB1E1; Tue, 4 Jun 2019 09:00:34 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34EB418674; Tue, 4 Jun 2019 09:00:28 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, Dharmik Thakkar , stable@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson , Pablo de Lara Date: Tue, 4 Jun 2019 10:59:43 +0200 Message-Id: <1559638792-8608-6-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jun 2019 09:00:34 +0000 (UTC) Subject: [dpdk-dev] [PATCH 05/14] test/hash: rectify slaveid to point to valid cores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Dharmik Thakkar This patch rectifies slave_id to point to valid core indexes rather than core ranks in read-write lock-free concurrency test. It also replaces a 'for' loop with RTE_LCORE_FOREACH API. Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency") Cc: stable@dpdk.org Signed-off-by: Dharmik Thakkar Reviewed-by: Ruifeng Wang Signed-off-by: David Marchand Acked-by: Yipeng Wang --- app/test/test_hash_readwrite_lf.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index f9f233a..5644361 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -126,11 +126,9 @@ struct { uint32_t i = 0; uint16_t core_id; uint32_t max_cores = rte_lcore_count(); - for (core_id = 0; core_id < RTE_MAX_LCORE && i < max_cores; core_id++) { - if (rte_lcore_is_enabled(core_id)) { - enabled_core_ids[i] = core_id; - i++; - } + RTE_LCORE_FOREACH(core_id) { + enabled_core_ids[i] = core_id; + i++; } if (i != max_cores) { @@ -738,7 +736,7 @@ struct { enabled_core_ids[i]); for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -810,7 +808,7 @@ struct { if (ret < 0) goto err; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -886,7 +884,7 @@ struct { if (ret < 0) goto err; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -962,7 +960,7 @@ struct { if (ret < 0) goto err; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -1037,7 +1035,7 @@ struct { if (ret < 0) goto err; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -1132,12 +1130,12 @@ struct { for (i = rwc_core_cnt[n] + 1; i <= rwc_core_cnt[m] + rwc_core_cnt[n]; i++) - rte_eal_wait_lcore(i); + rte_eal_wait_lcore(enabled_core_ids[i]); writer_done = 1; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = @@ -1221,7 +1219,7 @@ struct { writer_done = 1; for (i = 1; i <= rwc_core_cnt[n]; i++) - if (rte_eal_wait_lcore(i) < 0) + if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0) goto err; unsigned long long cycles_per_lookup = From patchwork Tue Jun 4 08:59:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54337 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 063CE1BBED; Tue, 4 Jun 2019 11:00:41 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 38CC11BBDB; Tue, 4 Jun 2019 11:00:39 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A30533107B3A; Tue, 4 Jun 2019 09:00:38 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10C3E5DD6D; Tue, 4 Jun 2019 09:00:34 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org Date: Tue, 4 Jun 2019 10:59:44 +0200 Message-Id: <1559638792-8608-7-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:38 +0000 (UTC) Subject: [dpdk-dev] [PATCH 06/14] test/hash: clean remaining trace of scaling autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 3c518ca41ffa ("test/hash: remove hash scaling unit test") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/app/test/meson.build b/app/test/meson.build index eb3df24..cd46289 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -203,7 +203,6 @@ fast_non_parallel_test_names = [ 'fbarray_autotest', 'hash_readwrite_autotest', 'hash_readwrite_lf_autotest', - 'hash_scaling_autotest', 'ipsec_autotest', 'kni_autotest', 'kvargs_autotest', From patchwork Tue Jun 4 08:59:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54338 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79D9E1BB6F; Tue, 4 Jun 2019 11:00:45 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 175601BBF9; Tue, 4 Jun 2019 11:00:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7066A3107B1F; Tue, 4 Jun 2019 09:00:43 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D31118A5D; Tue, 4 Jun 2019 09:00:38 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org, Reshma Pattan Date: Tue, 4 Jun 2019 10:59:45 +0200 Message-Id: <1559638792-8608-8-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:43 +0000 (UTC) Subject: [dpdk-dev] [PATCH 07/14] test/latencystats: fix stack smashing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Caught in one Travis run: + ------------------------------------------------------- + + Test Suite : Latency Stats Unit Test Suite + ------------------------------------------------------- + + TestCase [ 0] : test_latency_init succeeded + TestCase [ 1] : test_latency_update succeeded [snip] + TestCase [1601724781] : test_latencystats_get_names succeeded [snip] + Tests Failed : 1601790830 htonl(1601724781) -> "m", "a", "x", "_" htonl(1601790830) -> "n", "c", "y", "_" Looks like someone went too far. The test passes a bigger size than the array it passes along. Fixes: 1e3676a06e4c ("test/latency: add unit tests for latencystats library") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/test_latencystats.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/test/test_latencystats.c b/app/test/test_latencystats.c index 039c508..8dd794b 100644 --- a/app/test/test_latencystats.c +++ b/app/test/test_latencystats.c @@ -69,13 +69,10 @@ static int test_latencystats_get_names(void) int ret = 0, i = 0; int size = 0; struct rte_metric_name names[NUM_STATS]; - struct rte_metric_name wrongnames[NUM_STATS - 2]; size_t m_size = sizeof(struct rte_metric_name); for (i = 0; i < NUM_STATS; i++) memset(&names[i], 0, m_size); - for (i = 0; i < NUM_STATS - 2; i++) - memset(&wrongnames[i], 0, m_size); /* Success Test: Valid names and size */ size = NUM_STATS; @@ -99,10 +96,6 @@ static int test_latencystats_get_names(void) TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the metrics count," "Actual: %d Expected: %d", ret, NUM_STATS); - /* Failure Test: Invalid names (array size lesser than size) */ - size = NUM_STATS + 1; - ret = rte_latencystats_get_names(wrongnames, size); - TEST_ASSERT((ret == NUM_STATS), "Test Failed to get metrics names"); return TEST_SUCCESS; } @@ -112,13 +105,10 @@ static int test_latencystats_get(void) int ret = 0, i = 0; int size = 0; struct rte_metric_value values[NUM_STATS]; - struct rte_metric_value wrongvalues[NUM_STATS - 2]; size_t v_size = sizeof(struct rte_metric_value); for (i = 0; i < NUM_STATS; i++) memset(&values[i], 0, v_size); - for (i = 0; i < NUM_STATS - 2; i++) - memset(&wrongvalues[i], 0, v_size); /* Success Test: Valid values and valid size */ size = NUM_STATS; @@ -137,14 +127,6 @@ static int test_latencystats_get(void) TEST_ASSERT((ret == NUM_STATS), "Test Failed to get the stats count," "Actual: %d Expected: %d", ret, NUM_STATS); - /* Failure Test: Invalid values(array size lesser than size) - * and invalid size - */ - size = NUM_STATS + 2; - ret = rte_latencystats_get(wrongvalues, size); - TEST_ASSERT(ret == NUM_STATS, "Test Failed to get latency metrics" - " values"); - return TEST_SUCCESS; } From patchwork Tue Jun 4 08:59:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54339 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D4771BBE1; Tue, 4 Jun 2019 11:00:51 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id AC8BB1BB4D; Tue, 4 Jun 2019 11:00:49 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25F703107B39; Tue, 4 Jun 2019 09:00:49 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC02C5DD6D; Tue, 4 Jun 2019 09:00:43 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org Date: Tue, 4 Jun 2019 10:59:46 +0200 Message-Id: <1559638792-8608-9-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:49 +0000 (UTC) Subject: [dpdk-dev] [PATCH 08/14] test/stack: fix lock-free test name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 0420378bbfc4 ("test/stack: check lock-free implementation") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Aaron Conole --- app/test/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index cd46289..3c9706a 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -184,7 +184,7 @@ fast_parallel_test_names = [ 'sched_autotest', 'spinlock_autotest', 'stack_autotest', - 'stack_nb_autotest', + 'stack_lf_autotest', 'string_autotest', 'table_autotest', 'tailq_autotest', @@ -243,7 +243,7 @@ perf_test_names = [ 'ring_pmd_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest', - 'stack_nb_perf_autotest', + 'stack_lf_perf_autotest', ] # All test cases in driver_test_names list are non-parallel From patchwork Tue Jun 4 08:59:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54340 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97D6A1BC07; Tue, 4 Jun 2019 11:00:53 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 543DF1BC07 for ; Tue, 4 Jun 2019 11:00:52 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C948330C1320; Tue, 4 Jun 2019 09:00:51 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8ABEF18B94; Tue, 4 Jun 2019 09:00:49 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:47 +0200 Message-Id: <1559638792-8608-10-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 04 Jun 2019 09:00:51 +0000 (UTC) Subject: [dpdk-dev] [PATCH 09/14] test/eal: set memory channel config only in dedicated test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The -n option is an optimisation configuration option that defaults to 0. Such a default value makes the mempool library distributes objects as if there was 4 memory channels, so -n 4 is the same as the default behavior. This parameter was mandatory a long time ago, but has been optional for a while. We check that setting this value works fine in its own test. Remove it everywhere else. Signed-off-by: David Marchand Acked-by: Aaron Conole Acked-by: Anatoly Burakov --- app/test/autotest.py | 2 +- app/test/meson.build | 2 +- app/test/test_eal_flags.c | 191 ++++++++++++++++++++++++---------------------- 3 files changed, 101 insertions(+), 94 deletions(-) diff --git a/app/test/autotest.py b/app/test/autotest.py index 46c469e..b42f488 100644 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -32,7 +32,7 @@ def usage(): else: test_whitelist = testlist -cmdline = "%s -c f -n 4" % (sys.argv[1]) +cmdline = "%s -c f" % (sys.argv[1]) print(cmdline) diff --git a/app/test/meson.build b/app/test/meson.build index 3c9706a..7ad3684 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -365,7 +365,7 @@ if get_option('tests') num_cores_arg = '-l ' + num_cores - test_args = [num_cores_arg, '-n 4'] + test_args = [num_cores_arg] foreach arg : fast_parallel_test_names if host_machine.system() == 'linux' test(arg, dpdk_test, diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 9112c96..e82e56a 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -245,25 +245,25 @@ enum hugepage_action { #endif const char *wlinval[][11] = { - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "error", "", ""}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "0:0:0", "", ""}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "0:error:0.1", "", ""}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "0:0:0.1error", "", ""}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "error0:0:0.1", "", ""}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "0:0:0.1.2", "", ""}, }; /* Test with valid whitelist option */ - const char *wlval1[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + const char *wlval1[] = {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "00FF:09:0B.3"}; - const char *wlval2[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + const char *wlval2[] = {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "09:0B.3", pci_whitelist, "0a:0b.1"}; - const char *wlval3[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", + const char *wlval3[] = {prgname, prefix, mp_flag, "-c", "1", pci_whitelist, "09:0B.3,type=test", pci_whitelist, "08:00.1,type=normal", }; @@ -311,15 +311,16 @@ enum hugepage_action { #endif const char *blinval[][9] = { - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "error"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "0:0:0"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "0:error:0.1"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "0:0:0.1error"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "error0:0:0.1"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "0:0:0.1.2"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "error"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "0:error:0.1"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1error"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "error0:0:0.1"}, + {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1.2"}, }; /* Test with valid blacklist option */ - const char *blval[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-b", "FF:09:0B.3"}; + const char *blval[] = {prgname, prefix, mp_flag, "-c", "1", + "-b", "FF:09:0B.3"}; int i; @@ -354,17 +355,17 @@ enum hugepage_action { #endif /* Test with invalid vdev option */ - const char *vdevinval[] = {prgname, prefix, no_huge, "-n", "1", + const char *vdevinval[] = {prgname, prefix, no_huge, "-c", "1", vdev, "eth_dummy"}; /* Test with valid vdev option */ - const char *vdevval1[] = {prgname, prefix, no_huge, "-n", "1", + const char *vdevval1[] = {prgname, prefix, no_huge, "-c", "1", vdev, "net_ring0"}; - const char *vdevval2[] = {prgname, prefix, no_huge, "-n", "1", + const char *vdevval2[] = {prgname, prefix, no_huge, "-c", "1", vdev, "net_ring0,args=test"}; - const char *vdevval3[] = {prgname, prefix, no_huge, "-n", "1", + const char *vdevval3[] = {prgname, prefix, no_huge, "-c", "1", vdev, "net_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { @@ -412,13 +413,13 @@ enum hugepage_action { #endif const char *rinval[][9] = { - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-r", "error"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-r", "0"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-r", "-1"}, - {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-r", "17"}, + {prgname, prefix, mp_flag, "-c", "1", "-r", "error"}, + {prgname, prefix, mp_flag, "-c", "1", "-r", "0"}, + {prgname, prefix, mp_flag, "-c", "1", "-r", "-1"}, + {prgname, prefix, mp_flag, "-c", "1", "-r", "17"}, }; /* Test with valid blacklist option */ - const char *rval[] = {prgname, prefix, mp_flag, "-n", "1", "-c", "1", "-r", "16"}; + const char *rval[] = {prgname, prefix, mp_flag, "-c", "1", "-r", "16"}; int i; @@ -456,74 +457,74 @@ enum hugepage_action { #endif /* -c flag but no coremask value */ - const char *argv1[] = { prgname, prefix, mp_flag, "-n", "3", "-c"}; + const char *argv1[] = { prgname, prefix, mp_flag, "-c"}; /* No -c, -l or --lcores flag at all */ - const char *argv2[] = { prgname, prefix, mp_flag, "-n", "3"}; + const char *argv2[] = { prgname, prefix, mp_flag}; /* bad coremask value */ const char *argv3[] = { prgname, prefix, mp_flag, - "-n", "3", "-c", "error" }; + "-c", "error" }; /* sanity check of tests - valid coremask value */ const char *argv4[] = { prgname, prefix, mp_flag, - "-n", "3", "-c", "1" }; + "-c", "1" }; /* -l flag but no corelist value */ const char *argv5[] = { prgname, prefix, mp_flag, - "-n", "3", "-l"}; + "-l"}; const char *argv6[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", " " }; + "-l", " " }; /* bad corelist values */ const char *argv7[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "error" }; + "-l", "error" }; const char *argv8[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "1-" }; + "-l", "1-" }; const char *argv9[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "1," }; + "-l", "1," }; const char *argv10[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "1#2" }; + "-l", "1#2" }; /* core number is negative value */ const char * const argv11[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "-5" }; + "-l", "-5" }; const char * const argv12[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "-5-7" }; + "-l", "-5-7" }; /* core number is maximum value */ const char * const argv13[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", RTE_STR(RTE_MAX_LCORE) }; + "-l", RTE_STR(RTE_MAX_LCORE) }; const char * const argv14[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "1-"RTE_STR(RTE_MAX_LCORE) }; + "-l", "1-"RTE_STR(RTE_MAX_LCORE) }; /* sanity check test - valid corelist value */ const char * const argv15[] = { prgname, prefix, mp_flag, - "-n", "3", "-l", "1-2,3" }; + "-l", "1-2,3" }; /* --lcores flag but no lcores value */ const char * const argv16[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores" }; + "--lcores" }; const char * const argv17[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", " " }; + "--lcores", " " }; /* bad lcores value */ const char * const argv18[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "1-3-5" }; + "--lcores", "1-3-5" }; const char * const argv19[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "0-1,,2" }; + "--lcores", "0-1,,2" }; const char * const argv20[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "0-,1" }; + "--lcores", "0-,1" }; const char * const argv21[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "(0-,2-4)" }; + "--lcores", "(0-,2-4)" }; const char * const argv22[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "(-1,2)" }; + "--lcores", "(-1,2)" }; const char * const argv23[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "(2-4)@(2-4-6)" }; + "--lcores", "(2-4)@(2-4-6)" }; const char * const argv24[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "(a,2)" }; + "--lcores", "(a,2)" }; const char * const argv25[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "1-3@(1,3)" }; + "--lcores", "1-3@(1,3)" }; const char * const argv26[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "3@((1,3)" }; + "--lcores", "3@((1,3)" }; const char * const argv27[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "(4-7)=(1,3)" }; + "--lcores", "(4-7)=(1,3)" }; const char * const argv28[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", "[4-7]@(1,3)" }; + "--lcores", "[4-7]@(1,3)" }; /* sanity check of tests - valid lcores value */ const char * const argv29[] = { prgname, prefix, mp_flag, - "-n", "3", "--lcores", + "--lcores", "0-1,2@(5-7),(3-5)@(0,2),(0,6),7"}; if (launch_proc(argv2) != 0) { @@ -606,16 +607,22 @@ enum hugepage_action { #endif /* --master-lcore flag but no value */ - const char *argv1[] = { prgname, prefix, mp_flag, "-n", "1", "-c", "3", "--master-lcore"}; + const char *argv1[] = { prgname, prefix, mp_flag, + "-c", "3", "--master-lcore"}; /* --master-lcore flag with invalid value */ - const char *argv2[] = { prgname, prefix, mp_flag, "-n", "1", "-c", "3", "--master-lcore", "-1"}; - const char *argv3[] = { prgname, prefix, mp_flag, "-n", "1", "-c", "3", "--master-lcore", "X"}; + const char *argv2[] = { prgname, prefix, mp_flag, + "-c", "3", "--master-lcore", "-1"}; + const char *argv3[] = { prgname, prefix, mp_flag, + "-c", "3", "--master-lcore", "X"}; /* master lcore not in coremask */ - const char *argv4[] = { prgname, prefix, mp_flag, "-n", "1", "-c", "3", "--master-lcore", "2"}; + const char *argv4[] = { prgname, prefix, mp_flag, + "-c", "3", "--master-lcore", "2"}; /* valid value */ - const char *argv5[] = { prgname, prefix, mp_flag, "-n", "1", "-c", "3", "--master-lcore", "1"}; + const char *argv5[] = { prgname, prefix, mp_flag, + "-c", "3", "--master-lcore", "1"}; /* valid value set before coremask */ - const char *argv6[] = { prgname, prefix, mp_flag, "-n", "1", "--master-lcore", "1", "-c", "3"}; + const char *argv6[] = { prgname, prefix, mp_flag, + "--master-lcore", "1", "-c", "3"}; if (launch_proc(argv1) == 0 || launch_proc(argv2) == 0 @@ -703,9 +710,9 @@ enum hugepage_action { #endif /* With --no-hpet */ - const char *argv1[] = {prgname, prefix, mp_flag, no_hpet, "-c", "1", "-n", "2"}; + const char *argv1[] = {prgname, prefix, mp_flag, no_hpet, "-c", "1"}; /* Without --no-hpet */ - const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1", "-n", "2"}; + const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1"}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-hpet flag\n"); @@ -734,16 +741,16 @@ enum hugepage_action { #endif /* With --no-huge */ - const char *argv1[] = {prgname, prefix, no_huge, "-c", "1", "-n", "2"}; + const char *argv1[] = {prgname, prefix, no_huge, "-c", "1"}; /* With --no-huge and -m */ - const char *argv2[] = {prgname, prefix, no_huge, "-c", "1", "-n", "2", + const char *argv2[] = {prgname, prefix, no_huge, "-c", "1", "-m", DEFAULT_MEM_SIZE}; /* With --no-huge and --socket-mem */ - const char *argv3[] = {prgname, prefix, no_huge, "-c", "1", "-n", "2", + const char *argv3[] = {prgname, prefix, no_huge, "-c", "1", "--socket-mem=" DEFAULT_MEM_SIZE}; /* With --no-huge, -m and --socket-mem */ - const char *argv4[] = {prgname, prefix, no_huge, "-c", "1", "-n", "2", + const char *argv4[] = {prgname, prefix, no_huge, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--socket-mem=" DEFAULT_MEM_SIZE}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-huge flag\n"); @@ -844,17 +851,17 @@ enum hugepage_action { /* With invalid --syslog */ const char *argv5[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog", "error"}; /* With no-sh-conf, also use no-huge to ensure this test runs on BSD */ - const char *argv6[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE, + const char *argv6[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, no_shconf, nosh_prefix, no_huge}; /* With --huge-dir */ - const char *argv7[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE, + const char *argv7[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", hugepath}; /* With empty --huge-dir (should fail) */ - const char *argv8[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE, + const char *argv8[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir"}; /* With invalid --huge-dir */ - const char *argv9[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE, + const char *argv9[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", "invalid"}; /* Secondary process with invalid --huge-dir (should run as flag has no * effect on secondary processes) */ @@ -862,23 +869,23 @@ enum hugepage_action { /* try running with base-virtaddr param */ const char *argv11[] = {prgname, "--file-prefix=virtaddr", - "-c", "1", "-n", "2", "--base-virtaddr=0x12345678"}; + "-c", "1", "--base-virtaddr=0x12345678"}; /* try running with --vfio-intr INTx flag */ const char *argv12[] = {prgname, "--file-prefix=intr", - "-c", "1", "-n", "2", "--vfio-intr=legacy"}; + "-c", "1", "--vfio-intr=legacy"}; /* try running with --vfio-intr MSI flag */ const char *argv13[] = {prgname, "--file-prefix=intr", - "-c", "1", "-n", "2", "--vfio-intr=msi"}; + "-c", "1", "--vfio-intr=msi"}; /* try running with --vfio-intr MSI-X flag */ const char *argv14[] = {prgname, "--file-prefix=intr", - "-c", "1", "-n", "2", "--vfio-intr=msix"}; + "-c", "1", "--vfio-intr=msix"}; /* try running with --vfio-intr invalid flag */ const char *argv15[] = {prgname, "--file-prefix=intr", - "-c", "1", "-n", "2", "--vfio-intr=invalid"}; + "-c", "1", "--vfio-intr=invalid"}; /* run all tests also applicable to FreeBSD first */ @@ -989,25 +996,25 @@ enum hugepage_action { #endif /* this should fail unless the test itself is run with "memtest" prefix */ - const char *argv0[] = {prgname, mp_flag, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE, - "--file-prefix=" memtest }; + const char *argv0[] = {prgname, mp_flag, "-c", "1", "-m", + DEFAULT_MEM_SIZE, "--file-prefix=" memtest }; /* primary process with memtest1 and default mem mode */ - const char *argv1[] = {prgname, "-c", "1", "-n", "2", "-m", + const char *argv1[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1 }; /* primary process with memtest1 and legacy mem mode */ - const char *argv2[] = {prgname, "-c", "1", "-n", "2", "-m", + const char *argv2[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1, "--legacy-mem" }; /* primary process with memtest2 and legacy mem mode */ - const char *argv3[] = {prgname, "-c", "1", "-n", "2", "-m", + const char *argv3[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2, "--legacy-mem" }; /* primary process with memtest2 and default mem mode */ - const char *argv4[] = {prgname, "-c", "1", "-n", "2", "-m", + const char *argv4[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2 }; /* check if files for current prefix are present */ @@ -1153,38 +1160,38 @@ enum hugepage_action { /* valid -m flag and mp flag */ const char *argv0[] = {prgname, prefix, mp_flag, "-c", "10", - "-n", "2", "-m", DEFAULT_MEM_SIZE}; + "-m", DEFAULT_MEM_SIZE}; /* valid -m flag */ - const char *argv1[] = {prgname, "-c", "10", "-n", "2", + const char *argv1[] = {prgname, "-c", "10", "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE}; /* valid (zero) --socket-mem flag */ - const char *argv2[] = {prgname, "-c", "10", "-n", "2", + const char *argv2[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem=0,0,0,0"}; /* invalid (incomplete) --socket-mem flag */ - const char *argv3[] = {prgname, "-c", "10", "-n", "2", + const char *argv3[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem=2,2,"}; /* invalid (mixed with invalid data) --socket-mem flag */ - const char *argv4[] = {prgname, "-c", "10", "-n", "2", + const char *argv4[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem=2,2,Fred"}; /* invalid (with numeric value as last character) --socket-mem flag */ - const char *argv5[] = {prgname, "-c", "10", "-n", "2", + const char *argv5[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem=2,2,Fred0"}; /* invalid (with empty socket) --socket-mem flag */ - const char *argv6[] = {prgname, "-c", "10", "-n", "2", + const char *argv6[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem=2,,2"}; /* invalid (null) --socket-mem flag */ - const char *argv7[] = {prgname, "-c", "10", "-n", "2", + const char *argv7[] = {prgname, "-c", "10", "--file-prefix=" memtest, "--socket-mem="}; /* valid --socket-mem specified together with -m flag */ - const char *argv8[] = {prgname, "-c", "10", "-n", "2", + const char *argv8[] = {prgname, "-c", "10", "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE, "--socket-mem=2,2"}; /* construct an invalid socket mask with 2 megs on each socket plus @@ -1236,11 +1243,11 @@ enum hugepage_action { } /* invalid --socket-mem flag (with extra socket) */ - const char *argv9[] = {prgname, "-c", "10", "-n", "2", + const char *argv9[] = {prgname, "-c", "10", "--file-prefix=" memtest, invalid_socket_mem}; /* valid --socket-mem flag */ - const char *argv10[] = {prgname, "-c", "10", "-n", "2", + const char *argv10[] = {prgname, "-c", "10", "--file-prefix=" memtest, valid_socket_mem}; if (launch_proc(argv0) != 0) { From patchwork Tue Jun 4 08:59:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54341 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E1BF1BC0F; Tue, 4 Jun 2019 11:00:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 53AFB1BB76 for ; Tue, 4 Jun 2019 11:00:55 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7A633107B3D; Tue, 4 Jun 2019 09:00:54 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34E861868F; Tue, 4 Jun 2019 09:00:52 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:48 +0200 Message-Id: <1559638792-8608-11-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:54 +0000 (UTC) Subject: [dpdk-dev] [PATCH 10/14] test/eal: set core mask/list config only in dedicated test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Setting a coremask was mandatory a long time ago but has been optional for a while. The checks on PCI whitelist/blacklist, vdev, memory rank, memory channel, HPET, memory size and other miscs options have no requirement wrt cores. Let's remove those coremasks so that we only care about it in the dedicated checks. Signed-off-by: David Marchand Acked-by: Aaron Conole Acked-by: Anatoly Burakov --- app/test/test_eal_flags.c | 141 ++++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 68 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index e82e56a..5e11b9f 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -245,25 +245,25 @@ enum hugepage_action { #endif const char *wlinval[][11] = { - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "error", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:error:0.1", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0.1error", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "error0:0:0.1", "", ""}, - {prgname, prefix, mp_flag, "-c", "1", + {prgname, prefix, mp_flag, pci_whitelist, "0:0:0.1.2", "", ""}, }; /* Test with valid whitelist option */ - const char *wlval1[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval1[] = {prgname, prefix, mp_flag, pci_whitelist, "00FF:09:0B.3"}; - const char *wlval2[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval2[] = {prgname, prefix, mp_flag, pci_whitelist, "09:0B.3", pci_whitelist, "0a:0b.1"}; - const char *wlval3[] = {prgname, prefix, mp_flag, "-c", "1", + const char *wlval3[] = {prgname, prefix, mp_flag, pci_whitelist, "09:0B.3,type=test", pci_whitelist, "08:00.1,type=normal", }; @@ -311,15 +311,15 @@ enum hugepage_action { #endif const char *blinval[][9] = { - {prgname, prefix, mp_flag, "-c", "1", "-b", "error"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:error:0.1"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1error"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "error0:0:0.1"}, - {prgname, prefix, mp_flag, "-c", "1", "-b", "0:0:0.1.2"}, + {prgname, prefix, mp_flag, "-b", "error"}, + {prgname, prefix, mp_flag, "-b", "0:0:0"}, + {prgname, prefix, mp_flag, "-b", "0:error:0.1"}, + {prgname, prefix, mp_flag, "-b", "0:0:0.1error"}, + {prgname, prefix, mp_flag, "-b", "error0:0:0.1"}, + {prgname, prefix, mp_flag, "-b", "0:0:0.1.2"}, }; /* Test with valid blacklist option */ - const char *blval[] = {prgname, prefix, mp_flag, "-c", "1", + const char *blval[] = {prgname, prefix, mp_flag, "-b", "FF:09:0B.3"}; int i; @@ -356,17 +356,17 @@ enum hugepage_action { /* Test with invalid vdev option */ const char *vdevinval[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "eth_dummy"}; + vdev, "eth_dummy"}; /* Test with valid vdev option */ const char *vdevval1[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0"}; + vdev, "net_ring0"}; const char *vdevval2[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0,args=test"}; + vdev, "net_ring0,args=test"}; const char *vdevval3[] = {prgname, prefix, no_huge, - "-c", "1", vdev, "net_ring0,nodeaction=r1:0:CREATE"}; + vdev, "net_ring0,nodeaction=r1:0:CREATE"}; if (launch_proc(vdevinval) == 0) { printf("Error - process did run ok with invalid " @@ -413,13 +413,13 @@ enum hugepage_action { #endif const char *rinval[][9] = { - {prgname, prefix, mp_flag, "-c", "1", "-r", "error"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "0"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "-1"}, - {prgname, prefix, mp_flag, "-c", "1", "-r", "17"}, + {prgname, prefix, mp_flag, "-r", "error"}, + {prgname, prefix, mp_flag, "-r", "0"}, + {prgname, prefix, mp_flag, "-r", "-1"}, + {prgname, prefix, mp_flag, "-r", "17"}, }; /* Test with valid blacklist option */ - const char *rval[] = {prgname, prefix, mp_flag, "-c", "1", "-r", "16"}; + const char *rval[] = {prgname, prefix, mp_flag, "-r", "16"}; int i; @@ -661,15 +661,19 @@ enum hugepage_action { #endif /* -n flag but no value */ - const char *argv1[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n"}; + const char *argv1[] = { prgname, prefix, no_huge, no_shconf, + "-n"}; /* bad numeric value */ - const char *argv2[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "e" }; + const char *argv2[] = { prgname, prefix, no_huge, no_shconf, + "-n", "e" }; /* zero is invalid */ - const char *argv3[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "0" }; + const char *argv3[] = { prgname, prefix, no_huge, no_shconf, + "-n", "0" }; /* sanity test - check with good value */ - const char *argv4[] = { prgname, prefix, no_huge, no_shconf, "-c", "1", "-n", "2" }; + const char *argv4[] = { prgname, prefix, no_huge, no_shconf, + "-n", "2" }; /* sanity test - check with no -n flag */ - const char *argv5[] = { prgname, prefix, no_huge, no_shconf, "-c", "1"}; + const char *argv5[] = { prgname, prefix, no_huge, no_shconf}; if (launch_proc(argv1) == 0 || launch_proc(argv2) == 0 @@ -710,9 +714,9 @@ enum hugepage_action { #endif /* With --no-hpet */ - const char *argv1[] = {prgname, prefix, mp_flag, no_hpet, "-c", "1"}; + const char *argv1[] = {prgname, prefix, mp_flag, no_hpet}; /* Without --no-hpet */ - const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1"}; + const char *argv2[] = {prgname, prefix, mp_flag}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-hpet flag\n"); @@ -741,16 +745,16 @@ enum hugepage_action { #endif /* With --no-huge */ - const char *argv1[] = {prgname, prefix, no_huge, "-c", "1"}; + const char *argv1[] = {prgname, prefix, no_huge}; /* With --no-huge and -m */ - const char *argv2[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv2[] = {prgname, prefix, no_huge, "-m", DEFAULT_MEM_SIZE}; /* With --no-huge and --socket-mem */ - const char *argv3[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv3[] = {prgname, prefix, no_huge, "--socket-mem=" DEFAULT_MEM_SIZE}; /* With --no-huge, -m and --socket-mem */ - const char *argv4[] = {prgname, prefix, no_huge, "-c", "1", + const char *argv4[] = {prgname, prefix, no_huge, "-m", DEFAULT_MEM_SIZE, "--socket-mem=" DEFAULT_MEM_SIZE}; if (launch_proc(argv1) != 0) { printf("Error - process did not run ok with --no-huge flag\n"); @@ -837,55 +841,56 @@ enum hugepage_action { * No further testing of output done. */ /* sanity check - failure with invalid option */ - const char *argv0[] = {prgname, prefix, mp_flag, "-c", "1", "--invalid-opt"}; + const char *argv0[] = {prgname, prefix, mp_flag, "--invalid-opt"}; /* With --no-pci */ - const char *argv1[] = {prgname, prefix, mp_flag, "-c", "1", "--no-pci"}; + const char *argv1[] = {prgname, prefix, mp_flag, "--no-pci"}; /* With -v */ - const char *argv2[] = {prgname, prefix, mp_flag, "-c", "1", "-v"}; + const char *argv2[] = {prgname, prefix, mp_flag, "-v"}; /* With valid --syslog */ - const char *argv3[] = {prgname, prefix, mp_flag, "-c", "1", + const char *argv3[] = {prgname, prefix, mp_flag, "--syslog", "syslog"}; /* With empty --syslog (should fail) */ - const char *argv4[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog"}; + const char *argv4[] = {prgname, prefix, mp_flag, "--syslog"}; /* With invalid --syslog */ - const char *argv5[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog", "error"}; + const char *argv5[] = {prgname, prefix, mp_flag, "--syslog", "error"}; /* With no-sh-conf, also use no-huge to ensure this test runs on BSD */ - const char *argv6[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv6[] = {prgname, "-m", DEFAULT_MEM_SIZE, no_shconf, nosh_prefix, no_huge}; /* With --huge-dir */ - const char *argv7[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv7[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", hugepath}; /* With empty --huge-dir (should fail) */ - const char *argv8[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv8[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir"}; /* With invalid --huge-dir */ - const char *argv9[] = {prgname, "-c", "1", "-m", DEFAULT_MEM_SIZE, + const char *argv9[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=hugedir", "--huge-dir", "invalid"}; /* Secondary process with invalid --huge-dir (should run as flag has no * effect on secondary processes) */ - const char *argv10[] = {prgname, prefix, mp_flag, "-c", "1", "--huge-dir", "invalid"}; + const char *argv10[] = {prgname, prefix, mp_flag, + "--huge-dir", "invalid"}; /* try running with base-virtaddr param */ const char *argv11[] = {prgname, "--file-prefix=virtaddr", - "-c", "1", "--base-virtaddr=0x12345678"}; + "--base-virtaddr=0x12345678"}; /* try running with --vfio-intr INTx flag */ const char *argv12[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=legacy"}; + "--vfio-intr=legacy"}; /* try running with --vfio-intr MSI flag */ const char *argv13[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=msi"}; + "--vfio-intr=msi"}; /* try running with --vfio-intr MSI-X flag */ const char *argv14[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=msix"}; + "--vfio-intr=msix"}; /* try running with --vfio-intr invalid flag */ const char *argv15[] = {prgname, "--file-prefix=intr", - "-c", "1", "--vfio-intr=invalid"}; + "--vfio-intr=invalid"}; /* run all tests also applicable to FreeBSD first */ @@ -996,25 +1001,25 @@ enum hugepage_action { #endif /* this should fail unless the test itself is run with "memtest" prefix */ - const char *argv0[] = {prgname, mp_flag, "-c", "1", "-m", + const char *argv0[] = {prgname, mp_flag, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest }; /* primary process with memtest1 and default mem mode */ - const char *argv1[] = {prgname, "-c", "1", "-m", + const char *argv1[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1 }; /* primary process with memtest1 and legacy mem mode */ - const char *argv2[] = {prgname, "-c", "1", "-m", + const char *argv2[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest1, "--legacy-mem" }; /* primary process with memtest2 and legacy mem mode */ - const char *argv3[] = {prgname, "-c", "1", "-m", + const char *argv3[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2, "--legacy-mem" }; /* primary process with memtest2 and default mem mode */ - const char *argv4[] = {prgname, "-c", "1", "-m", + const char *argv4[] = {prgname, "-m", DEFAULT_MEM_SIZE, "--file-prefix=" memtest2 }; /* check if files for current prefix are present */ @@ -1159,39 +1164,39 @@ enum hugepage_action { #endif /* valid -m flag and mp flag */ - const char *argv0[] = {prgname, prefix, mp_flag, "-c", "10", + const char *argv0[] = {prgname, prefix, mp_flag, "-m", DEFAULT_MEM_SIZE}; /* valid -m flag */ - const char *argv1[] = {prgname, "-c", "10", + const char *argv1[] = {prgname, "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE}; /* valid (zero) --socket-mem flag */ - const char *argv2[] = {prgname, "-c", "10", + const char *argv2[] = {prgname, "--file-prefix=" memtest, "--socket-mem=0,0,0,0"}; /* invalid (incomplete) --socket-mem flag */ - const char *argv3[] = {prgname, "-c", "10", + const char *argv3[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,"}; /* invalid (mixed with invalid data) --socket-mem flag */ - const char *argv4[] = {prgname, "-c", "10", + const char *argv4[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,Fred"}; /* invalid (with numeric value as last character) --socket-mem flag */ - const char *argv5[] = {prgname, "-c", "10", + const char *argv5[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,2,Fred0"}; /* invalid (with empty socket) --socket-mem flag */ - const char *argv6[] = {prgname, "-c", "10", + const char *argv6[] = {prgname, "--file-prefix=" memtest, "--socket-mem=2,,2"}; /* invalid (null) --socket-mem flag */ - const char *argv7[] = {prgname, "-c", "10", + const char *argv7[] = {prgname, "--file-prefix=" memtest, "--socket-mem="}; /* valid --socket-mem specified together with -m flag */ - const char *argv8[] = {prgname, "-c", "10", + const char *argv8[] = {prgname, "--file-prefix=" memtest, "-m", DEFAULT_MEM_SIZE, "--socket-mem=2,2"}; /* construct an invalid socket mask with 2 megs on each socket plus @@ -1243,11 +1248,11 @@ enum hugepage_action { } /* invalid --socket-mem flag (with extra socket) */ - const char *argv9[] = {prgname, "-c", "10", + const char *argv9[] = {prgname, "--file-prefix=" memtest, invalid_socket_mem}; /* valid --socket-mem flag */ - const char *argv10[] = {prgname, "-c", "10", + const char *argv10[] = {prgname, "--file-prefix=" memtest, valid_socket_mem}; if (launch_proc(argv0) != 0) { From patchwork Tue Jun 4 08:59:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54342 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EA3F1BC03; Tue, 4 Jun 2019 11:01:00 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A3A2A1BB5A for ; Tue, 4 Jun 2019 11:00:57 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 230D0330259; Tue, 4 Jun 2019 09:00:57 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 352445DD6D; Tue, 4 Jun 2019 09:00:55 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:49 +0200 Message-Id: <1559638792-8608-12-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jun 2019 09:00:57 +0000 (UTC) Subject: [dpdk-dev] [PATCH 11/14] test/eal: check number of cores before running subtests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Santana The eal flags unit test assumes that a certain number of cores are available (4 and 8 cores), however this may not always be the case. Individual developers may run the unit test on their local desktop which typically have 2 to 4 cores, in said case the test is bound to fail for lacking 4 or 8 cores. Additionally, as we push forward introducing CI into DPDK we are limited to the hardware specification of CI services (e.g. Travis CI) that only have 2 cores on their servers, in which case the test would fail. To fix this we check available cores before running a subtest. This applies to subtests that are dedicated to test that the -l and --lcore flags work correctly. If not enough cores are available the subtest is simply skipped, otherwise the subtest is run. Signed-off-by: Michael Santana Signed-off-by: David Marchand Acked-by: Aaron Conole Acked-by: Anatoly Burakov --- app/test/test_eal_flags.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 5e11b9f..cfa8a61 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -560,7 +560,9 @@ enum hugepage_action { "process ran without error with invalid -l flag\n"); return -1; } - if (launch_proc(argv15) != 0) { + if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) && + rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) && + launch_proc(argv15) != 0) { printf("Error - " "process did not run ok with valid corelist value\n"); return -1; @@ -579,7 +581,11 @@ enum hugepage_action { return -1; } - if (launch_proc(argv29) != 0) { + if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) && + rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) && + rte_lcore_is_enabled(3) && rte_lcore_is_enabled(5) && + rte_lcore_is_enabled(4) && rte_lcore_is_enabled(7) && + launch_proc(argv29) != 0) { printf("Error - " "process did not run ok with valid corelist value\n"); return -1; @@ -606,6 +612,9 @@ enum hugepage_action { snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp); #endif + if (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1)) + return TEST_SKIPPED; + /* --master-lcore flag but no value */ const char *argv1[] = { prgname, prefix, mp_flag, "-c", "3", "--master-lcore"}; From patchwork Tue Jun 4 08:59:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54343 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 236D01BC18; Tue, 4 Jun 2019 11:01:02 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DAC111BB52 for ; Tue, 4 Jun 2019 11:00:59 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C6DCA3B70; Tue, 4 Jun 2019 09:00:59 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F33718E32; Tue, 4 Jun 2019 09:00:57 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:50 +0200 Message-Id: <1559638792-8608-13-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 04 Jun 2019 09:00:59 +0000 (UTC) Subject: [dpdk-dev] [PATCH 12/14] test/eal: make the test pass again X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Santana The eal_flags_autotest test currently fails due to a memory leak in the timer library[1][2]. This failure occurs when the test calls one of its subtests test_file_prefix(). Fixing the memory leak is not trivial, so this patch is a workaround that makes the eal_flags_autotest test pass. This is accomplished by moving the test_file_prefix test to its own test unit. This is a temporary measure until the leak is fixed. [1] http://patchwork.dpdk.org/patch/53268/ [2] http://patchwork.dpdk.org/patch/53334/ Signed-off-by: Michael Santana --- app/test/autotest_data.py | 6 ++++++ app/test/meson.build | 1 + app/test/test_eal_flags.c | 7 +------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 6cf7eca..15e672f 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -93,6 +93,12 @@ "Report": None, }, { + "Name": "EAL flags file prefix autotest", + "Command": "eal_flags_prefix_autotest", + "Func": default_autotest, + "Report": None, + }, + { "Name": "Hash autotest", "Command": "hash_autotest", "Func": default_autotest, diff --git a/app/test/meson.build b/app/test/meson.build index 7ad3684..212cd1b 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -156,6 +156,7 @@ fast_parallel_test_names = [ 'cycles_autotest', 'debug_autotest', 'eal_flags_autotest', + 'eal_flags_prefix_autotest', 'eal_fs_autotest', 'errno_autotest', 'event_ring_autotest', diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index cfa8a61..1e227aa 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -1397,12 +1397,6 @@ enum hugepage_action { return ret; } - ret = test_file_prefix(); - if (ret < 0) { - printf("Error in test_file_prefix()\n"); - return ret; - } - ret = test_misc_flags(); if (ret < 0) { printf("Error in test_misc_flags()"); @@ -1413,3 +1407,4 @@ enum hugepage_action { } REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags); +REGISTER_TEST_COMMAND(eal_flags_prefix_autotest, test_file_prefix); From patchwork Tue Jun 4 08:59:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54344 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D76D1BC28; Tue, 4 Jun 2019 11:01:09 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 189101BBD7 for ; Tue, 4 Jun 2019 11:01:07 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 882702E97C8; Tue, 4 Jun 2019 09:01:01 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABDC95D9CD; Tue, 4 Jun 2019 09:00:59 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com Date: Tue, 4 Jun 2019 10:59:51 +0200 Message-Id: <1559638792-8608-14-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jun 2019 09:01:01 +0000 (UTC) Subject: [dpdk-dev] [PATCH 13/14] test: do not start tests in parallel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Running the tests in parallel has two drawbacks: - the tests are racing on the hugepages allocations, - the tests are sharing the cores to run their checks which results in undeterministic execution time, This results in random failures. For better reproducibility in CI, start them all in a serialised way. Signed-off-by: David Marchand --- app/test/meson.build | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 212cd1b..f0797c9 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -144,8 +144,7 @@ test_deps = ['acl', 'timer' ] -# All test cases in fast_parallel_test_names list are parallel -fast_parallel_test_names = [ +fast_test_names = [ 'acl_autotest', 'alarm_autotest', 'atomic_autotest', @@ -192,10 +191,6 @@ fast_parallel_test_names = [ 'timer_autotest', 'user_delay_us', 'version_autotest', -] - -# All test cases in fast_non_parallel_test_names list are non-parallel -fast_non_parallel_test_names = [ 'bitratestats_autotest', 'crc_autotest', 'delay_us_sleep_autotest', @@ -219,7 +214,6 @@ fast_non_parallel_test_names = [ 'thash_autotest', ] -# All test cases in perf_test_names list are non-parallel perf_test_names = [ 'ring_perf_autotest', 'mempool_perf_autotest', @@ -247,7 +241,6 @@ perf_test_names = [ 'stack_lf_perf_autotest', ] -# All test cases in driver_test_names list are non-parallel driver_test_names = [ 'cryptodev_aesni_mb_autotest', 'cryptodev_aesni_gcm_autotest', @@ -269,7 +262,6 @@ driver_test_names = [ 'link_bonding_rssconf_autotest', ] -# All test cases in dump_test_names list are non-parallel dump_test_names = [ 'dump_struct_sizes', 'dump_mempool', @@ -318,7 +310,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') test_dep_objs += compress_test_dep test_sources += 'test_compressdev.c' test_deps += 'compressdev' - fast_non_parallel_test_names += 'compressdev_autotest' + fast_test_names += 'compressdev_autotest' endif endif @@ -367,30 +359,23 @@ if get_option('tests') num_cores_arg = '-l ' + num_cores test_args = [num_cores_arg] - foreach arg : fast_parallel_test_names + foreach arg : fast_test_names if host_machine.system() == 'linux' test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], args : test_args + ['--file-prefix=@0@'.format(arg)], timeout : timeout_seconds_fast, + is_parallel : false, suite : 'fast-tests') else test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], args : test_args, timeout : timeout_seconds_fast, - suite : 'fast-tests') - endif - endforeach - - foreach arg : fast_non_parallel_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args, - timeout : timeout_seconds_fast, is_parallel : false, suite : 'fast-tests') + endif endforeach foreach arg : perf_test_names From patchwork Tue Jun 4 08:59:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 54345 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BDC91BC70; Tue, 4 Jun 2019 11:01:24 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id DFB511BBEE for ; Tue, 4 Jun 2019 11:01:20 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F263300740A; Tue, 4 Jun 2019 09:01:12 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 036F918E35; Tue, 4 Jun 2019 09:01:01 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, Fiona Trahe , Pablo de Lara , Ashish Gupta , Declan Doherty , David Hunt , Erik Gabriel Carrillo , Jerin Jacob , Olivier Matz , Andrew Rybchenko , Anatoly Burakov , Bruce Richardson , Vladimir Medvedkin , Yipeng Wang , Sameh Gobriel , Konstantin Ananyev , Bernard Iremonger , Honnappa Nagarahalli , Harry van Haaren , Gage Eads , Robert Sanford Date: Tue, 4 Jun 2019 10:59:52 +0200 Message-Id: <1559638792-8608-15-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 04 Jun 2019 09:01:18 +0000 (UTC) Subject: [dpdk-dev] [PATCH 14/14] test: skip tests when missing requirements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Let's mark as skipped the tests when they are missing some requirements like a number of used cores or specific hardware availability, like compress, crypto or eventdev devices. Signed-off-by: David Marchand --- app/test/test.c | 24 ++++++++++++++++-------- app/test/test_compressdev.c | 4 ++-- app/test/test_cryptodev.c | 4 ++-- app/test/test_distributor.c | 4 ++-- app/test/test_distributor_perf.c | 4 ++-- app/test/test_event_timer_adapter.c | 5 +++-- app/test/test_eventdev.c | 2 ++ app/test/test_func_reentrancy.c | 6 +++--- app/test/test_hash_multiwriter.c | 7 +++---- app/test/test_hash_readwrite.c | 7 +++---- app/test/test_hash_readwrite_lf.c | 8 ++++---- app/test/test_ipsec.c | 4 ++-- app/test/test_mbuf.c | 13 ++++++------- app/test/test_rcu_qsbr.c | 10 +++++----- app/test/test_rcu_qsbr_perf.c | 9 +++++---- app/test/test_service_cores.c | 14 ++++++++++++++ app/test/test_stack.c | 8 +++++--- app/test/test_timer.c | 10 +++++----- app/test/test_timer_secondary.c | 10 ++++++---- 19 files changed, 90 insertions(+), 63 deletions(-) diff --git a/app/test/test.c b/app/test/test.c index ea1e98f..194a92a 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -208,14 +208,16 @@ printf(" + Test Suite : %s\n", suite->suite_name); } - if (suite->setup) - if (suite->setup() != 0) { + if (suite->setup) { + test_success = suite->setup(); + if (test_success != 0) { /* - * setup failed, so count all enabled tests and mark - * them as failed + * setup did not pass, so count all enabled tests and + * mark them as failed/skipped */ while (suite->unit_test_cases[total].testcase) { - if (!suite->unit_test_cases[total].enabled) + if (!suite->unit_test_cases[total].enabled || + test_success == TEST_SKIPPED) skipped++; else failed++; @@ -223,6 +225,7 @@ } goto suite_summary; } + } printf(" + ------------------------------------------------------- +\n"); @@ -246,6 +249,8 @@ test_success = suite->unit_test_cases[total].testcase(); if (test_success == TEST_SUCCESS) succeeded++; + else if (test_success == TEST_SKIPPED) + skipped++; else if (test_success == -ENOTSUP) unsupported++; else @@ -262,6 +267,8 @@ if (test_success == TEST_SUCCESS) status = "succeeded"; + else if (test_success == TEST_SKIPPED) + status = "skipped"; else if (test_success == -ENOTSUP) status = "unsupported"; else @@ -293,7 +300,8 @@ last_test_result = failed; if (failed) - return -1; - - return 0; + return TEST_FAILED; + if (total == skipped) + return TEST_SKIPPED; + return TEST_SUCCESS; } diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c index 1b1983e..cf78775 100644 --- a/app/test/test_compressdev.c +++ b/app/test/test_compressdev.c @@ -134,8 +134,8 @@ struct test_data_params { unsigned int i; if (rte_compressdev_count() == 0) { - RTE_LOG(ERR, USER1, "Need at least one compress device\n"); - return TEST_FAILED; + RTE_LOG(WARNING, USER1, "Need at least one compress device\n"); + return TEST_SKIPPED; } RTE_LOG(NOTICE, USER1, "Running tests on device %s\n", diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index eca6d3d..0509af7 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -408,8 +408,8 @@ struct crypto_unittest_params { nb_devs = rte_cryptodev_count(); if (nb_devs < 1) { - RTE_LOG(ERR, USER1, "No crypto devices found?\n"); - return TEST_FAILED; + RTE_LOG(WARNING, USER1, "No crypto devices found?\n"); + return TEST_SKIPPED; } /* Create list of valid crypto devs */ diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index da3348f..8084c07 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -594,8 +594,8 @@ int test_error_distributor_create_numworkers(void) int i; if (rte_lcore_count() < 2) { - printf("ERROR: not enough cores to test distributor\n"); - return -1; + printf("Not enough cores for distributor_autotest, expecting at least 2\n"); + return TEST_SKIPPED; } if (db == NULL) { diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index edf1998..f6f1139 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -208,8 +208,8 @@ struct worker_stats { static struct rte_mempool *p; if (rte_lcore_count() < 2) { - printf("ERROR: not enough cores to test distributor\n"); - return -1; + printf("Not enough cores for distributor_perf_autotest, expecting at least 2\n"); + return TEST_SKIPPED; } /* first time how long it takes to round-trip a cache line */ diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c index 742ca81..ad3f4dc 100644 --- a/app/test/test_event_timer_adapter.c +++ b/app/test/test_event_timer_adapter.c @@ -158,8 +158,9 @@ } if (rte_lcore_count() < required_lcore_count) { - printf("%d lcores needed to run tests", required_lcore_count); - return TEST_FAILED; + printf("Not enough cores for event_timer_adapter_test, expecting at least %u\n", + required_lcore_count); + return TEST_SKIPPED; } /* Assign lcores for various tasks */ diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 00d7327..c745e99 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -997,6 +997,8 @@ test_eventdev_selftest_impl(const char *pmd, const char *opts) { rte_vdev_init(pmd, opts); + if (rte_event_dev_get_dev_id(pmd) == -ENODEV) + return TEST_SKIPPED; return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd)); } diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index e27d1e0..99ad902 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -473,9 +473,9 @@ struct test_case test_cases[] = { uint32_t case_id; struct test_case *pt_case = NULL; - if (rte_lcore_count() <= 1) { - printf("Not enough lcore for testing\n"); - return -1; + if (rte_lcore_count() < 2) { + printf("Not enough cores for func_reentrancy_autotest, expecting at least 2\n"); + return TEST_SKIPPED; } else if (rte_lcore_count() > MAX_LCORES) printf("Too many lcores, some cores will be disabled\n"); diff --git a/app/test/test_hash_multiwriter.c b/app/test/test_hash_multiwriter.c index 50018db..46ab45f 100644 --- a/app/test/test_hash_multiwriter.c +++ b/app/test/test_hash_multiwriter.c @@ -260,12 +260,11 @@ struct { static int test_hash_multiwriter_main(void) { - if (rte_lcore_count() == 1) { - printf("More than one lcore is required to do multiwriter test\n"); - return 0; + if (rte_lcore_count() < 2) { + printf("Not enough cores for distributor_autotest, expecting at least 2\n"); + return TEST_SKIPPED; } - setlocale(LC_NUMERIC, ""); diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c index 480ae97..4376b09 100644 --- a/app/test/test_hash_readwrite.c +++ b/app/test/test_hash_readwrite.c @@ -618,10 +618,9 @@ struct { int use_htm, use_ext, reader_faster; unsigned int i = 0, core_id = 0; - if (rte_lcore_count() <= 2) { - printf("More than two lcores are required " - "to do read write test\n"); - return -1; + if (rte_lcore_count() < 3) { + printf("Not enough cores for hash_readwrite_autotest, expecting at least 3\n"); + return TEST_SKIPPED; } RTE_LCORE_FOREACH_SLAVE(core_id) { diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 5644361..2664f51 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -1254,10 +1254,10 @@ struct { int htm; int use_jhash = 0; int ext_bkt = 0; - if (rte_lcore_count() == 1) { - printf("More than one lcore is required " - "to do read write lock-free concurrency test\n"); - return -1; + + if (rte_lcore_count() < 2) { + printf("Not enough cores for hash_readwrite_lf_autotest, expecting at least 2\n"); + return TEST_SKIPPED; } setlocale(LC_NUMERIC, ""); diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c index 3993ff4..83f7895 100644 --- a/app/test/test_ipsec.c +++ b/app/test/test_ipsec.c @@ -296,8 +296,8 @@ struct supported_auth_algo { nb_devs = rte_cryptodev_count(); if (nb_devs < 1) { - RTE_LOG(ERR, USER1, "No crypto devices found?\n"); - return TEST_FAILED; + RTE_LOG(WARNING, USER1, "No crypto devices found?\n"); + return TEST_SKIPPED; } /* Find first valid crypto device */ diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 030385e..2a97afe 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -753,18 +753,17 @@ test_refcnt_mbuf(void) { #ifdef RTE_MBUF_REFCNT_ATOMIC - unsigned lnum, master, slave, tref; + unsigned int master, slave, tref; int ret = -1; struct rte_mempool *refcnt_pool = NULL; struct rte_ring *refcnt_mbuf_ring = NULL; - if ((lnum = rte_lcore_count()) == 1) { - printf("skipping %s, number of lcores: %u is not enough\n", - __func__, lnum); - return 0; + if (rte_lcore_count() < 2) { + printf("Not enough cores for test_refcnt_mbuf, expecting at least 2\n"); + return TEST_SKIPPED; } - printf("starting %s, at %u lcores\n", __func__, lnum); + printf("starting %s, at %u lcores\n", __func__, rte_lcore_count()); /* create refcnt pool & ring if they don't exist */ @@ -1206,7 +1205,7 @@ goto err; } - if (test_refcnt_mbuf()<0){ + if (test_refcnt_mbuf() < 0) { printf("test_refcnt_mbuf() failed \n"); goto err; } diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 92ab0c2..725d27d 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -949,14 +949,14 @@ static int test_rcu_qsbr_main(void) { + if (rte_lcore_count() < 5) { + printf("Not enough cores for rcu_qsbr_autotest, expecting at least 5\n"); + return TEST_SKIPPED; + } + if (get_enabled_cores_mask() != 0) return -1; - if (num_cores < 4) { - printf("Test failed! Need 4 or more cores\n"); - goto test_fail; - } - /* Error-checking test cases */ if (test_rcu_qsbr_get_memsize() < 0) goto test_fail; diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c index 6b1912c..dcdd9da 100644 --- a/app/test/test_rcu_qsbr_perf.c +++ b/app/test/test_rcu_qsbr_perf.c @@ -623,6 +623,11 @@ static int test_rcu_qsbr_main(void) { + if (rte_lcore_count() < 3) { + printf("Not enough cores for rcu_qsbr_perf_autotest, expecting at least 3\n"); + return TEST_SKIPPED; + } + rte_atomic64_init(&updates); rte_atomic64_init(&update_cycles); rte_atomic64_init(&checks); @@ -632,10 +637,6 @@ return -1; printf("Number of cores provided = %d\n", num_cores); - if (num_cores < 2) { - printf("Test failed! Need 2 or more cores\n"); - goto test_fail; - } if (num_cores > TEST_RCU_MAX_LCORE) { printf("Test failed! %d cores supported\n", TEST_RCU_MAX_LCORE); goto test_fail; diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 82bb2ce..9fe38f5 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -502,6 +502,10 @@ static int32_t dummy_mt_safe_cb(void *args) static int service_lcore_add_del(void) { + if (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1) || + !rte_lcore_is_enabled(2) || !rte_lcore_is_enabled(3)) + return TEST_SKIPPED; + /* check initial count */ TEST_ASSERT_EQUAL(0, rte_service_lcore_count(), "Service lcore count has value before adding a lcore"); @@ -669,6 +673,11 @@ static int32_t dummy_mt_safe_cb(void *args) service_mt_safe_poll(void) { int mt_safe = 1; + + if (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1) || + !rte_lcore_is_enabled(2)) + return TEST_SKIPPED; + TEST_ASSERT_EQUAL(1, service_threaded_test(mt_safe), "Error: MT Safe service not run by two cores concurrently"); return TEST_SUCCESS; @@ -681,6 +690,11 @@ static int32_t dummy_mt_safe_cb(void *args) service_mt_unsafe_poll(void) { int mt_safe = 0; + + if (!rte_lcore_is_enabled(0) || !rte_lcore_is_enabled(1) || + !rte_lcore_is_enabled(2)) + return TEST_SKIPPED; + TEST_ASSERT_EQUAL(1, service_threaded_test(mt_safe), "Error: NON MT Safe service run by two cores concurrently"); return TEST_SUCCESS; diff --git a/app/test/test_stack.c b/app/test/test_stack.c index e972a61..c8dac1f 100644 --- a/app/test/test_stack.c +++ b/app/test/test_stack.c @@ -336,12 +336,14 @@ struct test_args { struct rte_stack *s; rte_atomic64_t size; + if (rte_lcore_count() < 2) { + printf("Not enough cores for test_stack_multithreaded, expecting at least 2\n"); + return TEST_SKIPPED; + } + printf("[%s():%u] Running with %u lcores\n", __func__, __LINE__, rte_lcore_count()); - if (rte_lcore_count() < 2) - return 0; - args = rte_malloc(NULL, sizeof(struct test_args) * RTE_MAX_LCORE, 0); if (args == NULL) { printf("[%s():%u] failed to malloc %zu bytes\n", diff --git a/app/test/test_timer.c b/app/test/test_timer.c index e2aab53..8e0a589 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -538,17 +538,17 @@ struct mytimerinfo { uint64_t cur_time; uint64_t hz; + if (rte_lcore_count() < 2) { + printf("Not enough cores for timer_autotest, expecting at least 2\n"); + return TEST_SKIPPED; + } + /* sanity check our timer sources and timer config values */ if (timer_sanity_check() < 0) { printf("Timer sanity checks failed\n"); return TEST_FAILED; } - if (rte_lcore_count() < 2) { - printf("not enough lcores for this test\n"); - return TEST_FAILED; - } - /* init timer */ for (i=0; iaddr; TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for " "test data"); - TEST_ASSERT(rte_lcore_count() >= NUM_LCORES_NEEDED, - "at least %d lcores needed to run tests", - NUM_LCORES_NEEDED); - test_info->tim_mempool = rte_mempool_create("test_timer_mp", NUM_TIMERS, sizeof(struct rte_timer), 0, 0, NULL, NULL, NULL, NULL, rte_socket_id(), 0);