From patchwork Mon Mar 23 19:59:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 67036 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 804A3A0564; Mon, 23 Mar 2020 20:59:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5223E1C0B6; Mon, 23 Mar 2020 20:59:47 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id 6CE391C0B6 for ; Mon, 23 Mar 2020 20:59:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mojVPpbT1l4ALCXq1aZIOcXgJ3F4o9eIchHEXWkFxjo=; b=WYWJ/bASEX7HGXpRJuhy9zjkpAeknlmi1jifU9cL7uGaVfSbL9p+kWQ/GSzGmZadj7/g4Q mo+LodPdkX3ujDqJ3XAP6NtL1Qu7r1CscBZltyXKS5r3mQXWTdpiUmgLyN0a0FHfCO4Cj5 H3RteHrY3VGua0N2fjhKZvEHttPyREY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-pqHYo_zaOlWWfvZVU37JQg-1; Mon, 23 Mar 2020 15:59:41 -0400 X-MC-Unique: pqHYo_zaOlWWfvZVU37JQg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EA449801E53; Mon, 23 Mar 2020 19:59:39 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED22610016EB; Mon, 23 Mar 2020 19:59:37 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, stable@dpdk.org, Reshma Pattan Date: Mon, 23 Mar 2020 20:59:22 +0100 Message-Id: <20200323195926.12182-2-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 1/5] test: load drivers when required 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" Concatenating to test_args if event_eth_tx_adapter_autotest is executed makes all subsequent tests inherit from the drivers loading while this is unneeded. Fixes: 207b1c813f39 ("test: fix build without ring PMD") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Ruifeng Wang Acked-by: Aaron Conole --- app/test/meson.build | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 0a2ce710f0..7ab2b586e1 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -403,37 +403,33 @@ timeout_seconds_fast = 10 get_coremask = find_program('get-coremask.sh') num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() -test_args = [num_cores_arg] +default_test_args = [num_cores_arg] foreach arg : fast_test_names + test_args = default_test_args + if (get_option('default_library') == 'shared' and arg == 'event_eth_tx_adapter_autotest') foreach drv:dpdk_drivers test_args += ['-d', drv.full_path().split('.a')[0] + '.so'] endforeach endif - 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, + if is_linux + test_args += ['--file-prefix=@0@'.format(arg)] + endif + + 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 test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : test_args, + args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'perf-tests') @@ -442,7 +438,7 @@ endforeach foreach arg : driver_test_names test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : test_args, + args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'driver-tests') @@ -451,7 +447,7 @@ endforeach foreach arg : dump_test_names test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], - args : test_args, + args : default_test_args, timeout : timeout_seconds, is_parallel : false, suite : 'debug-tests') From patchwork Mon Mar 23 19:59:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 67037 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 552A0A0564; Mon, 23 Mar 2020 20:59:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A15E1C0C5; Mon, 23 Mar 2020 20:59:55 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id D51341C0C3 for ; Mon, 23 Mar 2020 20:59:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KQv8HMcJhih/stNLyLPefLc5SYDoGi28ICve46B/6Qg=; b=U3HR7ANPMlEeZki5n+HPEqTwbDoixr5WK5OJLSjCIqmZZ1I9fpERKTD0UUKF2n/xew0sb1 BPZCFnMtwdLSgWf6O0HmsFpU5Rz02lFH6s8aSsRb4hCzLUIJddlKAQJKCrWlrHnetkJMqR 0R2ESxCZiN2X8gKA+tyNpwhcql9k7Nk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-njx0r9tqMSmbnUO1YFsZjw-1; Mon, 23 Mar 2020 15:59:51 -0400 X-MC-Unique: njx0r9tqMSmbnUO1YFsZjw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 244471005513; Mon, 23 Mar 2020 19:59:49 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7EE610016EB; Mon, 23 Mar 2020 19:59:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, stable@dpdk.org, Gavin Hu , Yipeng Wang , Konstantin Ananyev , Sameh Gobriel , Cristian Dumitrescu , Anatoly Burakov Date: Mon, 23 Mar 2020 20:59:23 +0100 Message-Id: <20200323195926.12182-3-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 2/5] test: skip subtests in no-huge mode 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: Ruifeng Wang When running with '--no-huge' flag, tests failed with messages as: ACL context creation with invalid NUMA should have failed! fbk hash creation should have failed test_table_pipeline: Check pipeline invalid params failed. These cases test against invalid socket ID as input parameter, and expect error return. But function calls return success because invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode. The tests against invalid socket ID are skipped in no-huge mode. Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mode") Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu Acked-by: Aaron Conole Acked-by: Yipeng Wang --- app/test/test_acl.c | 22 ++++++++++++---------- app/test/test_hash.c | 7 +++++-- app/test/test_table_pipeline.c | 12 +++++++----- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/app/test/test_acl.c b/app/test/test_acl.c index 501de35da1..316bf4d065 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -1397,16 +1397,18 @@ test_invalid_parameters(void) } else rte_acl_free(acx); - /* invalid NUMA node */ - memcpy(¶m, &acl_param, sizeof(param)); - param.socket_id = RTE_MAX_NUMA_NODES + 1; - - acx = rte_acl_create(¶m); - if (acx != NULL) { - printf("Line %i: ACL context creation with invalid NUMA " - "should have failed!\n", __LINE__); - rte_acl_free(acx); - return -1; + if (rte_eal_has_hugepages()) { + /* invalid NUMA node */ + memcpy(¶m, &acl_param, sizeof(param)); + param.socket_id = RTE_MAX_NUMA_NODES + 1; + + acx = rte_acl_create(¶m); + if (acx != NULL) { + printf("Line %i: ACL context creation with invalid " + "NUMA should have failed!\n", __LINE__); + rte_acl_free(acx); + return -1; + } } /* NULL name */ diff --git a/app/test/test_hash.c b/app/test/test_hash.c index fbd5725c68..ab978ea689 100644 --- a/app/test/test_hash.c +++ b/app/test/test_hash.c @@ -1136,8 +1136,11 @@ fbk_hash_unit_test(void) handle = rte_fbk_hash_create(&invalid_params_7); RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed"); - handle = rte_fbk_hash_create(&invalid_params_8); - RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed"); + if (rte_eal_has_hugepages()) { + handle = rte_fbk_hash_create(&invalid_params_8); + RETURN_IF_ERROR_FBK(handle != NULL, + "fbk hash creation should have failed"); + } handle = rte_fbk_hash_create(&invalid_params_same_name_1); RETURN_IF_ERROR_FBK(handle == NULL, "fbk hash creation should have succeeded"); diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c index 441338ac01..bc412c3081 100644 --- a/app/test/test_table_pipeline.c +++ b/app/test/test_table_pipeline.c @@ -190,11 +190,13 @@ check_pipeline_invalid_params(void) goto fail; } - p = rte_pipeline_create(&pipeline_params_3); - if (p != NULL) { - RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with invalid " - "socket\n", __func__); - goto fail; + if (rte_eal_has_hugepages()) { + p = rte_pipeline_create(&pipeline_params_3); + if (p != NULL) { + RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with " + "invalid socket\n", __func__); + goto fail; + } } /* Check pipeline consistency */ From patchwork Mon Mar 23 19:59:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 67038 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A1055A0564; Mon, 23 Mar 2020 21:00:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 460C11C0BE; Mon, 23 Mar 2020 21:00:01 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id 0612B1C07E for ; Mon, 23 Mar 2020 20:59:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qn7j9XCuQTksTr3zIdonq6tEek7MukL0SqilEftwGWk=; b=E5SVzf7rU31jqPHhdR/bTLtFm1oHUE8c/OPNSfpgVImwdJ2EFMkZ8Fsxk1d4PbwqG1cXll tFkA/xlemRnOJPlMDfroKlDEACutzcUR2VmBI3jUnSP4Azhen5/aOSmWkoX9aesIlNmK+O Zuqo1n2RUssbLj0vJaWcm11+CvpZPf0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-L4oqtXC-PUeROObPC1yeog-1; Mon, 23 Mar 2020 15:59:55 -0400 X-MC-Unique: L4oqtXC-PUeROObPC1yeog-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1F82D107ACCC; Mon, 23 Mar 2020 19:59:54 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F4701001938; Mon, 23 Mar 2020 19:59:52 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, Gavin Hu Date: Mon, 23 Mar 2020 20:59:24 +0100 Message-Id: <20200323195926.12182-4-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 3/5] test: allow no-huge mode for fast-tests 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: Ruifeng Wang In environments where hugepage are not available, such as containers, many cases in fast-tests suite should also run if no-huge EAL option is used. Flag is appended to each case in fast-tests suite to indicate whether it lives with no-huge mode. With the flag, fast-tests suite can be generated based on detected hugepage availability of building environment. All cases will be valid if hugepage is available, whereas only applicable cases will be added if environment has no hugepage support. Suggested-by: Aaron Conole Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu Acked-by: Aaron Conole --- app/test/meson.build | 215 ++++++++++++++++++++++++------------------- 1 file changed, 119 insertions(+), 96 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 7ab2b586e1..351d29cb65 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -154,87 +154,89 @@ test_deps = ['acl', 'timer' ] -fast_test_names = [ - 'acl_autotest', - 'alarm_autotest', - 'atomic_autotest', - 'byteorder_autotest', - 'cmdline_autotest', - 'common_autotest', - 'cpuflags_autotest', - 'cycles_autotest', - 'debug_autotest', - 'eal_flags_c_opt_autotest', - 'eal_flags_master_opt_autotest', - 'eal_flags_n_opt_autotest', - 'eal_flags_hpet_autotest', - 'eal_flags_no_huge_autotest', - 'eal_flags_w_opt_autotest', - 'eal_flags_b_opt_autotest', - 'eal_flags_vdev_opt_autotest', - 'eal_flags_r_opt_autotest', - 'eal_flags_mem_autotest', - 'eal_flags_file_prefix_autotest', - 'eal_flags_misc_autotest', - 'eal_fs_autotest', - 'errno_autotest', - 'event_ring_autotest', - 'fib_autotest', - 'fib6_autotest', - 'func_reentrancy_autotest', - 'flow_classify_autotest', - 'hash_autotest', - 'interrupt_autotest', - 'logs_autotest', - 'lpm_autotest', - 'lpm6_autotest', - 'malloc_autotest', - 'mbuf_autotest', - 'mcslock_autotest', - 'memcpy_autotest', - 'memory_autotest', - 'mempool_autotest', - 'memzone_autotest', - 'meter_autotest', - 'multiprocess_autotest', - 'per_lcore_autotest', - 'prefetch_autotest', - 'rcu_qsbr_autotest', - 'red_autotest', - 'rib_autotest', - 'rib6_autotest', - 'ring_autotest', - 'rwlock_test1_autotest', - 'rwlock_rda_autotest', - 'rwlock_rds_wrm_autotest', - 'rwlock_rde_wro_autotest', - 'sched_autotest', - 'spinlock_autotest', - 'stack_autotest', - 'stack_lf_autotest', - 'string_autotest', - 'table_autotest', - 'tailq_autotest', - 'timer_autotest', - 'user_delay_us', - 'version_autotest', - 'crc_autotest', - 'delay_us_sleep_autotest', - 'distributor_autotest', - 'eventdev_common_autotest', - 'fbarray_autotest', - 'hash_readwrite_func_autotest', - 'ipsec_autotest', - 'kni_autotest', - 'kvargs_autotest', - 'member_autotest', - 'metrics_autotest', - 'power_cpufreq_autotest', - 'power_autotest', - 'power_kvm_vm_autotest', - 'reorder_autotest', - 'service_autotest', - 'thash_autotest', +# Each test is marked with flag true/false +# to indicate whether it can run in no-huge mode. +fast_tests = [ + ['acl_autotest', true], + ['alarm_autotest', false], + ['atomic_autotest', false], + ['byteorder_autotest', true], + ['cmdline_autotest', true], + ['common_autotest', true], + ['cpuflags_autotest', true], + ['cycles_autotest', true], + ['debug_autotest', true], + ['eal_flags_c_opt_autotest', false], + ['eal_flags_master_opt_autotest', false], + ['eal_flags_n_opt_autotest', false], + ['eal_flags_hpet_autotest', false], + ['eal_flags_no_huge_autotest', false], + ['eal_flags_w_opt_autotest', false], + ['eal_flags_b_opt_autotest', false], + ['eal_flags_vdev_opt_autotest', false], + ['eal_flags_r_opt_autotest', false], + ['eal_flags_mem_autotest', false], + ['eal_flags_file_prefix_autotest', false], + ['eal_flags_misc_autotest', false], + ['eal_fs_autotest', true], + ['errno_autotest', true], + ['event_ring_autotest', true], + ['fib_autotest', true], + ['fib6_autotest', true], + ['func_reentrancy_autotest', false], + ['flow_classify_autotest', false], + ['hash_autotest', true], + ['interrupt_autotest', true], + ['logs_autotest', true], + ['lpm_autotest', true], + ['lpm6_autotest', true], + ['malloc_autotest', false], + ['mbuf_autotest', false], + ['mcslock_autotest', false], + ['memcpy_autotest', true], + ['memory_autotest', false], + ['mempool_autotest', false], + ['memzone_autotest', false], + ['meter_autotest', true], + ['multiprocess_autotest', false], + ['per_lcore_autotest', true], + ['prefetch_autotest', true], + ['rcu_qsbr_autotest', true], + ['red_autotest', true], + ['rib_autotest', true], + ['rib6_autotest', true], + ['ring_autotest', true], + ['rwlock_test1_autotest', true], + ['rwlock_rda_autotest', true], + ['rwlock_rds_wrm_autotest', true], + ['rwlock_rde_wro_autotest', true], + ['sched_autotest', true], + ['spinlock_autotest', true], + ['stack_autotest', false], + ['stack_lf_autotest', false], + ['string_autotest', true], + ['table_autotest', true], + ['tailq_autotest', true], + ['timer_autotest', false], + ['user_delay_us', true], + ['version_autotest', true], + ['crc_autotest', true], + ['delay_us_sleep_autotest', true], + ['distributor_autotest', false], + ['eventdev_common_autotest', true], + ['fbarray_autotest', true], + ['hash_readwrite_func_autotest', false], + ['ipsec_autotest', true], + ['kni_autotest', false], + ['kvargs_autotest', true], + ['member_autotest', true], + ['metrics_autotest', true], + ['power_cpufreq_autotest', false], + ['power_autotest', true], + ['power_kvm_vm_autotest', false], + ['reorder_autotest', true], + ['service_autotest', true], + ['thash_autotest', true], ] perf_test_names = [ @@ -334,13 +336,13 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD') test_sources += 'test_link_bonding_mode4.c' test_sources += 'sample_packet_forward.c' test_sources += 'test_pdump.c' - fast_test_names += 'ring_pmd_autotest' + fast_tests += [['ring_pmd_autotest', true]] perf_test_names += 'ring_pmd_perf_autotest' - fast_test_names += 'event_eth_tx_adapter_autotest' - fast_test_names += 'bitratestats_autotest' - fast_test_names += 'latencystats_autotest' + fast_tests += [['event_eth_tx_adapter_autotest', false]] + fast_tests += [['bitratestats_autotest', true]] + fast_tests += [['latencystats_autotest', true]] driver_test_names += 'link_bonding_mode4_autotest' - fast_test_names += 'pdump_autotest' + fast_tests += [['pdump_autotest', true]] endif if dpdk_conf.has('RTE_LIBRTE_POWER') @@ -368,7 +370,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') test_dep_objs += compress_test_dep test_sources += 'test_compressdev.c' test_deps += 'compressdev' - fast_test_names += 'compressdev_autotest' + fast_tests += [['compressdev_autotest', false]] endif endif @@ -395,6 +397,17 @@ dpdk_test = executable('dpdk-test', install_rpath: driver_install_path, install: true) +has_hugepage = true +if is_linux + check_hugepage = run_command('cat', + '/proc/sys/vm/nr_hugepages') + if (check_hugepage.returncode() != 0 or + check_hugepage.stdout().strip() == '0') + has_hugepage = false + endif +endif +message('hugepage availability: @0@'.format(has_hugepage)) + # some perf tests (eg: memcpy perf autotest)take very long # to complete, so timeout to 10 minutes timeout_seconds = 600 @@ -405,25 +418,35 @@ num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip() default_test_args = [num_cores_arg] -foreach arg : fast_test_names +foreach arg : fast_tests test_args = default_test_args + run_test = true + if not has_hugepage + if arg[1] + test_args += ['--no-huge', '-m', '2048'] + else + run_test = false + endif + endif if (get_option('default_library') == 'shared' and - arg == 'event_eth_tx_adapter_autotest') + arg[0] == 'event_eth_tx_adapter_autotest') foreach drv:dpdk_drivers test_args += ['-d', drv.full_path().split('.a')[0] + '.so'] endforeach endif if is_linux - test_args += ['--file-prefix=@0@'.format(arg)] + test_args += ['--file-prefix=@0@'.format(arg[0])] endif - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args, - timeout : timeout_seconds_fast, - is_parallel : false, - suite : 'fast-tests') + if run_test + test(arg[0], dpdk_test, + env : ['DPDK_TEST=' + arg[0]], + args : test_args, + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') + endif endforeach foreach arg : perf_test_names From patchwork Mon Mar 23 19:59:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 67039 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9614FA0564; Mon, 23 Mar 2020 21:00:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E2C4E1C0D1; Mon, 23 Mar 2020 21:00:03 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by dpdk.org (Postfix) with ESMTP id 384CD1C0C2 for ; Mon, 23 Mar 2020 21:00:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YcL+UhwQXgeQLa/9+Zs3miJ68WiWR7fHTtB1mSETqyM=; b=EpI7rJKW5rr6VHTG2qfvMLopcvmErZZVXxQyMYC4sIoUMCQXvnS9ka8aZqZSV86SsjdZoj qtTIPzZSzNWbgshx8EEgAltTNGhK9Ql4lAR5gz9Z+ON4V76Yo1tz0auqlIV5yMPRFdxd3n jgGkb+WG5RyrHvHMbLF1H7beyreSry4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-430-Vc-uul3sPRSfoQeguDF6_g-1; Mon, 23 Mar 2020 15:59:59 -0400 X-MC-Unique: Vc-uul3sPRSfoQeguDF6_g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 652178017CE; Mon, 23 Mar 2020 19:59:58 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id A41A01001938; Mon, 23 Mar 2020 19:59:56 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, Gavin Hu Date: Mon, 23 Mar 2020 20:59:25 +0100 Message-Id: <20200323195926.12182-5-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 4/5] ci: run tests even without hugepage 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: Ruifeng Wang As fast-tests suite generated with only applicable cases included, hugepage is not a mandatory to run the test. Ignore the result of hugepage set up, so that validation in environment without hugepage can proceed. Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu Acked-by: Aaron Conole --- .ci/linux-setup.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh index 2b07d1e0b2..5d3089cadd 100755 --- a/.ci/linux-setup.sh +++ b/.ci/linux-setup.sh @@ -3,10 +3,7 @@ # need to install as 'root' since some of the unit tests won't run without it sudo python3 -m pip install --upgrade 'meson==0.47.1' -# skip hugepage settings if tests will not run -if [ "$RUN_TESTS" = "1" ]; then - # setup hugepages - cat /proc/meminfo - sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages' - cat /proc/meminfo -fi +# setup hugepages. error ignored because having hugepage is not mandatory. +cat /proc/meminfo +sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages' || true +cat /proc/meminfo From patchwork Mon Mar 23 19:59:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 67040 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 74E13A0564; Mon, 23 Mar 2020 21:00:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 22FDD1C0B1; Mon, 23 Mar 2020 21:00:10 +0100 (CET) Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by dpdk.org (Postfix) with ESMTP id 9067B1C0B1 for ; Mon, 23 Mar 2020 21:00:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584993608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y7uf4SildzMqe69zWZ+YU+20QZ/ten6q/RhiK4m9Ax4=; b=Vts8gqdoxPQVCKCpDnxFTnmnu5iZFrJ2o++tKXG8F1vrT8DT8cQITiGYsX/T+xfq10Kydf Q9d8Ug1XkZwHNDFCR5SEWtUR8s1LZ+K7rgA41CVn62ljRpXY+fdJjsEPaYmJftlt1vovJu CeroDiH2+c+zkecp1U8foL8dzzjOsv8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-S_jPEDZmNxKn24iKslMGpw-1; Mon, 23 Mar 2020 16:00:05 -0400 X-MC-Unique: S_jPEDZmNxKn24iKslMGpw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4CB8C107ACC4; Mon, 23 Mar 2020 20:00:04 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.243]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5688310016EB; Mon, 23 Mar 2020 20:00:01 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, ruifeng.wang@arm.com, maicolgabriel@hotmail.com, bruce.richardson@intel.com, Gavin Hu Date: Mon, 23 Mar 2020 20:59:26 +0100 Message-Id: <20200323195926.12182-6-david.marchand@redhat.com> In-Reply-To: <20200323195926.12182-1-david.marchand@redhat.com> References: <20200323195926.12182-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v4 5/5] ci: enable unit test for aarch64 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: Ruifeng Wang Add Travis CI jobs to run unit tests on aarch64 platform. Signed-off-by: Ruifeng Wang Reviewed-by: Gavin Hu Acked-by: Aaron Conole --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a57790ba83..fd4f79cfc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -105,6 +105,9 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: gcc + - env: DEF_LIB="shared" RUN_TESTS=1 + arch: arm64 + compiler: gcc - env: DEF_LIB="shared" BUILD_DOCS=1 arch: arm64 compiler: gcc @@ -125,6 +128,6 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: clang - - env: DEF_LIB="shared" + - env: DEF_LIB="shared" RUN_TESTS=1 arch: arm64 compiler: clang