From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 =3D ['acl', =09'timer' ] =20 -fast_test_names =3D [ - '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 =3D [ + ['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], ] =20 perf_test_names =3D [ @@ -334,13 +336,13 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD') =09test_sources +=3D 'test_link_bonding_mode4.c' =09test_sources +=3D 'sample_packet_forward.c' =09test_sources +=3D 'test_pdump.c' -=09fast_test_names +=3D 'ring_pmd_autotest' +=09fast_tests +=3D [['ring_pmd_autotest', true]] =09perf_test_names +=3D 'ring_pmd_perf_autotest' -=09fast_test_names +=3D 'event_eth_tx_adapter_autotest' -=09fast_test_names +=3D 'bitratestats_autotest' -=09fast_test_names +=3D 'latencystats_autotest' +=09fast_tests +=3D [['event_eth_tx_adapter_autotest', false]] +=09fast_tests +=3D [['bitratestats_autotest', true]] +=09fast_tests +=3D [['latencystats_autotest', true]] =09driver_test_names +=3D 'link_bonding_mode4_autotest' -=09fast_test_names +=3D 'pdump_autotest' +=09fast_tests +=3D [['pdump_autotest', true]] endif =20 if dpdk_conf.has('RTE_LIBRTE_POWER') @@ -368,7 +370,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV') =09=09test_dep_objs +=3D compress_test_dep =09=09test_sources +=3D 'test_compressdev.c' =09=09test_deps +=3D 'compressdev' -=09=09fast_test_names +=3D 'compressdev_autotest' +=09=09fast_tests +=3D [['compressdev_autotest', false]] =09endif endif =20 @@ -395,6 +397,17 @@ dpdk_test =3D executable('dpdk-test', =09install_rpath: driver_install_path, =09install: true) =20 +has_hugepage =3D true +if is_linux +=09check_hugepage =3D run_command('cat', +=09=09=09=09 '/proc/sys/vm/nr_hugepages') +=09if (check_hugepage.returncode() !=3D 0 or +=09 check_hugepage.stdout().strip() =3D=3D '0') +=09=09has_hugepage =3D false +=09endif +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 =3D 600 @@ -405,25 +418,35 @@ num_cores_arg =3D '-l ' + run_command(get_coremask).s= tdout().strip() =20 default_test_args =3D [num_cores_arg] =20 -foreach arg : fast_test_names +foreach arg : fast_tests =09test_args =3D default_test_args +=09run_test =3D true +=09if not has_hugepage +=09=09if arg[1] +=09=09=09test_args +=3D ['--no-huge', '-m', '2048'] +=09=09else +=09=09=09run_test =3D false +=09=09endif +=09endif =20 =09if (get_option('default_library') =3D=3D 'shared' and -=09=09arg =3D=3D 'event_eth_tx_adapter_autotest') +=09=09arg[0] =3D=3D 'event_eth_tx_adapter_autotest') =09=09foreach drv:dpdk_drivers =09=09=09test_args +=3D ['-d', drv.full_path().split('.a')[0] + '.so'] =09=09endforeach =09endif =09if is_linux -=09=09test_args +=3D ['--file-prefix=3D@0@'.format(arg)] +=09=09test_args +=3D ['--file-prefix=3D@0@'.format(arg[0])] =09endif =20 -=09test(arg, dpdk_test, -=09=09env : ['DPDK_TEST=3D' + arg], -=09=09args : test_args, -=09=09timeout : timeout_seconds_fast, -=09=09is_parallel : false, -=09=09suite : 'fast-tests') +=09if run_test +=09=09test(arg[0], dpdk_test, +=09=09=09env : ['DPDK_TEST=3D' + arg[0]], +=09=09=09args : test_args, +=09=09=09timeout : timeout_seconds_fast, +=09=09=09is_parallel : false, +=09=09=09suite : 'fast-tests') +=09endif endforeach =20 foreach arg : perf_test_names --=20 2.23.0