Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/129685/?format=api
http://patchwork.dpdk.org/api/patches/129685/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-4-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20230721115125.55137-4-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230721115125.55137-4-bruce.richardson@intel.com", "date": "2023-07-21T11:51:23", "name": "[RFC,3/5] app/test: build using per-file dependency matrix", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "03835055bceee8afdf01e76321cd0849ba6dc1a5", "submitter": { "id": 20, "url": "http://patchwork.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230721115125.55137-4-bruce.richardson@intel.com/mbox/", "series": [ { "id": 29000, "url": "http://patchwork.dpdk.org/api/series/29000/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29000", "date": "2023-07-21T11:51:20", "name": "replace build code for unit tests", "version": 1, "mbox": "http://patchwork.dpdk.org/series/29000/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/129685/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/129685/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1BA8842ED9;\n\tFri, 21 Jul 2023 13:51:54 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EB78442D29;\n\tFri, 21 Jul 2023 13:51:44 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id A0D4C42D2F\n for <dev@dpdk.org>; Fri, 21 Jul 2023 13:51:42 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2023 04:51:42 -0700", "from silpixa00401385.ir.intel.com ([10.237.214.156])\n by fmsmga006.fm.intel.com with ESMTP; 21 Jul 2023 04:51:40 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1689940302; x=1721476302;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=T7C+KZvyb8cEV0vdpUUFK3rwO5r5gQPS/YoMWp85UYc=;\n b=FhjEEnAwJaLpZqb7mEt4Hk+lgdB4yvUUssn98GtRrSSUKrUN6y3sTsYV\n 54QegXx+yN+9xrwmbanCM7qERrZVfd7+KDDqElHkqLA1xFKRECG3F22hJ\n sfAwAoiuTuPHW3rgYi+UUeH9Y+8Sk17H0dpYuZ5spegnlqRVeGGlBZHN7\n 53+VCjsQpLd1TuhGk5KSalkDM0xsGQx18N1HriCFJKzfEyVHV6vbEbY1i\n ZoSol4wjSaJaw+SUH8daIt2qDQH9HhimhXe5dHtoougyrJowX/xa70X6l\n 9A02ctc4RbuppTVdM5RPEdC08CToQb8FXoJM9XSxJ0uOfq1Y9RKF3a5WJ Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10777\"; a=\"346599188\"", "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"346599188\"", "E=McAfee;i=\"6600,9927,10777\"; a=\"971420580\"", "E=Sophos;i=\"6.01,220,1684825200\"; d=\"scan'208\";a=\"971420580\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>", "Subject": "[RFC PATCH 3/5] app/test: build using per-file dependency matrix", "Date": "Fri, 21 Jul 2023 12:51:23 +0100", "Message-Id": "<20230721115125.55137-4-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20230721115125.55137-1-bruce.richardson@intel.com>", "References": "<20230721115125.55137-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Rather than using if-else constructs to selectively add or remove files\nfrom the UT build, switch to a table-based approach where each file\nlists out what libs or drivers it depends upon.\n\nInitial version of this table was generated via analysis of the header\nfiles included in each C file.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/meson.build | 8 +-\n app/test/meson.build | 796 +++++++++++--------------------------------\n 2 files changed, 203 insertions(+), 601 deletions(-)", "diff": "diff --git a/app/meson.build b/app/meson.build\nindex 4fc1a83eba..0d8b618e7f 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -32,6 +32,11 @@ apps = [\n 'test-security-perf',\n ]\n \n+if get_option('tests')\n+# build the auto test app if enabled.\n+ apps += 'test'\n+endif\n+\n default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']\n default_ldflags = []\n if get_option('default_library') == 'static' and not is_windows\n@@ -106,6 +111,3 @@ foreach app:apps\n install_rpath: join_paths(get_option('prefix'), driver_install_path),\n install: true)\n endforeach\n-\n-# special case the autotests\n-subdir('test')\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex b89cf0368f..475d87860e 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -1,452 +1,202 @@\n # SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n-\n-if not get_option('tests')\n- subdir_done()\n-endif\n-\n-test_sources = files(\n- 'commands.c',\n- 'packet_burst_generator.c',\n- 'test.c',\n- 'test_acl.c',\n- 'test_alarm.c',\n- 'test_atomic.c',\n- 'test_barrier.c',\n- 'test_bitops.c',\n- 'test_bitmap.c',\n- 'test_bpf.c',\n- 'test_byteorder.c',\n- 'test_cksum.c',\n- 'test_cksum_perf.c',\n- 'test_cmdline.c',\n- 'test_cmdline_cirbuf.c',\n- 'test_cmdline_etheraddr.c',\n- 'test_cmdline_ipaddr.c',\n- 'test_cmdline_lib.c',\n- 'test_cmdline_num.c',\n- 'test_cmdline_portlist.c',\n- 'test_cmdline_string.c',\n- 'test_common.c',\n- 'test_cpuflags.c',\n- 'test_crc.c',\n- 'test_cryptodev.c',\n- 'test_cryptodev_asym.c',\n- 'test_cryptodev_blockcipher.c',\n- 'test_cryptodev_crosscheck.c',\n- 'test_cryptodev_security_ipsec.c',\n- 'test_cryptodev_security_pdcp.c',\n- 'test_cycles.c',\n- 'test_debug.c',\n- 'test_devargs.c',\n- 'test_distributor.c',\n- 'test_distributor_perf.c',\n- 'test_dmadev.c',\n- 'test_dmadev_api.c',\n- 'test_eal_flags.c',\n- 'test_eal_fs.c',\n- 'test_efd.c',\n- 'test_efd_perf.c',\n- 'test_errno.c',\n- 'test_ethdev_link.c',\n- 'test_event_crypto_adapter.c',\n- 'test_event_eth_rx_adapter.c',\n- 'test_event_ring.c',\n- 'test_event_timer_adapter.c',\n- 'test_eventdev.c',\n- 'test_external_mem.c',\n- 'test_fbarray.c',\n- 'test_fib.c',\n- 'test_fib_perf.c',\n- 'test_fib6.c',\n- 'test_fib6_perf.c',\n- 'test_func_reentrancy.c',\n- 'test_hash.c',\n- 'test_hash_functions.c',\n- 'test_hash_multiwriter.c',\n- 'test_hash_readwrite.c',\n- 'test_hash_perf.c',\n- 'test_hash_readwrite_lf_perf.c',\n- 'test_interrupts.c',\n- 'test_ipfrag.c',\n- 'test_ipsec.c',\n- 'test_ipsec_sad.c',\n- 'test_ipsec_perf.c',\n- 'test_kni.c',\n- 'test_kvargs.c',\n- 'test_lcores.c',\n- 'test_logs.c',\n- 'test_lpm.c',\n- 'test_lpm6.c',\n- 'test_lpm6_perf.c',\n- 'test_lpm_perf.c',\n- 'test_malloc.c',\n- 'test_malloc_perf.c',\n- 'test_mbuf.c',\n- 'test_member.c',\n- 'test_member_perf.c',\n- 'test_memcpy.c',\n- 'test_memcpy_perf.c',\n- 'test_memory.c',\n- 'test_mempool.c',\n- 'test_mempool_perf.c',\n- 'test_memzone.c',\n- 'test_meter.c',\n- 'test_mcslock.c',\n- 'test_mp_secondary.c',\n- 'test_per_lcore.c',\n- 'test_pflock.c',\n- 'test_pmd_perf.c',\n- 'test_power.c',\n- 'test_power_cpufreq.c',\n- 'test_power_kvm_vm.c',\n- 'test_power_intel_uncore.c',\n- 'test_prefetch.c',\n- 'test_rand_perf.c',\n- 'test_rawdev.c',\n- 'test_rcu_qsbr.c',\n- 'test_rcu_qsbr_perf.c',\n- 'test_reassembly_perf.c',\n- 'test_reciprocal_division.c',\n- 'test_reciprocal_division_perf.c',\n- 'test_red.c',\n- 'test_pie.c',\n- 'test_reorder.c',\n- 'test_rib.c',\n- 'test_rib6.c',\n- 'test_ring.c',\n- 'test_ring_mpmc_stress.c',\n- 'test_ring_hts_stress.c',\n- 'test_ring_mt_peek_stress.c',\n- 'test_ring_mt_peek_stress_zc.c',\n- 'test_ring_perf.c',\n- 'test_ring_rts_stress.c',\n- 'test_ring_st_peek_stress.c',\n- 'test_ring_st_peek_stress_zc.c',\n- 'test_ring_stress.c',\n- 'test_rwlock.c',\n- 'test_sched.c',\n- 'test_security.c',\n- 'test_security_inline_macsec.c',\n- 'test_security_inline_proto.c',\n- 'test_seqlock.c',\n- 'test_service_cores.c',\n- 'test_spinlock.c',\n- 'test_stack.c',\n- 'test_stack_perf.c',\n- 'test_string_fns.c',\n- 'test_tailq.c',\n- 'test_thash.c',\n- 'test_thash_perf.c',\n- 'test_threads.c',\n- 'test_timer.c',\n- 'test_timer_perf.c',\n- 'test_timer_racecond.c',\n- 'test_timer_secondary.c',\n- 'test_ticketlock.c',\n- 'test_trace.c',\n- 'test_trace_register.c',\n- 'test_trace_perf.c',\n- 'test_version.c',\n- 'virtual_pmd.c',\n-)\n-\n-test_deps = dpdk_libs_enabled\n-# as well as libs, the pci and vdev bus drivers are needed for a lot of tests\n-test_deps += ['bus_pci', 'bus_vdev']\n-\n-# Each test is marked with flags:\n-# - the first flag indicates whether the test can run in no-huge mode,\n-# - the second flag indicates whether the test can run with ASan enabled,\n-fast_tests = [\n- ['acl_autotest', true, true],\n- ['atomic_autotest', false, true],\n- ['bitmap_autotest', true, true],\n- ['bpf_autotest', true, true],\n- ['bpf_convert_autotest', true, true],\n- ['bitops_autotest', true, true],\n- ['byteorder_autotest', true, true],\n- ['cksum_autotest', true, true],\n- ['cmdline_autotest', true, true],\n- ['common_autotest', true, true],\n- ['cpuflags_autotest', true, true],\n- ['debug_autotest', true, true],\n- ['devargs_autotest', true, true],\n- ['eal_flags_c_opt_autotest', false, false],\n- ['eal_flags_main_opt_autotest', false, false],\n- ['eal_flags_n_opt_autotest', false, false],\n- ['eal_flags_hpet_autotest', false, false],\n- ['eal_flags_no_huge_autotest', false, false],\n- ['eal_flags_a_opt_autotest', false, false],\n- ['eal_flags_b_opt_autotest', false, false],\n- ['eal_flags_vdev_opt_autotest', false, false],\n- ['eal_flags_r_opt_autotest', false, false],\n- ['eal_flags_mem_autotest', false, false],\n- ['eal_flags_file_prefix_autotest', false, false],\n- ['eal_flags_misc_autotest', false, false],\n- ['eal_fs_autotest', true, true],\n- ['errno_autotest', true, true],\n- ['ethdev_link_status', true, true],\n- ['event_ring_autotest', true, true],\n- ['fib_autotest', true, true],\n- ['fib6_autotest', true, true],\n- ['func_reentrancy_autotest', false, true],\n- ['hash_autotest', true, true],\n- ['interrupt_autotest', true, true],\n- ['ipfrag_autotest', false, true],\n- ['lcores_autotest', true, true],\n- ['logs_autotest', true, true],\n- ['lpm_autotest', true, true],\n- ['lpm6_autotest', true, true],\n- ['malloc_autotest', false, true],\n- ['mbuf_autotest', false, true],\n- ['mcslock_autotest', false, true],\n- ['memcpy_autotest', true, true],\n- ['memory_autotest', false, true],\n- ['mempool_autotest', false, true],\n- ['memzone_autotest', false, true],\n- ['meter_autotest', true, true],\n- ['multiprocess_autotest', false, false],\n- ['per_lcore_autotest', true, true],\n- ['pflock_autotest', true, true],\n- ['prefetch_autotest', true, true],\n- ['rcu_qsbr_autotest', true, true],\n- ['pie_autotest', true, true],\n- ['rib_autotest', true, true],\n- ['rib6_autotest', true, true],\n- ['ring_autotest', true, true],\n- ['rwlock_test1_autotest', true, true],\n- ['rwlock_rda_autotest', true, true],\n- ['rwlock_rds_wrm_autotest', true, true],\n- ['rwlock_rde_wro_autotest', true, true],\n- ['sched_autotest', true, true],\n- ['security_autotest', false, true],\n- ['seqlock_autotest', true, true],\n- ['spinlock_autotest', true, true],\n- ['stack_autotest', false, true],\n- ['stack_lf_autotest', false, true],\n- ['string_autotest', true, true],\n- ['tailq_autotest', true, true],\n- ['ticketlock_autotest', true, true],\n- ['timer_autotest', false, true],\n- ['user_delay_us', true, true],\n- ['version_autotest', true, true],\n- ['crc_autotest', true, true],\n- ['distributor_autotest', false, true],\n- ['eventdev_common_autotest', true, true],\n- ['fbarray_autotest', true, true],\n- ['hash_readwrite_func_autotest', false, true],\n- ['ipsec_autotest', true, true],\n- ['kni_autotest', false, true],\n- ['kvargs_autotest', true, true],\n- ['member_autotest', true, true],\n- ['power_cpufreq_autotest', false, true],\n- ['power_autotest', true, true],\n- ['power_kvm_vm_autotest', false, true],\n- ['power_intel_uncore_autotest', true, true],\n- ['reorder_autotest', true, true],\n- ['service_autotest', true, true],\n- ['thash_autotest', true, true],\n- ['threads_autotest', true, true],\n- ['trace_autotest', true, true],\n-]\n-\n-# Tests known to have issues or which don't belong in other tests lists.\n-extra_test_names = [\n- 'alarm_autotest', # ee00af60170b (\"test: remove strict timing requirements some tests\")\n- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826\n-]\n-\n-perf_test_names = [\n- 'ring_perf_autotest',\n- 'malloc_perf_autotest',\n- 'mempool_perf_autotest',\n- 'memcpy_perf_autotest',\n- 'hash_perf_autotest',\n- 'timer_perf_autotest',\n- 'reciprocal_division',\n- 'reciprocal_division_perf',\n- 'lpm_perf_autotest',\n- 'rib_slow_autotest',\n- 'fib_slow_autotest',\n- 'fib_perf_autotest',\n- 'red_all',\n- 'pie_all',\n- 'barrier_autotest',\n- 'hash_multiwriter_autotest',\n- 'timer_racecond_autotest',\n- 'efd_autotest',\n- 'hash_functions_autotest',\n- 'member_perf_autotest',\n- 'efd_perf_autotest',\n- 'lpm6_perf_autotest',\n- 'rib6_slow_autotest',\n- 'fib6_slow_autotest',\n- 'fib6_perf_autotest',\n- 'rcu_qsbr_perf_autotest',\n- 'red_perf',\n- 'pie_perf',\n- 'distributor_perf_autotest',\n- 'pmd_perf_autotest',\n- 'service_perf_autotest',\n- 'stack_perf_autotest',\n- 'stack_lf_perf_autotest',\n- 'rand_perf_autotest',\n- 'hash_readwrite_perf_autotest',\n- 'hash_readwrite_lf_perf_autotest',\n- 'trace_perf_autotest',\n- 'ipsec_perf_autotest',\n- 'thash_perf_autotest',\n- 'reassembly_perf_autotest',\n-]\n-\n-driver_test_names = [\n- 'cryptodev_aesni_gcm_autotest',\n- 'cryptodev_aesni_mb_autotest',\n- 'cryptodev_chacha_poly_mb_autotest',\n- 'cryptodev_cn10k_autotest',\n- 'cryptodev_cn9k_autotest',\n- 'cryptodev_cpu_aesni_mb_autotest',\n- 'cryptodev_cpu_aesni_gcm_autotest',\n- 'cryptodev_dpaa2_sec_autotest',\n- 'cryptodev_dpaa_sec_autotest',\n- 'cryptodev_null_autotest',\n- 'cryptodev_openssl_autotest',\n- 'cryptodev_qat_autotest',\n- 'cryptodev_qat_asym_autotest',\n- 'cryptodev_qat_raw_api_autotest',\n- 'cryptodev_sw_armv8_autotest',\n- 'cryptodev_sw_kasumi_autotest',\n- 'cryptodev_sw_mvsam_autotest',\n- 'cryptodev_sw_snow3g_autotest',\n- 'cryptodev_sw_zuc_autotest',\n- 'cryptodev_uadk_autotest',\n- 'dmadev_autotest',\n-]\n-\n-dump_test_names = []\n-\n-if not is_windows\n- driver_test_names += [\n- 'cryptodev_openssl_asym_autotest',\n- 'eventdev_selftest_octeontx',\n- 'eventdev_selftest_sw',\n- ]\n-\n- dump_test_names += [\n- 'dump_struct_sizes',\n- 'dump_mempool',\n- 'dump_malloc_stats',\n- 'dump_devargs',\n- 'dump_log_types',\n- 'dump_ring',\n- 'dump_physmem',\n- 'dump_memzone',\n- ]\n-endif\n-\n-# The following linkages are an exception to allow running the\n-# unit tests without requiring that the developer install the\n-# DPDK libraries. Explicit linkage of drivers (plugin libraries)\n-# in applications should not be used.\n-if dpdk_conf.has('RTE_MEMPOOL_RING')\n- test_deps += 'mempool_ring'\n-endif\n-if dpdk_conf.has('RTE_MEMPOOL_STACK')\n- test_deps += 'mempool_stack'\n-endif\n-if dpdk_conf.has('RTE_EVENT_SKELETON')\n- test_deps += 'event_skeleton'\n-endif\n-\n-if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')\n- test_sources += 'test_flow_classify.c'\n- fast_tests += [['flow_classify_autotest', false, true]]\n-endif\n-if dpdk_conf.has('RTE_LIB_GRAPH')\n- test_sources += 'test_graph.c'\n- fast_tests += [['graph_autotest', true, true]]\n- fast_tests += [['node_list_dump', true, true]]\n- test_sources += 'test_graph_perf.c'\n- perf_test_names += 'graph_perf_autotest'\n-endif\n-if dpdk_conf.has('RTE_LIB_METRICS')\n- test_sources += ['test_metrics.c']\n- fast_tests += [['metrics_autotest', true, true]]\n-endif\n-if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')\n- test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']\n- fast_tests += [['telemetry_json_autotest', true, true]]\n- fast_tests += [['telemetry_data_autotest', true, true]]\n-endif\n-if dpdk_conf.has('RTE_LIB_PIPELINE')\n-# pipeline lib depends on port and table libs, so those must be present\n-# if pipeline library is.\n- test_sources += [\n- 'test_table.c',\n- 'test_table_acl.c',\n- 'test_table_combined.c',\n- 'test_table_pipeline.c',\n- 'test_table_ports.c',\n- 'test_table_tables.c',\n- ]\n- fast_tests += [['table_autotest', true, true]]\n-endif\n-\n-# The following linkages of drivers are required because\n-# they are used via a driver-specific API.\n-if dpdk_conf.has('RTE_NET_BOND')\n- test_deps += 'net_bond'\n- test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']\n- driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']\n- if dpdk_conf.has('RTE_NET_RING')\n- test_sources += 'test_link_bonding_mode4.c'\n- driver_test_names += 'link_bonding_mode4_autotest'\n- endif\n-endif\n-if dpdk_conf.has('RTE_LIB_EVENTDEV') and dpdk_conf.has('RTE_NET_RING')\n- test_deps += 'net_ring'\n- test_sources += 'test_pmd_ring_perf.c'\n- test_sources += 'test_pmd_ring.c'\n- test_sources += 'test_event_eth_tx_adapter.c'\n- test_sources += 'sample_packet_forward.c'\n- fast_tests += [['ring_pmd_autotest', true, true]]\n- perf_test_names += 'ring_pmd_perf_autotest'\n- fast_tests += [['event_eth_tx_adapter_autotest', false, true]]\n- if dpdk_conf.has('RTE_LIB_BITRATESTATS')\n- test_sources += 'test_bitratestats.c'\n- fast_tests += [['bitratestats_autotest', true, true]]\n- endif\n- if dpdk_conf.has('RTE_LIB_LATENCYSTATS')\n- test_sources += 'test_latencystats.c'\n- fast_tests += [['latencystats_autotest', true, true]]\n- endif\n- if dpdk_conf.has('RTE_LIB_PDUMP')\n- test_sources += 'test_pdump.c'\n- fast_tests += [['pdump_autotest', true, false]]\n- endif\n-endif\n-if dpdk_conf.has('RTE_NET_NULL')\n- test_deps += 'net_null'\n- test_sources += 'test_vdev.c'\n- fast_tests += [['vdev_autotest', true, true]]\n-endif\n-if dpdk_conf.has('RTE_RAW_SKELETON')\n- test_deps += 'raw_skeleton'\n- fast_tests += [['rawdev_autotest', true, true]]\n-endif\n-\n-if dpdk_conf.has('RTE_HAS_LIBPCAP')\n- ext_deps += pcap_dep\n- if dpdk_conf.has('RTE_LIB_PCAPNG')\n- test_sources += 'test_pcapng.c'\n+# Copyright(c) 2017-2023 Intel Corporation\n+\n+source_file_deps = {\n+ 'commands.c': ['ring', 'mempool', 'mbuf'],\n+ 'packet_burst_generator.c': ['mbuf', 'net'],\n+ 'resource.c': [],\n+ 'sample_packet_forward.c': ['net_ring', 'ethdev', 'mbuf', 'bus_vdev', 'mempool', 'ring'],\n+ 'test.c': ['timer'],\n+ 'test_acl.c': ['mbuf', 'net', 'acl'],\n+ 'test_alarm.c': [],\n+ 'test_atomic.c': ['hash'],\n+ 'test_barrier.c': [],\n+ 'test_bitmap.c': [],\n+ 'test_bitops.c': [],\n+ 'test_bitratestats.c': ['metrics', 'bitratestats', 'ethdev'],\n+ 'test_bpf.c': ['bpf', 'net'],\n+ 'test_byteorder.c': [],\n+# 'test_cfgfile.c': ['cfgfile'],\n+ 'test_cksum.c': ['net', 'mbuf'],\n+ 'test_cksum_perf.c': ['net'],\n+ 'test_cmdline.c': [],\n+ 'test_cmdline_cirbuf.c': [],\n+ 'test_cmdline_etheraddr.c': ['net'],\n+ 'test_cmdline_ipaddr.c': [],\n+ 'test_cmdline_lib.c': [],\n+ 'test_cmdline_num.c': [],\n+ 'test_cmdline_portlist.c': [],\n+ 'test_cmdline_string.c': [],\n+ 'test_common.c': [],\n+ 'test_compressdev.c': ['mempool', 'mbuf', 'compressdev'],\n+ 'test_cpuflags.c': [],\n+ 'test_crc.c': ['net'],\n+ 'test_cryptodev.c': ['mbuf', 'bus_vdev', 'net', 'cryptodev', 'crypto_scheduler', 'security'],\n+ 'test_cryptodev_asym.c': ['bus_vdev', 'mbuf', 'cryptodev'],\n+ 'test_cryptodev_blockcipher.c': ['mbuf', 'cryptodev'],\n+ 'test_cryptodev_crosscheck.c': ['cryptodev'],\n+ 'test_cryptodev_security_ipsec.c': ['cryptodev', 'net', 'security'],\n+ 'test_cryptodev_security_pdcp.c': ['mbuf', 'bus_vdev', 'cryptodev', 'security'],\n+ 'test_cycles.c': [],\n+ 'test_debug.c': [],\n+ 'test_devargs.c': ['kvargs'],\n+ 'test_distributor.c': ['mempool', 'mbuf', 'distributor'],\n+ 'test_distributor_perf.c': ['mempool', 'mbuf', 'distributor'],\n+ 'test_dmadev.c': ['dmadev', 'mbuf', 'bus_vdev'],\n+ 'test_dmadev_api.c': ['dmadev'],\n+ 'test_eal_flags.c': [],\n+ 'test_eal_fs.c': [],\n+ 'test_efd.c': ['efd', 'net'],\n+ 'test_efd_perf.c': ['efd', 'hash'],\n+ 'test_errno.c': [],\n+ 'test_ethdev_link.c': ['ethdev'],\n+ 'test_event_crypto_adapter.c': ['mempool', 'mbuf', 'cryptodev', 'eventdev', 'bus_vdev'],\n+ 'test_event_eth_rx_adapter.c': ['mempool', 'mbuf', 'ethdev', 'eventdev', 'bus_vdev'],\n+ 'test_event_eth_tx_adapter.c': ['bus_vdev', 'ethdev', 'net_ring', 'eventdev', 'mbuf', 'mempool'],\n+ 'test_event_ring.c': ['eventdev'],\n+ 'test_event_timer_adapter.c': ['ethdev', 'eventdev', 'mempool', 'bus_vdev'],\n+ 'test_eventdev.c': ['mbuf', 'eventdev', 'bus_vdev'],\n+ 'test_external_mem.c': ['ring'],\n+ 'test_fbarray.c': [],\n+ 'test_fib.c': ['net', 'fib'],\n+ 'test_fib6.c': ['rib', 'fib'],\n+ 'test_fib6_perf.c': ['fib'],\n+ 'test_fib_perf.c': ['net', 'fib'],\n+ 'test_flow_classify.c': ['mbuf', 'net', 'acl', 'table', 'ethdev', 'flow_classify'],\n+ 'test_func_reentrancy.c': ['ring', 'mempool', 'hash', 'lpm'],\n+ 'test_graph.c': ['graph', 'mbuf'],\n+ 'test_graph_perf.c': ['graph', 'mbuf'],\n+ 'test_hash.c': ['net', 'hash'],\n+ 'test_hash_functions.c': ['hash'],\n+ 'test_hash_multiwriter.c': ['hash'],\n+ 'test_hash_perf.c': ['hash'],\n+ 'test_hash_readwrite.c': ['hash'],\n+ 'test_hash_readwrite_lf_perf.c': ['hash'],\n+ 'test_interrupts.c': [],\n+ 'test_ipfrag.c': ['net', 'ip_frag', 'mbuf'],\n+ 'test_ipsec.c': ['mbuf', 'bus_vdev', 'net', 'cryptodev', 'ipsec', 'security'],\n+ 'test_ipsec_perf.c': ['net', 'ring', 'mbuf', 'ipsec'],\n+ 'test_ipsec_sad.c': ['ipsec'],\n+ 'test_kni.c': ['mempool', 'ethdev', 'kni'],\n+ 'test_kvargs.c': ['kvargs'],\n+ 'test_latencystats.c': ['ethdev', 'latencystats', 'metrics'],\n+ 'test_lcores.c': [],\n+ 'test_link_bonding.c': ['ethdev', 'net_bond', 'net', 'mbuf'],\n+ 'test_link_bonding_mode4.c': ['ethdev', 'net_ring', 'net_bond', 'mbuf', 'net'],\n+ 'test_link_bonding_rssconf.c': ['ethdev', 'bus_vdev', 'net_bond'],\n+ 'test_logs.c': [],\n+ 'test_lpm.c': ['net', 'lpm'],\n+ 'test_lpm6.c': ['lpm'],\n+ 'test_lpm6_perf.c': ['lpm'],\n+ 'test_lpm_perf.c': ['net', 'lpm'],\n+ 'test_malloc.c': [],\n+ 'test_malloc_perf.c': [],\n+ 'test_mbuf.c': ['ring', 'mempool', 'mbuf', 'net'],\n+ 'test_mcslock.c': [],\n+ 'test_member.c': ['member', 'net'],\n+ 'test_member_perf.c': ['hash', 'member'],\n+ 'test_memcpy.c': [],\n+ 'test_memcpy_perf.c': [],\n+ 'test_memory.c': [],\n+ 'test_mempool.c': ['mempool', 'mbuf'],\n+ 'test_mempool_perf.c': ['mempool', 'mbuf'],\n+ 'test_memzone.c': [],\n+ 'test_meter.c': ['meter'],\n+ 'test_metrics.c': ['metrics'],\n+ 'test_mp_secondary.c': ['ring', 'mempool', 'hash', 'lpm'],\n+ 'test_pcapng.c': ['ethdev', 'net', 'mbuf', 'mempool', 'pcapng'],\n+ 'test_pdcp.c': ['eventdev', 'pdcp', 'net', 'timer', 'security'],\n+ 'test_pdump.c': ['pdump', 'mempool', 'ring'],\n+ 'test_per_lcore.c': [],\n+ 'test_pflock.c': [],\n+ 'test_pie.c': ['sched'],\n+ 'test_pmd_perf.c': ['ethdev', 'mbuf', 'net'],\n+ 'test_pmd_ring.c': ['net_ring', 'ethdev', 'bus_vdev'],\n+ 'test_pmd_ring_perf.c': ['ring', 'ethdev', 'net_ring', 'bus_vdev'],\n+ 'test_power.c': ['power'],\n+ 'test_power_cpufreq.c': ['power'],\n+ 'test_power_intel_uncore.c': ['power'],\n+ 'test_power_kvm_vm.c': ['power'],\n+ 'test_prefetch.c': [],\n+ 'test_rand_perf.c': [],\n+ 'test_rawdev.c': ['mbuf', 'rawdev', 'bus_vdev'],\n+ 'test_rcu_qsbr.c': ['rcu', 'hash'],\n+ 'test_rcu_qsbr_perf.c': ['rcu', 'hash'],\n+ 'test_reassembly_perf.c': ['net', 'ip_frag', 'mbuf'],\n+ 'test_reciprocal_division.c': [],\n+ 'test_reciprocal_division_perf.c': [],\n+ 'test_red.c': ['sched'],\n+ 'test_reorder.c': ['mbuf', 'reorder'],\n+# 'test_resource.c': [],\n+ 'test_rib.c': ['net', 'rib'],\n+ 'test_rib6.c': ['net', 'rib'],\n+ 'test_ring.c': ['ring'],\n+ 'test_ring_hts_stress.c': [],\n+ 'test_ring_mpmc_stress.c': [],\n+ 'test_ring_mt_peek_stress.c': ['ring'],\n+ 'test_ring_mt_peek_stress_zc.c': ['ring'],\n+ 'test_ring_perf.c': ['ring'],\n+ 'test_ring_rts_stress.c': [],\n+ 'test_ring_st_peek_stress.c': ['ring'],\n+ 'test_ring_st_peek_stress_zc.c': ['ring'],\n+ 'test_ring_stress.c': ['ring'],\n+ 'test_rwlock.c': [],\n+ 'test_sched.c': ['net', 'sched'],\n+ 'test_security.c': ['mempool', 'net', 'security'],\n+ 'test_security_inline_macsec.c': ['ethdev', 'security'],\n+ 'test_security_inline_proto.c': ['ethdev', 'security', 'eventdev'],\n+ 'test_seqlock.c': [],\n+ 'test_service_cores.c': ['mbuf'],\n+ 'test_spinlock.c': [],\n+ 'test_stack.c': ['stack'],\n+ 'test_stack_perf.c': ['stack'],\n+ 'test_string_fns.c': [],\n+ 'test_table.c': ['table', 'pipeline', 'port'],\n+ 'test_table_acl.c': ['net', 'table', 'pipeline', 'port'],\n+ 'test_table_combined.c': ['table', 'pipeline', 'port'],\n+ 'test_table_pipeline.c': ['pipeline', 'table', 'port'],\n+ 'test_table_ports.c': ['table', 'pipeline', 'port'],\n+ 'test_table_tables.c': ['table', 'pipeline', 'port'],\n+ 'test_tailq.c': [],\n+ 'test_telemetry_data.c': ['telemetry'],\n+ 'test_telemetry_json.c': ['telemetry'],\n+ 'test_thash.c': ['net', 'hash'],\n+ 'test_thash_perf.c': ['hash'],\n+ 'test_threads.c': [],\n+ 'test_ticketlock.c': [],\n+ 'test_timer.c': ['timer'],\n+ 'test_timer_perf.c': ['timer'],\n+ 'test_timer_racecond.c': ['timer'],\n+ 'test_timer_secondary.c': ['timer', 'mempool'],\n+ 'test_trace.c': [],\n+ 'test_trace_perf.c': [],\n+ 'test_trace_register.c': [],\n+ 'test_vdev.c': ['kvargs', 'bus_vdev'],\n+ 'test_version.c': [],\n+ 'virtual_pmd.c': ['mbuf', 'ethdev', 'pci', 'ring', 'net'],\n+}\n+\n+# autotests always need cmdline library\n+deps += 'cmdline'\n+\n+def_lib = get_option('default_library')\n+foreach f, f_deps : source_file_deps\n+ has_deps = true\n+ foreach d : f_deps\n+ if not is_variable(def_lib + '_rte_' + d)\n+ has_deps = false\n+ break\n+ else\n+ # technically we might not need this dep, but adding it is harmless\n+ if d not in deps\n+ deps += d\n+ endif\n+ endif\n+ endforeach\n+ if has_deps\n+ sources += files(f)\n endif\n-endif\n-\n-if dpdk_conf.has('RTE_LIB_PDCP')\n- test_sources += 'test_pdcp.c'\n- fast_tests += [['pdcp_autotest', false, true]]\n-endif\n+endforeach\n \n if cc.has_argument('-Wno-format-truncation')\n cflags += '-Wno-format-truncation'\n@@ -456,154 +206,4 @@ endif\n cflags += '-fno-strict-aliasing'\n \n # Enable using internal APIs in unit tests\n-cflags += ['-DALLOW_INTERNAL_API']\n-\n-test_dep_objs = []\n-if dpdk_conf.has('RTE_LIB_COMPRESSDEV')\n- compress_test_dep = dependency('zlib', required: false, method: 'pkg-config')\n- if compress_test_dep.found()\n- test_dep_objs += compress_test_dep\n- test_sources += 'test_compressdev.c'\n- fast_tests += [['compressdev_autotest', false, true]]\n- endif\n-endif\n-\n-if dpdk_conf.has('RTE_CRYPTO_SCHEDULER')\n- driver_test_names += 'cryptodev_scheduler_autotest'\n- test_deps += 'crypto_scheduler'\n-endif\n-\n-foreach d:test_deps\n- def_lib = get_option('default_library')\n- test_dep_objs += get_variable(def_lib + '_rte_' + d)\n-endforeach\n-\n-link_libs = []\n-if get_option('default_library') == 'static'\n- link_libs = dpdk_static_libraries + dpdk_drivers\n-endif\n-\n-dpdk_test = executable('dpdk-test',\n- test_sources,\n- link_whole: link_libs,\n- dependencies: test_dep_objs + ext_deps,\n- c_args: cflags,\n- install_rpath: join_paths(get_option('prefix'),\n- driver_install_path),\n- install: true)\n-\n-has_hugepage = run_command(py3, files('has_hugepage.py'), check: true).stdout().strip() != '0'\n-message('hugepage availability: @0@'.format(has_hugepage))\n-\n-# some perf tests (eg: memcpy perf autotest)take very long\n-# to complete, so timeout to 10 minutes\n-timeout_seconds = 600\n-timeout_seconds_fast = 10\n-\n-test_no_huge_args = ['--no-huge', '-m', '2048']\n-\n-foreach arg : fast_tests\n- test_args = []\n- run_test = true\n- if not has_hugepage\n- if arg[1]\n- test_args += test_no_huge_args\n- else\n- run_test = false\n- endif\n- endif\n-\n- if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address,undefined'\n- if not arg[2]\n- run_test = false\n- endif\n- endif\n-\n- if (get_option('default_library') == 'shared' and\n- arg[0] == 'event_eth_tx_adapter_autotest')\n- test_args += ['-d', dpdk_drivers_build_dir]\n- endif\n- if is_linux\n- test_args += ['--file-prefix=@0@'.format(arg[0])]\n- endif\n-\n- if run_test\n- test(arg[0], dpdk_test,\n- env : ['DPDK_TEST=' + arg[0]],\n- args : test_args,\n- timeout : timeout_seconds_fast,\n- is_parallel : false,\n- suite : 'fast-tests')\n- if not is_windows and arg[0] == 'trace_autotest'\n- test_args += ['--trace=.*']\n- test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]\n- test(arg[0] + '_with_traces', dpdk_test,\n- env : ['DPDK_TEST=' + arg[0]],\n- args : test_args,\n- timeout : timeout_seconds_fast,\n- is_parallel : false,\n- suite : 'fast-tests')\n- endif\n- endif\n-endforeach\n-\n-if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')\n- test_args = [dpdk_test]\n- test_args += test_no_huge_args\n- if get_option('default_library') == 'shared'\n- test_args += ['-d', dpdk_drivers_build_dir]\n- endif\n- if dpdk_conf.has('RTE_CRYPTO_NULL')\n- test_args += ['--vdev=crypto_null0']\n- endif\n- if dpdk_conf.has('RTE_DMA_SKELETON')\n- test_args += ['--vdev=dma_skeleton0']\n- endif\n- if dpdk_conf.has('RTE_EVENT_SKELETON')\n- test_args += ['--vdev=event_skeleton0']\n- endif\n- if dpdk_conf.has('RTE_NET_NULL')\n- test_args += ['--vdev=net_null0']\n- endif\n- if dpdk_conf.has('RTE_RAW_SKELETON')\n- test_args += ['--vdev=rawdev_skeleton0']\n- endif\n- test_args += ['-a', '0000:00:00.0']\n- test('telemetry_all', find_program('test_telemetry.sh'),\n- args: test_args,\n- timeout : timeout_seconds_fast,\n- is_parallel : false,\n- suite : 'fast-tests')\n-endif\n-\n-foreach arg : perf_test_names\n- test(arg, dpdk_test,\n- env : ['DPDK_TEST=' + arg],\n- timeout : timeout_seconds,\n- is_parallel : false,\n- suite : 'perf-tests')\n-endforeach\n-\n-foreach arg : driver_test_names\n- test(arg, dpdk_test,\n- env : ['DPDK_TEST=' + arg],\n- timeout : timeout_seconds,\n- is_parallel : false,\n- suite : 'driver-tests')\n-endforeach\n-\n-foreach arg : dump_test_names\n- test(arg, dpdk_test,\n- env : ['DPDK_TEST=' + arg],\n- timeout : timeout_seconds,\n- is_parallel : false,\n- suite : 'debug-tests')\n-endforeach\n-\n-foreach arg : extra_test_names\n- test(arg, dpdk_test,\n- env : ['DPDK_TEST=' + arg],\n- timeout : timeout_seconds,\n- is_parallel : false,\n- suite : 'extra-tests')\n-endforeach\n+cflags += '-DALLOW_INTERNAL_API'\n", "prefixes": [ "RFC", "3/5" ] }{ "id": 129685, "url": "