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 D7976A0518 for ; Fri, 24 Jul 2020 14:12:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CEB091C2BB; Fri, 24 Jul 2020 14:12:22 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id B2C601C2F5 for ; Fri, 24 Jul 2020 14:12:21 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id y3so8097268wrl.4 for ; Fri, 24 Jul 2020 05:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5UPJkVTk6Z0obsB6Aw7lkAbj64HwjpnsLcpbWKyxOeM=; b=nlwTjFyUjE+za67k3uV2GEFTKQFkLyqTC2FAhlWf7DeimEcaJH6LX+BwGg5J8iysq2 5bzZ3MSdZ4PbI1ojP1Ixoxf+oZSOYEGR3dwyNwDc1ShHDjhoniLGdwjZaBaVn2FNN1G/ gBb/fSMssb+o2spwNdyhNn1MeILQGUaVaqkzVpFeOeL7eb5p6ju8zFRHWjJBqlH2/VPc EoMF4Oclv0tm5BIau82ybOPAepEQVuke6/S5E8T2mNS5Th/u6CykKbtCn6vpNejqAFwm Iemt4jeHu9gd8F1fOaPX81r7In3vtDffxmifzd3Gbck5VrPPxrsypwgiROMbRJ/051MT PZYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5UPJkVTk6Z0obsB6Aw7lkAbj64HwjpnsLcpbWKyxOeM=; b=X5PVJm4GroIWiG3ifZxG3FfKUDlvl8n0WLQAJ0ccUoqnb0SmzBVvNT2yEo3sePQ94w ZwPzfavMbcixpELeDSbslXb5icM+O0gDvypSkW1ByyhX7GDp2u/MyIyHLDa90c+ih2P7 pFi85LjFjLYkjU4u59WxLVYyLWPnoB1eJp8HxfXXwOxciISxgOCZMomx7TdNNsno4RF4 4K3BEAfJmW9xAsFqs+Uj0jfva5knwgtXQ1JfyWt/oGwXW1TGueNHIHRPeQnFjNcvn69M G1dXE511c5fKY1wWhO76UAxQ/li03hDrUH8nt/xylpEMl0AGaWzmrDIyphk3HZ77yZyn djIg== X-Gm-Message-State: AOAM5337itYdiv41yjr7276U0GPeN5vpv7ZjwwjZdpaISocNsg8GKaAp 4p3Rgtwp1Puq7HBaCTn2IGQ= X-Google-Smtp-Source: ABdhPJy/S20gBqYthdeYxhsdtFcr3g0Wejzh5mHGWT/AY6+AFL8DkiLZ4NH8kc2xvaR2B7p4B83WzA== X-Received: by 2002:a5d:4743:: with SMTP id o3mr8213223wrs.218.1595592741442; Fri, 24 Jul 2020 05:12:21 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id t7sm7588854wmg.41.2020.07.24.05.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:12:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Ruifeng Wang Cc: Aaron Conole , Gavin Hu , David Marchand , dpdk stable Date: Fri, 24 Jul 2020 13:00:23 +0100 Message-Id: <20200724120030.1863487-185-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test: allow no-huge mode for fast-tests' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From ce06c50ea1e8a2942927c864dc1cd83d8db8b2b1 Mon Sep 17 00:00:00 2001 From: Ruifeng Wang Date: Mon, 23 Mar 2020 20:59:24 +0100 Subject: [PATCH] test: allow no-huge mode for fast-tests [ backported from upstream commit 77784ef0fba80c899437000271a31710001ea63e ] 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 Signed-off-by: David Marchand --- 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 d8af67dbf..6d4039bbd 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_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_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 = [ @@ -336,12 +338,12 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD') test_sources += 'test_latencystats.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_test_names += 'pdump_autotest' + fast_tests += [['event_eth_tx_adapter_autotest', false]] + fast_tests += [['bitratestats_autotest', true]] + fast_tests += [['latencystats_autotest', true]] + fast_tests += [['pdump_autotest', true]] endif if dpdk_conf.has('RTE_LIBRTE_POWER') @@ -372,7 +374,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 @@ -400,6 +402,17 @@ dpdk_test = executable('dpdk-test', 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 @@ -410,25 +423,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 -- 2.20.1