improve fast-tests suite
cover improve fast-tests suite
Add some additional unattached tests to the fast-test suite to expand its scope to all suitable tests. Also, improve readability of the test calls by replacing the true/false options for nohuge and asan with explicit values for NOHUGE and ASAN.
Bruce Richardson (2):
app/test: add some unattached tests to fast-test suite app/test: make parameters clearer when adding fast tests
app/test/suites/meson.build | 14 ++++++++++++-- app/test/test.h | 9 ++++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +++--- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++++++++------------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 ++-- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 ++-- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++++---- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 ++-- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 2 +- doc/guides/contributing/unit_test.rst | 10 ++++++---- 111 files changed, 153 insertions(+), 134 deletions(-)
--
2.51.0
PATCH 1/2 app/test: add some unattached tests to fast-test suite
There are quite a number of test cases defined which are not present in any test-suite. Meson warns about these on build, so reduce the warnings by adding externla-mem, ipsec-sad, red and secondary timer test cases to the fast-test suite.
--- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_external_mem.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_red.c | 2 +- app/test/test_timer_secondary.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
app/test/test_event_crypto_adapter.c +1 -1
@@ -1625,5 +1625,5 @@ test_event_crypto_adapter(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_crypto_adapter_autotest, +REGISTER_FAST_TEST (event_crypto_adapter_autotest, true, true, test_event_crypto_adapter);
app/test/test_external_mem.c +1 -1
@@ -587,4 +587,4 @@ test_external_mem(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (external_mem_autotest, test_external_mem); +REGISTER_FAST_TEST (external_mem_autotest, false, true, test_external_mem);
app/test/test_ipsec_sad.c +1 -1
@@ -899,4 +899,4 @@ test_ipsec_sad(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (ipsec_sad_autotest, test_ipsec_sad); +REGISTER_FAST_TEST (ipsec_sad_autotest, true, true, test_ipsec_sad);
app/test/test_red.c +1 -1
@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest, true, true, test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
app/test/test_timer_secondary.c +1 -1
@@ -224,4 +224,4 @@ test_timer_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (timer_secondary_autotest, test_timer_secondary); +REGISTER_FAST_TEST (timer_secondary_autotest, false, true, test_timer_secondary);
Signature · 1 line
2.51.0
PATCH 2/2 app/test: make parameters clearer when adding fast tests
In reply to Bruce RichardsonFor the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE/HUGEPAGES and NOASAN/ASAN instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
--- app/test/suites/meson.build | 14 ++++++++++++-- app/test/test.h | 9 ++++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +++--- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++++++++------------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 ++-- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 ++-- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++++---- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 ++-- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 2 +- doc/guides/contributing/unit_test.rst | 10 ++++++---- 111 files changed, 153 insertions(+), 134 deletions(-)
app/test/suites/meson.build +12 -2
@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge. Note, the extraction script runs tolower() + if params[1] != 'NOHUGE' and params[1] != 'HUGEPAGES' + error('Invalid parameter "@0@" for test "@1@". Must be NOHUGE or HUGEPAGES.' + .format(params[1], params[0])) + endif + if params[2] != 'ASAN' and params[2] != 'NOASAN' + error('Invalid parameter "@0@" for test "@1@". Must be ASAN or NOASAN.' + .format(params[2], params[0])) + endif + test_name = params[0] - nohuge = params[1] == 'true' - asan = params[2] == 'true' + nohuge = params[1] == 'NOHUGE' + asan = params[2] == 'ASAN' test_args = [] if nohuge
app/test/test.h +8 -1
@@ -207,9 +207,16 @@ void add_test_command(struct test_command *t);/* Register a test function as a particular type. * These can be used to build up test suites automatically */ -#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func)#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND#define REGISTER_STRESS_TEST REGISTER_TEST_COMMAND +/* fast tests are a bit special. They can be specified as supporting running without +* hugepages and/or under ASan. +* - The "no_huge" options should be passed as either "NOHUGE" or "HUGEPAGES" +* - The "ASan" options should be passed as either "ASAN" or "NOASAN" +*/ +#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) + +#endif
app/test/test_acl.c +1 -1
@@ -1748,4 +1748,4 @@ test_acl(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (acl_autotest, true, true, test_acl); +REGISTER_FAST_TEST (acl_autotest,NOHUGE ,ASAN , test_acl);
app/test/test_alarm.c +1 -1
@@ -76,4 +76,4 @@ test_alarm(void)return 0 ; } -REGISTER_FAST_TEST (alarm_autotest, true, true, test_alarm); +REGISTER_FAST_TEST (alarm_autotest,NOHUGE ,ASAN , test_alarm);
app/test/test_argparse.c +1 -1
@@ -1618,4 +1618,4 @@ test_argparse(void)return unit_test_suite_runner (&argparse_test_suite); } -REGISTER_FAST_TEST (argparse_autotest, true, true, test_argparse); +REGISTER_FAST_TEST (argparse_autotest,NOHUGE ,ASAN , test_argparse);
app/test/test_atomic.c +1 -1
@@ -632,5 +632,5 @@ test_atomic(void) return 0; } -REGISTER_FAST_TEST (atomic_autotest, false, true, test_atomic); +REGISTER_FAST_TEST (atomic_autotest,HUGEPAGES ,ASAN , test_atomic);#endif /* RTE_TOOLCHAIN_MSVC */
app/test/test_bitcount.c +1 -1
@@ -171,4 +171,4 @@ test_bitcount(void)return unit_test_suite_runner (&bitcount_test_suite); } -REGISTER_FAST_TEST (bitcount_autotest, true, true, test_bitcount); +REGISTER_FAST_TEST (bitcount_autotest,NOHUGE ,ASAN , test_bitcount);
app/test/test_bitmap.c +1 -1
@@ -269,4 +269,4 @@ test_bitmap(void)return test_bitmap_all_set (); } -REGISTER_FAST_TEST (bitmap_autotest, true, true, test_bitmap); +REGISTER_FAST_TEST (bitmap_autotest,NOHUGE ,ASAN , test_bitmap);
app/test/test_bitops.c +1 -1
@@ -438,4 +438,4 @@ test_bitops(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (bitops_autotest, true, true, test_bitops); +REGISTER_FAST_TEST (bitops_autotest,NOHUGE ,ASAN , test_bitops);
app/test/test_bitratestats.c +1 -1
@@ -249,4 +249,4 @@ test_bitratestats(void) {return unit_test_suite_runner (&bitratestats_testsuite); } -REGISTER_FAST_TEST (bitratestats_autotest, true, true, test_bitratestats); +REGISTER_FAST_TEST (bitratestats_autotest,NOHUGE ,ASAN , test_bitratestats);
app/test/test_bitset.c +1 -1
@@ -909,4 +909,4 @@ test_bitset(void)return unit_test_suite_runner (&bitset_tests); } -REGISTER_FAST_TEST (bitset_autotest, true, true, test_bitset); +REGISTER_FAST_TEST (bitset_autotest,NOHUGE ,ASAN , test_bitset);
app/test/test_bpf.c +3 -3
@@ -3278,7 +3278,7 @@ test_bpf(void)#endif /* !RTE_LIB_BPF */ -REGISTER_FAST_TEST (bpf_autotest, true, true, test_bpf); +REGISTER_FAST_TEST (bpf_autotest,NOHUGE ,ASAN , test_bpf);#ifdef TEST_BPF_ELF_LOAD
@@ -3751,7 +3751,7 @@ test_bpf_elf(void)#endif /* !TEST_BPF_ELF_LOAD */ -REGISTER_FAST_TEST (bpf_elf_autotest, true, true, test_bpf_elf); +REGISTER_FAST_TEST (bpf_elf_autotest,NOHUGE ,ASAN , test_bpf_elf);#ifndef RTE_HAS_LIBPCAP
@@ -3969,4 +3969,4 @@ test_bpf_convert(void)#endif /* RTE_HAS_LIBPCAP */ -REGISTER_FAST_TEST (bpf_convert_autotest, true, true, test_bpf_convert); +REGISTER_FAST_TEST (bpf_convert_autotest,NOHUGE ,ASAN , test_bpf_convert);
app/test/test_byteorder.c +1 -1
@@ -63,4 +63,4 @@ test_byteorder(void)return 0 ; } -REGISTER_FAST_TEST (byteorder_autotest, true, true, test_byteorder); +REGISTER_FAST_TEST (byteorder_autotest,NOHUGE ,ASAN , test_byteorder);
app/test/test_cfgfile.c +1 -1
@@ -399,4 +399,4 @@ test_cfgfile(void)return unit_test_suite_runner (&test_cfgfile_suite); } -REGISTER_FAST_TEST (cfgfile_autotest, true, true, test_cfgfile); +REGISTER_FAST_TEST (cfgfile_autotest,NOHUGE ,ASAN , test_cfgfile);
app/test/test_cksum.c +1 -1
@@ -267,4 +267,4 @@ test_cksum(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (cksum_autotest, true, true, test_cksum); +REGISTER_FAST_TEST (cksum_autotest,NOHUGE ,ASAN , test_cksum);
app/test/test_cmdline.c +1 -1
@@ -60,4 +60,4 @@ test_cmdline(void)return 0 ; } -REGISTER_FAST_TEST (cmdline_autotest, true, true, test_cmdline); +REGISTER_FAST_TEST (cmdline_autotest,NOHUGE ,ASAN , test_cmdline);
app/test/test_common.c +1 -1
@@ -354,4 +354,4 @@ test_common(void)return ret; } -REGISTER_FAST_TEST (common_autotest, true, true, test_common); +REGISTER_FAST_TEST (common_autotest,NOHUGE ,ASAN , test_common);
app/test/test_compressdev.c +1 -1
@@ -4255,4 +4255,4 @@ test_compressdev(void)return unit_test_suite_runner (&compressdev_testsuite); } -REGISTER_FAST_TEST (compressdev_autotest, false, true, test_compressdev); +REGISTER_FAST_TEST (compressdev_autotest,HUGEPAGES ,ASAN , test_compressdev);
app/test/test_cpuflags.c +1 -1
@@ -327,4 +327,4 @@ test_cpuflags(void)return 0 ; } -REGISTER_FAST_TEST (cpuflags_autotest, true, true, test_cpuflags); +REGISTER_FAST_TEST (cpuflags_autotest,NOHUGE ,ASAN , test_cpuflags);
app/test/test_crc.c +1 -1
@@ -140,4 +140,4 @@ crc_autotest(void)return ret; } -REGISTER_FAST_TEST (crc_autotest, true, true, crc_autotest); +REGISTER_FAST_TEST (crc_autotest,NOHUGE ,ASAN , crc_autotest);
app/test/test_cycles.c +1 -1
@@ -53,4 +53,4 @@ test_user_delay_us(void)return 0 ; } -REGISTER_FAST_TEST (user_delay_us, true, true, test_user_delay_us); +REGISTER_FAST_TEST (user_delay_us,NOHUGE ,ASAN , test_user_delay_us);
app/test/test_debug.c +1 -1
@@ -183,4 +183,4 @@ test_debug(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (debug_autotest, true, true, test_debug); +REGISTER_FAST_TEST (debug_autotest,NOHUGE ,ASAN , test_debug);
app/test/test_devargs.c +1 -1
@@ -320,4 +320,4 @@ test_devargs(void)return 0 ; } -REGISTER_FAST_TEST (devargs_autotest, true, true, test_devargs); +REGISTER_FAST_TEST (devargs_autotest,NOHUGE ,ASAN , test_devargs);
app/test/test_dispatcher.c +1 -1
@@ -1053,4 +1053,4 @@ test_dispatcher(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (dispatcher_autotest, false, true, test_dispatcher); +REGISTER_FAST_TEST (dispatcher_autotest,HUGEPAGES ,ASAN , test_dispatcher);
app/test/test_distributor.c +1 -1
@@ -953,4 +953,4 @@ test_distributor(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (distributor_autotest, false, true, test_distributor); +REGISTER_FAST_TEST (distributor_autotest,HUGEPAGES ,ASAN , test_distributor);
app/test/test_eal_flags.c +12 -12
@@ -1692,15 +1692,15 @@ test_memory_flags(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_flags_c_opt_autotest, false, false, test_missing_c_flag); -REGISTER_FAST_TEST (eal_flags_main_opt_autotest, false, false, test_main_lcore_flag); -REGISTER_FAST_TEST (eal_flags_n_opt_autotest, false, false, test_invalid_n_flag); -REGISTER_FAST_TEST (eal_flags_hpet_autotest, false, false, test_no_hpet_flag); -REGISTER_FAST_TEST (eal_flags_no_huge_autotest, false, false, test_no_huge_flag); -REGISTER_FAST_TEST (eal_flags_a_opt_autotest, false, false, test_allow_flag); -REGISTER_FAST_TEST (eal_flags_b_opt_autotest, false, false, test_invalid_b_flag); -REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag); -REGISTER_FAST_TEST (eal_flags_r_opt_autotest, false, false, test_invalid_r_flag); -REGISTER_FAST_TEST (eal_flags_mem_autotest, false, false, test_memory_flags); -REGISTER_FAST_TEST (eal_flags_file_prefix_autotest, false, false, test_file_prefix); -REGISTER_FAST_TEST (eal_flags_misc_autotest, false, false, test_misc_flags); +REGISTER_FAST_TEST (eal_flags_c_opt_autotest,HUGEPAGES ,NOASAN , test_missing_c_flag); +REGISTER_FAST_TEST (eal_flags_main_opt_autotest,HUGEPAGES ,NOASAN , test_main_lcore_flag); +REGISTER_FAST_TEST (eal_flags_n_opt_autotest,HUGEPAGES ,NOASAN , test_invalid_n_flag); +REGISTER_FAST_TEST (eal_flags_hpet_autotest,HUGEPAGES ,NOASAN , test_no_hpet_flag); +REGISTER_FAST_TEST (eal_flags_no_huge_autotest,HUGEPAGES ,NOASAN , test_no_huge_flag); +REGISTER_FAST_TEST (eal_flags_a_opt_autotest,HUGEPAGES ,NOASAN , test_allow_flag); +REGISTER_FAST_TEST (eal_flags_b_opt_autotest,HUGEPAGES ,NOASAN , test_invalid_b_flag); +REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest,HUGEPAGES ,NOASAN , test_invalid_vdev_flag); +REGISTER_FAST_TEST (eal_flags_r_opt_autotest,HUGEPAGES ,NOASAN , test_invalid_r_flag); +REGISTER_FAST_TEST (eal_flags_mem_autotest,HUGEPAGES ,NOASAN , test_memory_flags); +REGISTER_FAST_TEST (eal_flags_file_prefix_autotest,HUGEPAGES ,NOASAN , test_file_prefix); +REGISTER_FAST_TEST (eal_flags_misc_autotest,HUGEPAGES ,NOASAN , test_misc_flags);
app/test/test_eal_fs.c +1 -1
@@ -185,4 +185,4 @@ test_eal_fs(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_fs_autotest, true, true, test_eal_fs); +REGISTER_FAST_TEST (eal_fs_autotest,NOHUGE ,ASAN , test_eal_fs);
app/test/test_errno.c +1 -1
@@ -94,4 +94,4 @@ test_errno(void)return 0 ; } -REGISTER_FAST_TEST (errno_autotest, true, true, test_errno); +REGISTER_FAST_TEST (errno_autotest,NOHUGE ,ASAN , test_errno);
app/test/test_ethdev_link.c +1 -1
@@ -172,4 +172,4 @@ test_link_status(void)return unit_test_suite_runner (&link_status_testsuite); } -REGISTER_FAST_TEST (ethdev_link_status, true, true, test_link_status); +REGISTER_FAST_TEST (ethdev_link_status,NOHUGE ,ASAN , test_link_status);
app/test/test_event_crypto_adapter.c +1 -1
@@ -1625,5 +1625,5 @@ test_event_crypto_adapter(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_crypto_adapter_autotest, true, true, +REGISTER_FAST_TEST (event_crypto_adapter_autotest,NOHUGE ,ASAN , test_event_crypto_adapter);
app/test/test_event_eth_tx_adapter.c +1 -1
@@ -1010,4 +1010,4 @@ test_event_eth_tx_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_eth_tx_adapter_autotest, false, true, test_event_eth_tx_adapter_common); +REGISTER_FAST_TEST (event_eth_tx_adapter_autotest,HUGEPAGES ,ASAN , test_event_eth_tx_adapter_common);
app/test/test_event_ring.c +1 -1
@@ -256,4 +256,4 @@ test_event_ring(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_ring_autotest, true, true, test_event_ring); +REGISTER_FAST_TEST (event_ring_autotest,NOHUGE ,ASAN , test_event_ring);
app/test/test_event_vector_adapter.c +1 -1
@@ -709,5 +709,5 @@ test_event_vector_adapter(void)#endif /* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(event_vector_adapter_autotest, true, true, test_event_vector_adapter); +* REGISTER_FAST_TEST(event_vector_adapter_autotest, NOHUGE, ASAN, test_event_vector_adapter); */
app/test/test_eventdev.c +2 -2
@@ -1529,10 +1529,10 @@ test_eventdev_selftest_cn20k(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eventdev_common_autotest, true, true, test_eventdev_common); +REGISTER_FAST_TEST (eventdev_common_autotest,NOHUGE ,ASAN , test_eventdev_common);#ifndef RTE_EXEC_ENV_WINDOWS -REGISTER_FAST_TEST (eventdev_selftest_sw, true, true, test_eventdev_selftest_sw); +REGISTER_FAST_TEST (eventdev_selftest_sw,NOHUGE ,ASAN , test_eventdev_selftest_sw);REGISTER_DRIVER_TEST (eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);REGISTER_DRIVER_TEST (eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);REGISTER_DRIVER_TEST (eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
app/test/test_external_mem.c +1 -1
@@ -587,4 +587,4 @@ test_external_mem(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (external_mem_autotest, false, true, test_external_mem); +REGISTER_FAST_TEST (external_mem_autotest,HUGEPAGES ,ASAN , test_external_mem);
app/test/test_fbarray.c +1 -1
@@ -933,4 +933,4 @@ test_fbarray(void)return unit_test_suite_runner (&fbarray_test_suite); } -REGISTER_FAST_TEST (fbarray_autotest, true, true, test_fbarray); +REGISTER_FAST_TEST (fbarray_autotest,NOHUGE ,ASAN , test_fbarray);
app/test/test_fib.c +1 -1
@@ -629,5 +629,5 @@ test_slow_fib(void)return unit_test_suite_runner (&fib_slow_tests); } -REGISTER_FAST_TEST (fib_autotest, true, true, test_fib); +REGISTER_FAST_TEST (fib_autotest,NOHUGE ,ASAN , test_fib);REGISTER_PERF_TEST (fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +1 -1
@@ -640,5 +640,5 @@ test_slow_fib6(void)return unit_test_suite_runner (&fib6_slow_tests); } -REGISTER_FAST_TEST (fib6_autotest, true, true, test_fib6); +REGISTER_FAST_TEST (fib6_autotest,NOHUGE ,ASAN , test_fib6);REGISTER_PERF_TEST (fib6_slow_autotest, test_slow_fib6);
app/test/test_func_reentrancy.c +1 -1
@@ -511,4 +511,4 @@ test_func_reentrancy(void)return 0 ; } -REGISTER_FAST_TEST (func_reentrancy_autotest, false, true, test_func_reentrancy); +REGISTER_FAST_TEST (func_reentrancy_autotest,HUGEPAGES ,ASAN , test_func_reentrancy);
app/test/test_graph.c +2 -2
@@ -1150,7 +1150,7 @@ graph_autotest_fn(void)return unit_test_suite_runner (&graph_testsuite); } -REGISTER_FAST_TEST (graph_autotest, true, true, graph_autotest_fn); +REGISTER_FAST_TEST (graph_autotest,NOHUGE ,ASAN , graph_autotest_fn);static int test_node_list_dump (void )
@@ -1162,4 +1162,4 @@ test_node_list_dump(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (node_list_dump, true, true, test_node_list_dump); +REGISTER_FAST_TEST (node_list_dump,NOHUGE ,ASAN , test_node_list_dump);
app/test/test_graph_feature_arc.c +1 -1
@@ -1368,6 +1368,6 @@ graph_feature_arc_autotest_fn(void) return unit_test_suite_runner(&graph_feature_arc_testsuite); } -REGISTER_FAST_TEST (graph_feature_arc_autotest, true, true, graph_feature_arc_autotest_fn); +REGISTER_FAST_TEST (graph_feature_arc_autotest,NOHUGE ,ASAN , graph_feature_arc_autotest_fn);#endif /* !RTE_EXEC_ENV_WINDOWS */
app/test/test_hash.c +1 -1
@@ -2405,4 +2405,4 @@ test_hash(void)return 0 ; } -REGISTER_FAST_TEST (hash_autotest, true, true, test_hash); +REGISTER_FAST_TEST (hash_autotest,NOHUGE ,ASAN , test_hash);
app/test/test_hash_readwrite.c +1 -1
@@ -775,5 +775,5 @@ test_hash_rw_func_main(void)return 0 ; } -REGISTER_FAST_TEST (hash_readwrite_func_autotest, false, true, test_hash_rw_func_main); +REGISTER_FAST_TEST (hash_readwrite_func_autotest,HUGEPAGES ,ASAN , test_hash_rw_func_main);REGISTER_PERF_TEST (hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_interrupts.c +1 -1
@@ -594,4 +594,4 @@ test_interrupt(void)return ret; } -REGISTER_FAST_TEST (interrupt_autotest, true, true, test_interrupt); +REGISTER_FAST_TEST (interrupt_autotest,NOHUGE ,ASAN , test_interrupt);
app/test/test_ipfrag.c +1 -1
@@ -505,4 +505,4 @@ test_ipfrag(void) } -REGISTER_FAST_TEST (ipfrag_autotest, false, true, test_ipfrag); +REGISTER_FAST_TEST (ipfrag_autotest,HUGEPAGES ,ASAN , test_ipfrag);
app/test/test_ipsec.c +1 -1
@@ -2617,4 +2617,4 @@ test_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (ipsec_autotest, true, true, test_ipsec); +REGISTER_FAST_TEST (ipsec_autotest,NOHUGE ,ASAN , test_ipsec);
app/test/test_ipsec_sad.c +1 -1
@@ -899,4 +899,4 @@ test_ipsec_sad(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (ipsec_sad_autotest, true, true, test_ipsec_sad); +REGISTER_FAST_TEST (ipsec_sad_autotest,NOHUGE ,ASAN , test_ipsec_sad);
app/test/test_kvargs.c +1 -1
@@ -364,4 +364,4 @@ test_kvargs(void)return unit_test_suite_runner (&kvargs_test_suite); } -REGISTER_FAST_TEST (kvargs_autotest, true, true, test_kvargs); +REGISTER_FAST_TEST (kvargs_autotest,NOHUGE ,ASAN , test_kvargs);
app/test/test_latencystats.c +1 -1
@@ -246,4 +246,4 @@ static int test_latencystats(void)return unit_test_suite_runner (&latencystats_testsuite); } -REGISTER_FAST_TEST (latencystats_autotest, true, true, test_latencystats); +REGISTER_FAST_TEST (latencystats_autotest,NOHUGE ,ASAN , test_latencystats);
app/test/test_lcore_var.c +1 -1
@@ -411,4 +411,4 @@ static int test_lcore_var(void)return unit_test_suite_runner (&lcore_var_testsuite); } -REGISTER_FAST_TEST (lcore_var_autotest, true, false, test_lcore_var); +REGISTER_FAST_TEST (lcore_var_autotest,NOHUGE ,NOASAN , test_lcore_var);
app/test/test_lcores.c +1 -1
@@ -422,4 +422,4 @@ test_lcores(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (lcores_autotest, true, true, test_lcores); +REGISTER_FAST_TEST (lcores_autotest,NOHUGE ,ASAN , test_lcores);
app/test/test_logs.c +1 -1
@@ -158,4 +158,4 @@ test_logs(void)return 0 ; } -REGISTER_FAST_TEST (logs_autotest, true, true, test_logs); +REGISTER_FAST_TEST (logs_autotest,NOHUGE ,ASAN , test_logs);
app/test/test_lpm.c +1 -1
@@ -1584,4 +1584,4 @@ test_lpm(void)return global_status; } -REGISTER_FAST_TEST (lpm_autotest, true, true, test_lpm); +REGISTER_FAST_TEST (lpm_autotest,NOHUGE ,ASAN , test_lpm);
app/test/test_lpm6.c +1 -1
@@ -1767,4 +1767,4 @@ test_lpm6(void)return global_status; } -REGISTER_FAST_TEST (lpm6_autotest, true, true, test_lpm6); +REGISTER_FAST_TEST (lpm6_autotest,NOHUGE ,ASAN , test_lpm6);
app/test/test_malloc.c +1 -1
@@ -1166,4 +1166,4 @@ test_malloc(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (malloc_autotest, false, true, test_malloc); +REGISTER_FAST_TEST (malloc_autotest,HUGEPAGES ,ASAN , test_malloc);
app/test/test_mbuf.c +1 -1
@@ -2953,4 +2953,4 @@ test_mbuf(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (mbuf_autotest, false, true, test_mbuf); +REGISTER_FAST_TEST (mbuf_autotest,HUGEPAGES ,ASAN , test_mbuf);
app/test/test_mcslock.c +1 -1
@@ -241,4 +241,4 @@ test_mcslock(void)return ret; } -REGISTER_FAST_TEST (mcslock_autotest, false, true, test_mcslock); +REGISTER_FAST_TEST (mcslock_autotest,HUGEPAGES ,ASAN , test_mcslock);
app/test/test_member.c +1 -1
@@ -996,4 +996,4 @@ test_member(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (member_autotest, true, true, test_member); +REGISTER_FAST_TEST (member_autotest,NOHUGE ,ASAN , test_member);
app/test/test_memcpy.c +1 -1
@@ -129,4 +129,4 @@ test_memcpy(void)return 0 ; } -REGISTER_FAST_TEST (memcpy_autotest, true, true, test_memcpy); +REGISTER_FAST_TEST (memcpy_autotest,NOHUGE ,ASAN , test_memcpy);
app/test/test_memory.c +1 -1
@@ -110,4 +110,4 @@ test_memory(void)return 0 ; } -REGISTER_FAST_TEST (memory_autotest, false, true, test_memory); +REGISTER_FAST_TEST (memory_autotest,HUGEPAGES ,ASAN , test_memory);
app/test/test_mempool.c +1 -1
@@ -1122,4 +1122,4 @@ test_mempool(void)return ret; } -REGISTER_FAST_TEST (mempool_autotest, false, true, test_mempool); +REGISTER_FAST_TEST (mempool_autotest,HUGEPAGES ,ASAN , test_mempool);
app/test/test_memzone.c +1 -1
@@ -1162,4 +1162,4 @@ test_memzone(void)return 0 ; } -REGISTER_FAST_TEST (memzone_autotest, false, true, test_memzone); +REGISTER_FAST_TEST (memzone_autotest,HUGEPAGES ,ASAN , test_memzone);
app/test/test_meter.c +1 -1
@@ -713,4 +713,4 @@ test_meter(void) } -REGISTER_FAST_TEST (meter_autotest, true, true, test_meter); +REGISTER_FAST_TEST (meter_autotest,NOHUGE ,ASAN , test_meter);
app/test/test_metrics.c +1 -1
@@ -326,4 +326,4 @@ test_metrics(void)return unit_test_suite_runner (&metrics_testsuite); } -REGISTER_FAST_TEST (metrics_autotest, true, true, test_metrics); +REGISTER_FAST_TEST (metrics_autotest,NOHUGE ,ASAN , test_metrics);
app/test/test_mp_secondary.c +1 -1
@@ -222,4 +222,4 @@ test_mp_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (multiprocess_autotest, false, false, test_mp_secondary); +REGISTER_FAST_TEST (multiprocess_autotest,HUGEPAGES ,NOASAN , test_mp_secondary);
app/test/test_net_ether.c +1 -1
@@ -162,4 +162,4 @@ test_net_ether(void)return 0 ; } -REGISTER_FAST_TEST (net_ether_autotest, true, true, test_net_ether); +REGISTER_FAST_TEST (net_ether_autotest,NOHUGE ,ASAN , test_net_ether);
app/test/test_net_ip6.c +1 -1
@@ -218,4 +218,4 @@ test_net_ipv6(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (net_ipv6_autotest, true, true, test_net_ipv6); +REGISTER_FAST_TEST (net_ipv6_autotest,NOHUGE ,ASAN , test_net_ipv6);
app/test/test_pcapng.c +1 -1
@@ -464,4 +464,4 @@ test_pcapng(void)return unit_test_suite_runner (&test_pcapng_suite); } -REGISTER_FAST_TEST (pcapng_autotest, true, true, test_pcapng); +REGISTER_FAST_TEST (pcapng_autotest,NOHUGE ,ASAN , test_pcapng);
app/test/test_pdcp.c +1 -1
@@ -2388,4 +2388,4 @@ test_pdcp(void)return ret; } -REGISTER_FAST_TEST (pdcp_autotest, false, true, test_pdcp); +REGISTER_FAST_TEST (pdcp_autotest,HUGEPAGES ,ASAN , test_pdcp);
app/test/test_pdump.c +1 -1
@@ -218,4 +218,4 @@ test_pdump(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (pdump_autotest, true, false, test_pdump); +REGISTER_FAST_TEST (pdump_autotest,NOHUGE ,NOASAN , test_pdump);
app/test/test_per_lcore.c +1 -1
@@ -118,4 +118,4 @@ test_per_lcore(void)return 0 ; } -REGISTER_FAST_TEST (per_lcore_autotest, true, true, test_per_lcore); +REGISTER_FAST_TEST (per_lcore_autotest,NOHUGE ,ASAN , test_per_lcore);
app/test/test_pflock.c +1 -1
@@ -194,4 +194,4 @@ test_pflock(void)return 0 ; } -REGISTER_FAST_TEST (pflock_autotest, true, true, test_pflock); +REGISTER_FAST_TEST (pflock_autotest,NOHUGE ,ASAN , test_pflock);
app/test/test_pie.c +1 -1
@@ -1082,6 +1082,6 @@ test_pie_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (pie_autotest, true, true, test_pie); +REGISTER_FAST_TEST (pie_autotest,NOHUGE ,ASAN , test_pie);REGISTER_PERF_TEST (pie_perf, test_pie_perf);REGISTER_PERF_TEST (pie_all, test_pie_all);
app/test/test_pmd_ring.c +1 -1
@@ -593,4 +593,4 @@ test_pmd_ring(void)return unit_test_suite_runner (&test_pmd_ring_suite); } -REGISTER_FAST_TEST (ring_pmd_autotest, true, true, test_pmd_ring); +REGISTER_FAST_TEST (ring_pmd_autotest,NOHUGE ,ASAN , test_pmd_ring);
app/test/test_pmu.c +1 -1
@@ -53,5 +53,5 @@ test_pmu(void) }/* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(pmu_autotest, true, true, test_pmu); +* REGISTER_FAST_TEST(pmu_autotest, NOHUGE, ASAN, test_pmu); */
app/test/test_power.c +1 -1
@@ -78,4 +78,4 @@ test_power(void) }#endif -REGISTER_FAST_TEST (power_autotest, true, true, test_power); +REGISTER_FAST_TEST (power_autotest,NOHUGE ,ASAN , test_power);
app/test/test_power_cpufreq.c +1 -1
@@ -678,5 +678,5 @@ test_power_caps(void)#endif -REGISTER_FAST_TEST (power_cpufreq_autotest, false, true, test_power_cpufreq); +REGISTER_FAST_TEST (power_cpufreq_autotest,HUGEPAGES ,ASAN , test_power_cpufreq);REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
@@ -303,4 +303,4 @@ test_power_intel_uncore(void) }#endif -REGISTER_FAST_TEST (power_intel_uncore_autotest, true, true, test_power_intel_uncore); +REGISTER_FAST_TEST (power_intel_uncore_autotest,NOHUGE ,ASAN , test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
@@ -263,4 +263,4 @@ test_power_kvm_vm(void) }#endif -REGISTER_FAST_TEST (power_kvm_vm_autotest, false, true, test_power_kvm_vm); +REGISTER_FAST_TEST (power_kvm_vm_autotest,HUGEPAGES ,ASAN , test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
@@ -35,4 +35,4 @@ test_prefetch(void)return 0 ; } -REGISTER_FAST_TEST (prefetch_autotest, true, true, test_prefetch); +REGISTER_FAST_TEST (prefetch_autotest,NOHUGE ,ASAN , test_prefetch);
app/test/test_ptr_compress.c +1 -1
@@ -190,4 +190,4 @@ test_ptr_compress(void)return 0 ; } -REGISTER_FAST_TEST (ptr_compress_autotest, true, true, test_ptr_compress); +REGISTER_FAST_TEST (ptr_compress_autotest,NOHUGE ,ASAN , test_ptr_compress);
app/test/test_rawdev.c +1 -1
@@ -74,4 +74,4 @@ test_rawdev_selftests(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (rawdev_autotest, true, true, test_rawdev_selftests); +REGISTER_FAST_TEST (rawdev_autotest,NOHUGE ,ASAN , test_rawdev_selftests);
app/test/test_rcu_qsbr.c +1 -1
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)return -1 ; } -REGISTER_FAST_TEST (rcu_qsbr_autotest, true, true, test_rcu_qsbr_main); +REGISTER_FAST_TEST (rcu_qsbr_autotest,NOHUGE ,ASAN , test_rcu_qsbr_main);
app/test/test_red.c +1 -1
@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (red_autotest, true, true, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE ,ASAN , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
app/test/test_reorder.c +1 -1
@@ -552,4 +552,4 @@ test_reorder(void) } -REGISTER_FAST_TEST (reorder_autotest, true, true, test_reorder); +REGISTER_FAST_TEST (reorder_autotest,NOHUGE ,ASAN , test_reorder);
app/test/test_rib.c +1 -1
@@ -363,5 +363,5 @@ test_slow_rib(void)return unit_test_suite_runner (&rib_slow_tests); } -REGISTER_FAST_TEST (rib_autotest, true, true, test_rib); +REGISTER_FAST_TEST (rib_autotest,NOHUGE ,ASAN , test_rib);REGISTER_PERF_TEST (rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +1 -1
@@ -362,5 +362,5 @@ test_slow_rib6(void)return unit_test_suite_runner (&rib6_slow_tests); } -REGISTER_FAST_TEST (rib6_autotest, true, true, test_rib6); +REGISTER_FAST_TEST (rib6_autotest,NOHUGE ,ASAN , test_rib6);REGISTER_PERF_TEST (rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
@@ -1248,4 +1248,4 @@ test_ring(void)return -1 ; } -REGISTER_FAST_TEST (ring_autotest, true, true, test_ring); +REGISTER_FAST_TEST (ring_autotest,NOHUGE ,ASAN , test_ring);
app/test/test_rwlock.c +4 -4
@@ -507,7 +507,7 @@ try_rwlock_test_rde_wro(void)return process_try_lcore_stats (); } -REGISTER_FAST_TEST (rwlock_test1_autotest, true, true, rwlock_test1); -REGISTER_FAST_TEST (rwlock_rda_autotest, true, true, try_rwlock_test_rda); -REGISTER_FAST_TEST (rwlock_rds_wrm_autotest, true, true, try_rwlock_test_rds_wrm); -REGISTER_FAST_TEST (rwlock_rde_wro_autotest, true, true, try_rwlock_test_rde_wro); +REGISTER_FAST_TEST (rwlock_test1_autotest,NOHUGE ,ASAN , rwlock_test1); +REGISTER_FAST_TEST (rwlock_rda_autotest,NOHUGE ,ASAN , try_rwlock_test_rda); +REGISTER_FAST_TEST (rwlock_rds_wrm_autotest,NOHUGE ,ASAN , try_rwlock_test_rds_wrm); +REGISTER_FAST_TEST (rwlock_rde_wro_autotest,NOHUGE ,ASAN , try_rwlock_test_rde_wro);
app/test/test_sched.c +1 -1
@@ -215,4 +215,4 @@ test_sched(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (sched_autotest, true, true, test_sched); +REGISTER_FAST_TEST (sched_autotest,NOHUGE ,ASAN , test_sched);
app/test/test_security.c +1 -1
@@ -2314,4 +2314,4 @@ test_security(void)return unit_test_suite_runner (&security_testsuite); } -REGISTER_FAST_TEST (security_autotest, false, true, test_security); +REGISTER_FAST_TEST (security_autotest,HUGEPAGES ,ASAN , test_security);
app/test/test_seqlock.c +1 -1
@@ -187,4 +187,4 @@ test_seqlock(void)return rc; } -REGISTER_FAST_TEST (seqlock_autotest, true, true, test_seqlock); +REGISTER_FAST_TEST (seqlock_autotest,NOHUGE ,ASAN , test_seqlock);
app/test/test_service_cores.c +1 -1
@@ -1081,7 +1081,7 @@ test_service_common(void)return unit_test_suite_runner (&service_tests); } -REGISTER_FAST_TEST (service_autotest, true, true, test_service_common); +REGISTER_FAST_TEST (service_autotest,NOHUGE ,ASAN , test_service_common);static struct unit_test_suite service_perf_tests = { .suite_name ="service core performance test suite" ,
app/test/test_soring.c +1 -1
@@ -438,4 +438,4 @@ test_soring(void)return -1 ; } -REGISTER_FAST_TEST (soring_autotest, true, true, test_soring); +REGISTER_FAST_TEST (soring_autotest,NOHUGE ,ASAN , test_soring);
app/test/test_spinlock.c +1 -1
@@ -303,4 +303,4 @@ test_spinlock(void)return ret; } -REGISTER_FAST_TEST (spinlock_autotest, true, true, test_spinlock); +REGISTER_FAST_TEST (spinlock_autotest,NOHUGE ,ASAN , test_spinlock);
app/test/test_stack.c +2 -2
@@ -379,5 +379,5 @@ test_lf_stack(void)#endif } -REGISTER_FAST_TEST (stack_autotest, false, true, test_stack); -REGISTER_FAST_TEST (stack_lf_autotest, false, true, test_lf_stack); +REGISTER_FAST_TEST (stack_autotest,HUGEPAGES ,ASAN , test_stack); +REGISTER_FAST_TEST (stack_lf_autotest,HUGEPAGES ,ASAN , test_lf_stack);
app/test/test_string_fns.c +1 -1
@@ -328,4 +328,4 @@ test_string_fns(void)return 0 ; } -REGISTER_FAST_TEST (string_autotest, true, true, test_string_fns); +REGISTER_FAST_TEST (string_autotest,NOHUGE ,ASAN , test_string_fns);
app/test/test_table.c +1 -1
@@ -206,4 +206,4 @@ test_table(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (table_autotest, true, true, test_table); +REGISTER_FAST_TEST (table_autotest,NOHUGE ,ASAN , test_table);
app/test/test_tailq.c +1 -1
@@ -125,4 +125,4 @@ test_tailq(void)return ret; } -REGISTER_FAST_TEST (tailq_autotest, true, true, test_tailq); +REGISTER_FAST_TEST (tailq_autotest,NOHUGE ,ASAN , test_tailq);
app/test/test_telemetry_data.c +1 -1
@@ -615,4 +615,4 @@ telemetry_data_autotest(void) }#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (telemetry_data_autotest, true, true, telemetry_data_autotest); +REGISTER_FAST_TEST (telemetry_data_autotest,NOHUGE ,ASAN , telemetry_data_autotest);
app/test/test_telemetry_json.c +1 -1
@@ -213,4 +213,4 @@ test_telemetry_json(void)return 0 ; } -REGISTER_FAST_TEST (telemetry_json_autotest, true, true, test_telemetry_json); +REGISTER_FAST_TEST (telemetry_json_autotest,NOHUGE ,ASAN , test_telemetry_json);
app/test/test_thash.c +1 -1
@@ -1060,4 +1060,4 @@ test_thash(void)return unit_test_suite_runner (&thash_tests); } -REGISTER_FAST_TEST (thash_autotest, true, true, test_thash); +REGISTER_FAST_TEST (thash_autotest,NOHUGE ,ASAN , test_thash);
app/test/test_threads.c +1 -1
@@ -280,4 +280,4 @@ test_threads(void)return unit_test_suite_runner (&threads_test_suite); } -REGISTER_FAST_TEST (threads_autotest, true, true, test_threads); +REGISTER_FAST_TEST (threads_autotest,NOHUGE ,ASAN , test_threads);
app/test/test_ticketlock.c +1 -1
@@ -315,4 +315,4 @@ test_ticketlock(void)return ret; } -REGISTER_FAST_TEST (ticketlock_autotest, true, true, test_ticketlock); +REGISTER_FAST_TEST (ticketlock_autotest,NOHUGE ,ASAN , test_ticketlock);
app/test/test_timer.c +1 -1
@@ -601,4 +601,4 @@ test_timer(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (timer_autotest, false, true, test_timer); +REGISTER_FAST_TEST (timer_autotest,HUGEPAGES ,ASAN , test_timer);
app/test/test_timer_secondary.c +1 -1
@@ -224,4 +224,4 @@ test_timer_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (timer_secondary_autotest, false, true, test_timer_secondary); +REGISTER_FAST_TEST (timer_secondary_autotest,HUGEPAGES ,ASAN , test_timer_secondary);
app/test/test_trace.c +1 -1
@@ -254,4 +254,4 @@ test_trace(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (trace_autotest, true, true, test_trace); +REGISTER_FAST_TEST (trace_autotest,NOHUGE ,ASAN , test_trace);
app/test/test_vdev.c +1 -1
@@ -166,4 +166,4 @@ test_vdev(void)return 0 ; } -REGISTER_FAST_TEST (vdev_autotest, true, true, test_vdev); +REGISTER_FAST_TEST (vdev_autotest,NOHUGE ,ASAN , test_vdev);
app/test/test_version.c +1 -1
@@ -25,4 +25,4 @@ test_version(void)return 0 ; } -REGISTER_FAST_TEST (version_autotest, true, true, test_version); +REGISTER_FAST_TEST (version_autotest,NOHUGE ,ASAN , test_version);
buildtools/get-test-suites.py +1 -1
@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}" for fname in input_list: with open(fname, "r", encoding="utf-8") as f:
doc/guides/contributing/unit_test.rst +6 -4
@@ -188,9 +188,11 @@ There are two important functions for interacting with the test harness: The test is automatically added to the Meson test suite `<MESON_SUITE>` by this macro. Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``. **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different, - in that it takes two additional parameters, - specifying whether the test can be run using ``--no-huge``, - and whether the test can be run using Address Sanitization (ASAN) + in that it takes two additional parameters before the function name: + the hugepage requirement (``NOHUGE`` if the test can run without hugepages, + or ``HUGEPAGES`` if hugepages are required), + and Address Sanitizer compatibility (``ASAN`` if the test can run with ASan enabled, + or ``NOASAN`` if it cannot). ``unit_test_suite_runner(struct unit_test_suite *)`` Returns a runner for a full test suite object,
@@ -318,7 +320,7 @@ of the unit test suite structure, for example: return ret; } - REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests); + REGISTER_FAST_TEST(example_autotest, NOHUGE, ASAN, example_tests); Designing a test
Signature · 1 line
2.51.0
RE: [PATCH 2/2] app/test: make parameters clearer when adding fast tests
Quoted 7 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Tuesday 2 December 2025 15:50
To: [email protected]
Cc: Bruce Richardson <[email protected]>
Subject: [PATCH 2/2] app/test: make parameters clearer when adding fast tests
Quoted 6 lines
For the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE/HUGEPAGES and NOASAN/ASAN instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
I like the idea. However, I think that NOASAN/ASAN is still not fully self-documenting, and may be misleading. Without reading some docs I'd think NOASAN means test will be run without sanitizer and ASAN means it will be run with. As a minimal fix, what about NOHUGE_OK/NOHUGE_SKIP and ASAN_OK/ASAN_SKIP?
More intrusive option, to simplify most normal uses and highlight exceptions:
* 0 (or DEFAULT, or RUN_ALWAYS)
* SKIP_IF_ASAN
* SKIP_IF_NOHUGE
* SKIP_IF_ASAN | SKIP_IF_NOHUGE
Re: [PATCH 2/2] app/test: make parameters clearer when adding fast tests
Quoted 7 lines · Marat Khalili
Quoted 7 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Tuesday 2 December 2025 15:50
To: [email protected]
Cc: Bruce Richardson <[email protected]>
Subject: [PATCH 2/2] app/test: make parameters clearer when adding fast tests
Quoted 9 lines
Quoted 6 lines
For the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE/HUGEPAGES and NOASAN/ASAN instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
I like the idea. However, I think that NOASAN/ASAN is still not fully self-documenting, and may be misleading. Without reading some docs I'd think NOASAN means test will be run without sanitizer and ASAN means it will be run with. As a minimal fix, what about NOHUGE_OK/NOHUGE_SKIP and ASAN_OK/ASAN_SKIP?
Ok for those names. Nice and consistent.
Quoted 5 lines
More intrusive option, to simplify most normal uses and highlight exceptions:
* 0 (or DEFAULT, orRUN_ALWAYS)
*SKIP_IF_ASAN
*SKIP_IF_NOHUGE
*SKIP_IF_ASAN|SKIP_IF_NOHUGE
Yes, that's more intrusive. Not sure it's worth it - I think with the above names things will be a lot clearer. This is also not an API for public consumption, it's just internal flags for meson when configuring the unit tests.
Will do a v2 later with the flags renamed as you suggest, unless there is other feedback in the meantime.
/Bruce
v2 cover Assign all unit tests to suites
In reply to Bruce RichardsonCategorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached tests
Bruce Richardson (10):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output
app/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 9 ++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 309 insertions(+), 157 deletions(-)
--
2.51.0
PATCH v2 1/10 app/test: make parameters clearer when adding fast tests
For the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE_OK/NOHUGE_SKIP and ASAN_OK/ASAN_SKIP instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
--- app/test/suites/meson.build | 14 ++++++++++++-- app/test/test.h | 9 ++++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +++--- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++++++++------------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 ++-- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 ++-- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++++---- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 ++-- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 2 +- doc/guides/contributing/unit_test.rst | 10 ++++++---- 106 files changed, 148 insertions(+), 129 deletions(-)
app/test/suites/meson.build +12 -2
@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge. Note, the extraction script runs tolower() + if params[1] != 'NOHUGE_OK' and params[1] != 'NOHUGE_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be NOHUGE_OK or NOHUGE_SKIP.' + .format(params[1], params[0])) + endif + if params[2] != 'ASAN_OK' and params[2] != 'ASAN_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be ASAN_OK or ASAN_SKIP.' + .format(params[2], params[0])) + endif + test_name = params[0] - nohuge = params[1] == 'true' - asan = params[2] == 'true' + nohuge = params[1] == 'NOHUGE_OK' + asan = params[2] == 'ASAN_OK' test_args = [] if nohuge
app/test/test.h +8 -1
@@ -207,9 +207,16 @@ void add_test_command(struct test_command *t);/* Register a test function as a particular type. * These can be used to build up test suites automatically */ -#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func)#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND#define REGISTER_STRESS_TEST REGISTER_TEST_COMMAND +/* fast tests are a bit special. They can be specified as supporting running without +* hugepages and/or under ASan. +* - The "no_huge" options should be passed as either "NOHUGE_OK" or "NOHUGE_SKIP" +* - The "ASan" options should be passed as either "ASAN_OK" or "ASAN_SKIP" +*/ +#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) + +#endif
app/test/test_acl.c +1 -1
@@ -1748,4 +1748,4 @@ test_acl(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (acl_autotest, true, true, test_acl); +REGISTER_FAST_TEST (acl_autotest,NOHUGE_OK ,ASAN_OK , test_acl);
app/test/test_alarm.c +1 -1
@@ -76,4 +76,4 @@ test_alarm(void)return 0 ; } -REGISTER_FAST_TEST (alarm_autotest, true, true, test_alarm); +REGISTER_FAST_TEST (alarm_autotest,NOHUGE_OK ,ASAN_OK , test_alarm);
app/test/test_argparse.c +1 -1
@@ -1618,4 +1618,4 @@ test_argparse(void)return unit_test_suite_runner (&argparse_test_suite); } -REGISTER_FAST_TEST (argparse_autotest, true, true, test_argparse); +REGISTER_FAST_TEST (argparse_autotest,NOHUGE_OK ,ASAN_OK , test_argparse);
app/test/test_atomic.c +1 -1
@@ -632,5 +632,5 @@ test_atomic(void) return 0; } -REGISTER_FAST_TEST (atomic_autotest, false, true, test_atomic); +REGISTER_FAST_TEST (atomic_autotest,NOHUGE_SKIP ,ASAN_OK , test_atomic);#endif /* RTE_TOOLCHAIN_MSVC */
app/test/test_bitcount.c +1 -1
@@ -171,4 +171,4 @@ test_bitcount(void)return unit_test_suite_runner (&bitcount_test_suite); } -REGISTER_FAST_TEST (bitcount_autotest, true, true, test_bitcount); +REGISTER_FAST_TEST (bitcount_autotest,NOHUGE_OK ,ASAN_OK , test_bitcount);
app/test/test_bitmap.c +1 -1
@@ -269,4 +269,4 @@ test_bitmap(void)return test_bitmap_all_set (); } -REGISTER_FAST_TEST (bitmap_autotest, true, true, test_bitmap); +REGISTER_FAST_TEST (bitmap_autotest,NOHUGE_OK ,ASAN_OK , test_bitmap);
app/test/test_bitops.c +1 -1
@@ -438,4 +438,4 @@ test_bitops(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (bitops_autotest, true, true, test_bitops); +REGISTER_FAST_TEST (bitops_autotest,NOHUGE_OK ,ASAN_OK , test_bitops);
app/test/test_bitratestats.c +1 -1
@@ -249,4 +249,4 @@ test_bitratestats(void) {return unit_test_suite_runner (&bitratestats_testsuite); } -REGISTER_FAST_TEST (bitratestats_autotest, true, true, test_bitratestats); +REGISTER_FAST_TEST (bitratestats_autotest,NOHUGE_OK ,ASAN_OK , test_bitratestats);
app/test/test_bitset.c +1 -1
@@ -909,4 +909,4 @@ test_bitset(void)return unit_test_suite_runner (&bitset_tests); } -REGISTER_FAST_TEST (bitset_autotest, true, true, test_bitset); +REGISTER_FAST_TEST (bitset_autotest,NOHUGE_OK ,ASAN_OK , test_bitset);
app/test/test_bpf.c +3 -3
@@ -3278,7 +3278,7 @@ test_bpf(void)#endif /* !RTE_LIB_BPF */ -REGISTER_FAST_TEST (bpf_autotest, true, true, test_bpf); +REGISTER_FAST_TEST (bpf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf);#ifdef TEST_BPF_ELF_LOAD
@@ -3751,7 +3751,7 @@ test_bpf_elf(void)#endif /* !TEST_BPF_ELF_LOAD */ -REGISTER_FAST_TEST (bpf_elf_autotest, true, true, test_bpf_elf); +REGISTER_FAST_TEST (bpf_elf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_elf);#ifndef RTE_HAS_LIBPCAP
@@ -3969,4 +3969,4 @@ test_bpf_convert(void)#endif /* RTE_HAS_LIBPCAP */ -REGISTER_FAST_TEST (bpf_convert_autotest, true, true, test_bpf_convert); +REGISTER_FAST_TEST (bpf_convert_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_convert);
app/test/test_byteorder.c +1 -1
@@ -63,4 +63,4 @@ test_byteorder(void)return 0 ; } -REGISTER_FAST_TEST (byteorder_autotest, true, true, test_byteorder); +REGISTER_FAST_TEST (byteorder_autotest,NOHUGE_OK ,ASAN_OK , test_byteorder);
app/test/test_cfgfile.c +1 -1
@@ -399,4 +399,4 @@ test_cfgfile(void)return unit_test_suite_runner (&test_cfgfile_suite); } -REGISTER_FAST_TEST (cfgfile_autotest, true, true, test_cfgfile); +REGISTER_FAST_TEST (cfgfile_autotest,NOHUGE_OK ,ASAN_OK , test_cfgfile);
app/test/test_cksum.c +1 -1
@@ -267,4 +267,4 @@ test_cksum(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (cksum_autotest, true, true, test_cksum); +REGISTER_FAST_TEST (cksum_autotest,NOHUGE_OK ,ASAN_OK , test_cksum);
app/test/test_cmdline.c +1 -1
@@ -60,4 +60,4 @@ test_cmdline(void)return 0 ; } -REGISTER_FAST_TEST (cmdline_autotest, true, true, test_cmdline); +REGISTER_FAST_TEST (cmdline_autotest,NOHUGE_OK ,ASAN_OK , test_cmdline);
app/test/test_common.c +1 -1
@@ -354,4 +354,4 @@ test_common(void)return ret; } -REGISTER_FAST_TEST (common_autotest, true, true, test_common); +REGISTER_FAST_TEST (common_autotest,NOHUGE_OK ,ASAN_OK , test_common);
app/test/test_compressdev.c +1 -1
@@ -4255,4 +4255,4 @@ test_compressdev(void)return unit_test_suite_runner (&compressdev_testsuite); } -REGISTER_FAST_TEST (compressdev_autotest, false, true, test_compressdev); +REGISTER_FAST_TEST (compressdev_autotest,NOHUGE_SKIP ,ASAN_OK , test_compressdev);
app/test/test_cpuflags.c +1 -1
@@ -327,4 +327,4 @@ test_cpuflags(void)return 0 ; } -REGISTER_FAST_TEST (cpuflags_autotest, true, true, test_cpuflags); +REGISTER_FAST_TEST (cpuflags_autotest,NOHUGE_OK ,ASAN_OK , test_cpuflags);
app/test/test_crc.c +1 -1
@@ -140,4 +140,4 @@ crc_autotest(void)return ret; } -REGISTER_FAST_TEST (crc_autotest, true, true, crc_autotest); +REGISTER_FAST_TEST (crc_autotest,NOHUGE_OK ,ASAN_OK , crc_autotest);
app/test/test_cycles.c +1 -1
@@ -53,4 +53,4 @@ test_user_delay_us(void)return 0 ; } -REGISTER_FAST_TEST (user_delay_us, true, true, test_user_delay_us); +REGISTER_FAST_TEST (user_delay_us,NOHUGE_OK ,ASAN_OK , test_user_delay_us);
app/test/test_debug.c +1 -1
@@ -183,4 +183,4 @@ test_debug(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (debug_autotest, true, true, test_debug); +REGISTER_FAST_TEST (debug_autotest,NOHUGE_OK ,ASAN_OK , test_debug);
app/test/test_devargs.c +1 -1
@@ -320,4 +320,4 @@ test_devargs(void)return 0 ; } -REGISTER_FAST_TEST (devargs_autotest, true, true, test_devargs); +REGISTER_FAST_TEST (devargs_autotest,NOHUGE_OK ,ASAN_OK , test_devargs);
app/test/test_dispatcher.c +1 -1
@@ -1053,4 +1053,4 @@ test_dispatcher(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (dispatcher_autotest, false, true, test_dispatcher); +REGISTER_FAST_TEST (dispatcher_autotest,NOHUGE_SKIP ,ASAN_OK , test_dispatcher);
app/test/test_distributor.c +1 -1
@@ -953,4 +953,4 @@ test_distributor(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (distributor_autotest, false, true, test_distributor); +REGISTER_FAST_TEST (distributor_autotest,NOHUGE_SKIP ,ASAN_OK , test_distributor);
app/test/test_eal_flags.c +12 -12
@@ -1692,15 +1692,15 @@ test_memory_flags(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_flags_c_opt_autotest, false, false, test_missing_c_flag); -REGISTER_FAST_TEST (eal_flags_main_opt_autotest, false, false, test_main_lcore_flag); -REGISTER_FAST_TEST (eal_flags_n_opt_autotest, false, false, test_invalid_n_flag); -REGISTER_FAST_TEST (eal_flags_hpet_autotest, false, false, test_no_hpet_flag); -REGISTER_FAST_TEST (eal_flags_no_huge_autotest, false, false, test_no_huge_flag); -REGISTER_FAST_TEST (eal_flags_a_opt_autotest, false, false, test_allow_flag); -REGISTER_FAST_TEST (eal_flags_b_opt_autotest, false, false, test_invalid_b_flag); -REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag); -REGISTER_FAST_TEST (eal_flags_r_opt_autotest, false, false, test_invalid_r_flag); -REGISTER_FAST_TEST (eal_flags_mem_autotest, false, false, test_memory_flags); -REGISTER_FAST_TEST (eal_flags_file_prefix_autotest, false, false, test_file_prefix); -REGISTER_FAST_TEST (eal_flags_misc_autotest, false, false, test_misc_flags); +REGISTER_FAST_TEST (eal_flags_c_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_missing_c_flag); +REGISTER_FAST_TEST (eal_flags_main_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_main_lcore_flag); +REGISTER_FAST_TEST (eal_flags_n_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_n_flag); +REGISTER_FAST_TEST (eal_flags_hpet_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_hpet_flag); +REGISTER_FAST_TEST (eal_flags_no_huge_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_huge_flag); +REGISTER_FAST_TEST (eal_flags_a_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_allow_flag); +REGISTER_FAST_TEST (eal_flags_b_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_b_flag); +REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_vdev_flag); +REGISTER_FAST_TEST (eal_flags_r_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_r_flag); +REGISTER_FAST_TEST (eal_flags_mem_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_memory_flags); +REGISTER_FAST_TEST (eal_flags_file_prefix_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_file_prefix); +REGISTER_FAST_TEST (eal_flags_misc_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_misc_flags);
app/test/test_eal_fs.c +1 -1
@@ -185,4 +185,4 @@ test_eal_fs(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_fs_autotest, true, true, test_eal_fs); +REGISTER_FAST_TEST (eal_fs_autotest,NOHUGE_OK ,ASAN_OK , test_eal_fs);
app/test/test_errno.c +1 -1
@@ -94,4 +94,4 @@ test_errno(void)return 0 ; } -REGISTER_FAST_TEST (errno_autotest, true, true, test_errno); +REGISTER_FAST_TEST (errno_autotest,NOHUGE_OK ,ASAN_OK , test_errno);
app/test/test_ethdev_link.c +1 -1
@@ -172,4 +172,4 @@ test_link_status(void)return unit_test_suite_runner (&link_status_testsuite); } -REGISTER_FAST_TEST (ethdev_link_status, true, true, test_link_status); +REGISTER_FAST_TEST (ethdev_link_status,NOHUGE_OK ,ASAN_OK , test_link_status);
app/test/test_event_eth_tx_adapter.c +1 -1
@@ -1010,4 +1010,4 @@ test_event_eth_tx_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_eth_tx_adapter_autotest, false, true, test_event_eth_tx_adapter_common); +REGISTER_FAST_TEST (event_eth_tx_adapter_autotest,NOHUGE_SKIP ,ASAN_OK , test_event_eth_tx_adapter_common);
app/test/test_event_ring.c +1 -1
@@ -256,4 +256,4 @@ test_event_ring(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_ring_autotest, true, true, test_event_ring); +REGISTER_FAST_TEST (event_ring_autotest,NOHUGE_OK ,ASAN_OK , test_event_ring);
app/test/test_event_vector_adapter.c +1 -1
@@ -709,5 +709,5 @@ test_event_vector_adapter(void)#endif /* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(event_vector_adapter_autotest, true, true, test_event_vector_adapter); +* REGISTER_FAST_TEST(event_vector_adapter_autotest, NOHUGE_OK, ASAN_OK, test_event_vector_adapter); */
app/test/test_eventdev.c +2 -2
@@ -1529,10 +1529,10 @@ test_eventdev_selftest_cn20k(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eventdev_common_autotest, true, true, test_eventdev_common); +REGISTER_FAST_TEST (eventdev_common_autotest,NOHUGE_OK ,ASAN_OK , test_eventdev_common);#ifndef RTE_EXEC_ENV_WINDOWS -REGISTER_FAST_TEST (eventdev_selftest_sw, true, true, test_eventdev_selftest_sw); +REGISTER_FAST_TEST (eventdev_selftest_sw,NOHUGE_OK ,ASAN_OK , test_eventdev_selftest_sw);REGISTER_DRIVER_TEST (eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);REGISTER_DRIVER_TEST (eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);REGISTER_DRIVER_TEST (eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
app/test/test_fbarray.c +1 -1
@@ -933,4 +933,4 @@ test_fbarray(void)return unit_test_suite_runner (&fbarray_test_suite); } -REGISTER_FAST_TEST (fbarray_autotest, true, true, test_fbarray); +REGISTER_FAST_TEST (fbarray_autotest,NOHUGE_OK ,ASAN_OK , test_fbarray);
app/test/test_fib.c +1 -1
@@ -629,5 +629,5 @@ test_slow_fib(void)return unit_test_suite_runner (&fib_slow_tests); } -REGISTER_FAST_TEST (fib_autotest, true, true, test_fib); +REGISTER_FAST_TEST (fib_autotest,NOHUGE_OK ,ASAN_OK , test_fib);REGISTER_PERF_TEST (fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +1 -1
@@ -640,5 +640,5 @@ test_slow_fib6(void)return unit_test_suite_runner (&fib6_slow_tests); } -REGISTER_FAST_TEST (fib6_autotest, true, true, test_fib6); +REGISTER_FAST_TEST (fib6_autotest,NOHUGE_OK ,ASAN_OK , test_fib6);REGISTER_PERF_TEST (fib6_slow_autotest, test_slow_fib6);
app/test/test_func_reentrancy.c +1 -1
@@ -511,4 +511,4 @@ test_func_reentrancy(void)return 0 ; } -REGISTER_FAST_TEST (func_reentrancy_autotest, false, true, test_func_reentrancy); +REGISTER_FAST_TEST (func_reentrancy_autotest,NOHUGE_SKIP ,ASAN_OK , test_func_reentrancy);
app/test/test_graph.c +2 -2
@@ -1150,7 +1150,7 @@ graph_autotest_fn(void)return unit_test_suite_runner (&graph_testsuite); } -REGISTER_FAST_TEST (graph_autotest, true, true, graph_autotest_fn); +REGISTER_FAST_TEST (graph_autotest,NOHUGE_OK ,ASAN_OK , graph_autotest_fn);static int test_node_list_dump (void )
@@ -1162,4 +1162,4 @@ test_node_list_dump(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (node_list_dump, true, true, test_node_list_dump); +REGISTER_FAST_TEST (node_list_dump,NOHUGE_OK ,ASAN_OK , test_node_list_dump);
app/test/test_graph_feature_arc.c +1 -1
@@ -1368,6 +1368,6 @@ graph_feature_arc_autotest_fn(void) return unit_test_suite_runner(&graph_feature_arc_testsuite); } -REGISTER_FAST_TEST (graph_feature_arc_autotest, true, true, graph_feature_arc_autotest_fn); +REGISTER_FAST_TEST (graph_feature_arc_autotest,NOHUGE_OK ,ASAN_OK , graph_feature_arc_autotest_fn);#endif /* !RTE_EXEC_ENV_WINDOWS */
app/test/test_hash.c +1 -1
@@ -2405,4 +2405,4 @@ test_hash(void)return 0 ; } -REGISTER_FAST_TEST (hash_autotest, true, true, test_hash); +REGISTER_FAST_TEST (hash_autotest,NOHUGE_OK ,ASAN_OK , test_hash);
app/test/test_hash_readwrite.c +1 -1
@@ -775,5 +775,5 @@ test_hash_rw_func_main(void)return 0 ; } -REGISTER_FAST_TEST (hash_readwrite_func_autotest, false, true, test_hash_rw_func_main); +REGISTER_FAST_TEST (hash_readwrite_func_autotest,NOHUGE_SKIP ,ASAN_OK , test_hash_rw_func_main);REGISTER_PERF_TEST (hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_interrupts.c +1 -1
@@ -594,4 +594,4 @@ test_interrupt(void)return ret; } -REGISTER_FAST_TEST (interrupt_autotest, true, true, test_interrupt); +REGISTER_FAST_TEST (interrupt_autotest,NOHUGE_OK ,ASAN_OK , test_interrupt);
app/test/test_ipfrag.c +1 -1
@@ -505,4 +505,4 @@ test_ipfrag(void) } -REGISTER_FAST_TEST (ipfrag_autotest, false, true, test_ipfrag); +REGISTER_FAST_TEST (ipfrag_autotest,NOHUGE_SKIP ,ASAN_OK , test_ipfrag);
app/test/test_ipsec.c +1 -1
@@ -2617,4 +2617,4 @@ test_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (ipsec_autotest, true, true, test_ipsec); +REGISTER_FAST_TEST (ipsec_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec);
app/test/test_kvargs.c +1 -1
@@ -364,4 +364,4 @@ test_kvargs(void)return unit_test_suite_runner (&kvargs_test_suite); } -REGISTER_FAST_TEST (kvargs_autotest, true, true, test_kvargs); +REGISTER_FAST_TEST (kvargs_autotest,NOHUGE_OK ,ASAN_OK , test_kvargs);
app/test/test_latencystats.c +1 -1
@@ -246,4 +246,4 @@ static int test_latencystats(void)return unit_test_suite_runner (&latencystats_testsuite); } -REGISTER_FAST_TEST (latencystats_autotest, true, true, test_latencystats); +REGISTER_FAST_TEST (latencystats_autotest,NOHUGE_OK ,ASAN_OK , test_latencystats);
app/test/test_lcore_var.c +1 -1
@@ -411,4 +411,4 @@ static int test_lcore_var(void)return unit_test_suite_runner (&lcore_var_testsuite); } -REGISTER_FAST_TEST (lcore_var_autotest, true, false, test_lcore_var); +REGISTER_FAST_TEST (lcore_var_autotest,NOHUGE_OK ,ASAN_SKIP , test_lcore_var);
app/test/test_lcores.c +1 -1
@@ -422,4 +422,4 @@ test_lcores(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (lcores_autotest, true, true, test_lcores); +REGISTER_FAST_TEST (lcores_autotest,NOHUGE_OK ,ASAN_OK , test_lcores);
app/test/test_logs.c +1 -1
@@ -158,4 +158,4 @@ test_logs(void)return 0 ; } -REGISTER_FAST_TEST (logs_autotest, true, true, test_logs); +REGISTER_FAST_TEST (logs_autotest,NOHUGE_OK ,ASAN_OK , test_logs);
app/test/test_lpm.c +1 -1
@@ -1584,4 +1584,4 @@ test_lpm(void)return global_status; } -REGISTER_FAST_TEST (lpm_autotest, true, true, test_lpm); +REGISTER_FAST_TEST (lpm_autotest,NOHUGE_OK ,ASAN_OK , test_lpm);
app/test/test_lpm6.c +1 -1
@@ -1767,4 +1767,4 @@ test_lpm6(void)return global_status; } -REGISTER_FAST_TEST (lpm6_autotest, true, true, test_lpm6); +REGISTER_FAST_TEST (lpm6_autotest,NOHUGE_OK ,ASAN_OK , test_lpm6);
app/test/test_malloc.c +1 -1
@@ -1166,4 +1166,4 @@ test_malloc(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (malloc_autotest, false, true, test_malloc); +REGISTER_FAST_TEST (malloc_autotest,NOHUGE_SKIP ,ASAN_OK , test_malloc);
app/test/test_mbuf.c +1 -1
@@ -2953,4 +2953,4 @@ test_mbuf(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (mbuf_autotest, false, true, test_mbuf); +REGISTER_FAST_TEST (mbuf_autotest,NOHUGE_SKIP ,ASAN_OK , test_mbuf);
app/test/test_mcslock.c +1 -1
@@ -241,4 +241,4 @@ test_mcslock(void)return ret; } -REGISTER_FAST_TEST (mcslock_autotest, false, true, test_mcslock); +REGISTER_FAST_TEST (mcslock_autotest,NOHUGE_SKIP ,ASAN_OK , test_mcslock);
app/test/test_member.c +1 -1
@@ -996,4 +996,4 @@ test_member(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (member_autotest, true, true, test_member); +REGISTER_FAST_TEST (member_autotest,NOHUGE_OK ,ASAN_OK , test_member);
app/test/test_memcpy.c +1 -1
@@ -129,4 +129,4 @@ test_memcpy(void)return 0 ; } -REGISTER_FAST_TEST (memcpy_autotest, true, true, test_memcpy); +REGISTER_FAST_TEST (memcpy_autotest,NOHUGE_OK ,ASAN_OK , test_memcpy);
app/test/test_memory.c +1 -1
@@ -110,4 +110,4 @@ test_memory(void)return 0 ; } -REGISTER_FAST_TEST (memory_autotest, false, true, test_memory); +REGISTER_FAST_TEST (memory_autotest,NOHUGE_SKIP ,ASAN_OK , test_memory);
app/test/test_mempool.c +1 -1
@@ -1122,4 +1122,4 @@ test_mempool(void)return ret; } -REGISTER_FAST_TEST (mempool_autotest, false, true, test_mempool); +REGISTER_FAST_TEST (mempool_autotest,NOHUGE_SKIP ,ASAN_OK , test_mempool);
app/test/test_memzone.c +1 -1
@@ -1162,4 +1162,4 @@ test_memzone(void)return 0 ; } -REGISTER_FAST_TEST (memzone_autotest, false, true, test_memzone); +REGISTER_FAST_TEST (memzone_autotest,NOHUGE_SKIP ,ASAN_OK , test_memzone);
app/test/test_meter.c +1 -1
@@ -713,4 +713,4 @@ test_meter(void) } -REGISTER_FAST_TEST (meter_autotest, true, true, test_meter); +REGISTER_FAST_TEST (meter_autotest,NOHUGE_OK ,ASAN_OK , test_meter);
app/test/test_metrics.c +1 -1
@@ -326,4 +326,4 @@ test_metrics(void)return unit_test_suite_runner (&metrics_testsuite); } -REGISTER_FAST_TEST (metrics_autotest, true, true, test_metrics); +REGISTER_FAST_TEST (metrics_autotest,NOHUGE_OK ,ASAN_OK , test_metrics);
app/test/test_mp_secondary.c +1 -1
@@ -222,4 +222,4 @@ test_mp_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (multiprocess_autotest, false, false, test_mp_secondary); +REGISTER_FAST_TEST (multiprocess_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_mp_secondary);
app/test/test_net_ether.c +1 -1
@@ -162,4 +162,4 @@ test_net_ether(void)return 0 ; } -REGISTER_FAST_TEST (net_ether_autotest, true, true, test_net_ether); +REGISTER_FAST_TEST (net_ether_autotest,NOHUGE_OK ,ASAN_OK , test_net_ether);
app/test/test_net_ip6.c +1 -1
@@ -218,4 +218,4 @@ test_net_ipv6(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (net_ipv6_autotest, true, true, test_net_ipv6); +REGISTER_FAST_TEST (net_ipv6_autotest,NOHUGE_OK ,ASAN_OK , test_net_ipv6);
app/test/test_pcapng.c +1 -1
@@ -464,4 +464,4 @@ test_pcapng(void)return unit_test_suite_runner (&test_pcapng_suite); } -REGISTER_FAST_TEST (pcapng_autotest, true, true, test_pcapng); +REGISTER_FAST_TEST (pcapng_autotest,NOHUGE_OK ,ASAN_OK , test_pcapng);
app/test/test_pdcp.c +1 -1
@@ -2388,4 +2388,4 @@ test_pdcp(void)return ret; } -REGISTER_FAST_TEST (pdcp_autotest, false, true, test_pdcp); +REGISTER_FAST_TEST (pdcp_autotest,NOHUGE_SKIP ,ASAN_OK , test_pdcp);
app/test/test_pdump.c +1 -1
@@ -218,4 +218,4 @@ test_pdump(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (pdump_autotest, true, false, test_pdump); +REGISTER_FAST_TEST (pdump_autotest,NOHUGE_OK ,ASAN_SKIP , test_pdump);
app/test/test_per_lcore.c +1 -1
@@ -118,4 +118,4 @@ test_per_lcore(void)return 0 ; } -REGISTER_FAST_TEST (per_lcore_autotest, true, true, test_per_lcore); +REGISTER_FAST_TEST (per_lcore_autotest,NOHUGE_OK ,ASAN_OK , test_per_lcore);
app/test/test_pflock.c +1 -1
@@ -194,4 +194,4 @@ test_pflock(void)return 0 ; } -REGISTER_FAST_TEST (pflock_autotest, true, true, test_pflock); +REGISTER_FAST_TEST (pflock_autotest,NOHUGE_OK ,ASAN_OK , test_pflock);
app/test/test_pie.c +1 -1
@@ -1082,6 +1082,6 @@ test_pie_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (pie_autotest, true, true, test_pie); +REGISTER_FAST_TEST (pie_autotest,NOHUGE_OK ,ASAN_OK , test_pie);REGISTER_PERF_TEST (pie_perf, test_pie_perf);REGISTER_PERF_TEST (pie_all, test_pie_all);
app/test/test_pmd_ring.c +1 -1
@@ -593,4 +593,4 @@ test_pmd_ring(void)return unit_test_suite_runner (&test_pmd_ring_suite); } -REGISTER_FAST_TEST (ring_pmd_autotest, true, true, test_pmd_ring); +REGISTER_FAST_TEST (ring_pmd_autotest,NOHUGE_OK ,ASAN_OK , test_pmd_ring);
app/test/test_pmu.c +1 -1
@@ -53,5 +53,5 @@ test_pmu(void) }/* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(pmu_autotest, true, true, test_pmu); +* REGISTER_FAST_TEST(pmu_autotest, NOHUGE_OK, ASAN_OK, test_pmu); */
app/test/test_power.c +1 -1
@@ -78,4 +78,4 @@ test_power(void) }#endif -REGISTER_FAST_TEST (power_autotest, true, true, test_power); +REGISTER_FAST_TEST (power_autotest,NOHUGE_OK ,ASAN_OK , test_power);
app/test/test_power_cpufreq.c +1 -1
@@ -678,5 +678,5 @@ test_power_caps(void)#endif -REGISTER_FAST_TEST (power_cpufreq_autotest, false, true, test_power_cpufreq); +REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq);REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
@@ -303,4 +303,4 @@ test_power_intel_uncore(void) }#endif -REGISTER_FAST_TEST (power_intel_uncore_autotest, true, true, test_power_intel_uncore); +REGISTER_FAST_TEST (power_intel_uncore_autotest,NOHUGE_OK ,ASAN_OK , test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
@@ -263,4 +263,4 @@ test_power_kvm_vm(void) }#endif -REGISTER_FAST_TEST (power_kvm_vm_autotest, false, true, test_power_kvm_vm); +REGISTER_FAST_TEST (power_kvm_vm_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
@@ -35,4 +35,4 @@ test_prefetch(void)return 0 ; } -REGISTER_FAST_TEST (prefetch_autotest, true, true, test_prefetch); +REGISTER_FAST_TEST (prefetch_autotest,NOHUGE_OK ,ASAN_OK , test_prefetch);
app/test/test_ptr_compress.c +1 -1
@@ -190,4 +190,4 @@ test_ptr_compress(void)return 0 ; } -REGISTER_FAST_TEST (ptr_compress_autotest, true, true, test_ptr_compress); +REGISTER_FAST_TEST (ptr_compress_autotest,NOHUGE_OK ,ASAN_OK , test_ptr_compress);
app/test/test_rawdev.c +1 -1
@@ -74,4 +74,4 @@ test_rawdev_selftests(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (rawdev_autotest, true, true, test_rawdev_selftests); +REGISTER_FAST_TEST (rawdev_autotest,NOHUGE_OK ,ASAN_OK , test_rawdev_selftests);
app/test/test_rcu_qsbr.c +1 -1
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)return -1 ; } -REGISTER_FAST_TEST (rcu_qsbr_autotest, true, true, test_rcu_qsbr_main); +REGISTER_FAST_TEST (rcu_qsbr_autotest,NOHUGE_OK ,ASAN_OK , test_rcu_qsbr_main);
app/test/test_reorder.c +1 -1
@@ -552,4 +552,4 @@ test_reorder(void) } -REGISTER_FAST_TEST (reorder_autotest, true, true, test_reorder); +REGISTER_FAST_TEST (reorder_autotest,NOHUGE_OK ,ASAN_OK , test_reorder);
app/test/test_rib.c +1 -1
@@ -363,5 +363,5 @@ test_slow_rib(void)return unit_test_suite_runner (&rib_slow_tests); } -REGISTER_FAST_TEST (rib_autotest, true, true, test_rib); +REGISTER_FAST_TEST (rib_autotest,NOHUGE_OK ,ASAN_OK , test_rib);REGISTER_PERF_TEST (rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +1 -1
@@ -362,5 +362,5 @@ test_slow_rib6(void)return unit_test_suite_runner (&rib6_slow_tests); } -REGISTER_FAST_TEST (rib6_autotest, true, true, test_rib6); +REGISTER_FAST_TEST (rib6_autotest,NOHUGE_OK ,ASAN_OK , test_rib6);REGISTER_PERF_TEST (rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
@@ -1248,4 +1248,4 @@ test_ring(void)return -1 ; } -REGISTER_FAST_TEST (ring_autotest, true, true, test_ring); +REGISTER_FAST_TEST (ring_autotest,NOHUGE_OK ,ASAN_OK , test_ring);
app/test/test_rwlock.c +4 -4
@@ -507,7 +507,7 @@ try_rwlock_test_rde_wro(void)return process_try_lcore_stats (); } -REGISTER_FAST_TEST (rwlock_test1_autotest, true, true, rwlock_test1); -REGISTER_FAST_TEST (rwlock_rda_autotest, true, true, try_rwlock_test_rda); -REGISTER_FAST_TEST (rwlock_rds_wrm_autotest, true, true, try_rwlock_test_rds_wrm); -REGISTER_FAST_TEST (rwlock_rde_wro_autotest, true, true, try_rwlock_test_rde_wro); +REGISTER_FAST_TEST (rwlock_test1_autotest,NOHUGE_OK ,ASAN_OK , rwlock_test1); +REGISTER_FAST_TEST (rwlock_rda_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rda); +REGISTER_FAST_TEST (rwlock_rds_wrm_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rds_wrm); +REGISTER_FAST_TEST (rwlock_rde_wro_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rde_wro);
app/test/test_sched.c +1 -1
@@ -215,4 +215,4 @@ test_sched(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (sched_autotest, true, true, test_sched); +REGISTER_FAST_TEST (sched_autotest,NOHUGE_OK ,ASAN_OK , test_sched);
app/test/test_security.c +1 -1
@@ -2314,4 +2314,4 @@ test_security(void)return unit_test_suite_runner (&security_testsuite); } -REGISTER_FAST_TEST (security_autotest, false, true, test_security); +REGISTER_FAST_TEST (security_autotest,NOHUGE_SKIP ,ASAN_OK , test_security);
app/test/test_seqlock.c +1 -1
@@ -187,4 +187,4 @@ test_seqlock(void)return rc; } -REGISTER_FAST_TEST (seqlock_autotest, true, true, test_seqlock); +REGISTER_FAST_TEST (seqlock_autotest,NOHUGE_OK ,ASAN_OK , test_seqlock);
app/test/test_service_cores.c +1 -1
@@ -1081,7 +1081,7 @@ test_service_common(void)return unit_test_suite_runner (&service_tests); } -REGISTER_FAST_TEST (service_autotest, true, true, test_service_common); +REGISTER_FAST_TEST (service_autotest,NOHUGE_OK ,ASAN_OK , test_service_common);static struct unit_test_suite service_perf_tests = { .suite_name ="service core performance test suite" ,
app/test/test_soring.c +1 -1
@@ -438,4 +438,4 @@ test_soring(void)return -1 ; } -REGISTER_FAST_TEST (soring_autotest, true, true, test_soring); +REGISTER_FAST_TEST (soring_autotest,NOHUGE_OK ,ASAN_OK , test_soring);
app/test/test_spinlock.c +1 -1
@@ -303,4 +303,4 @@ test_spinlock(void)return ret; } -REGISTER_FAST_TEST (spinlock_autotest, true, true, test_spinlock); +REGISTER_FAST_TEST (spinlock_autotest,NOHUGE_OK ,ASAN_OK , test_spinlock);
app/test/test_stack.c +2 -2
@@ -379,5 +379,5 @@ test_lf_stack(void)#endif } -REGISTER_FAST_TEST (stack_autotest, false, true, test_stack); -REGISTER_FAST_TEST (stack_lf_autotest, false, true, test_lf_stack); +REGISTER_FAST_TEST (stack_autotest,NOHUGE_SKIP ,ASAN_OK , test_stack); +REGISTER_FAST_TEST (stack_lf_autotest,NOHUGE_SKIP ,ASAN_OK , test_lf_stack);
app/test/test_string_fns.c +1 -1
@@ -328,4 +328,4 @@ test_string_fns(void)return 0 ; } -REGISTER_FAST_TEST (string_autotest, true, true, test_string_fns); +REGISTER_FAST_TEST (string_autotest,NOHUGE_OK ,ASAN_OK , test_string_fns);
app/test/test_table.c +1 -1
@@ -206,4 +206,4 @@ test_table(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (table_autotest, true, true, test_table); +REGISTER_FAST_TEST (table_autotest,NOHUGE_OK ,ASAN_OK , test_table);
app/test/test_tailq.c +1 -1
@@ -125,4 +125,4 @@ test_tailq(void)return ret; } -REGISTER_FAST_TEST (tailq_autotest, true, true, test_tailq); +REGISTER_FAST_TEST (tailq_autotest,NOHUGE_OK ,ASAN_OK , test_tailq);
app/test/test_telemetry_data.c +1 -1
@@ -615,4 +615,4 @@ telemetry_data_autotest(void) }#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (telemetry_data_autotest, true, true, telemetry_data_autotest); +REGISTER_FAST_TEST (telemetry_data_autotest,NOHUGE_OK ,ASAN_OK , telemetry_data_autotest);
app/test/test_telemetry_json.c +1 -1
@@ -213,4 +213,4 @@ test_telemetry_json(void)return 0 ; } -REGISTER_FAST_TEST (telemetry_json_autotest, true, true, test_telemetry_json); +REGISTER_FAST_TEST (telemetry_json_autotest,NOHUGE_OK ,ASAN_OK , test_telemetry_json);
app/test/test_thash.c +1 -1
@@ -1060,4 +1060,4 @@ test_thash(void)return unit_test_suite_runner (&thash_tests); } -REGISTER_FAST_TEST (thash_autotest, true, true, test_thash); +REGISTER_FAST_TEST (thash_autotest,NOHUGE_OK ,ASAN_OK , test_thash);
app/test/test_threads.c +1 -1
@@ -280,4 +280,4 @@ test_threads(void)return unit_test_suite_runner (&threads_test_suite); } -REGISTER_FAST_TEST (threads_autotest, true, true, test_threads); +REGISTER_FAST_TEST (threads_autotest,NOHUGE_OK ,ASAN_OK , test_threads);
app/test/test_ticketlock.c +1 -1
@@ -315,4 +315,4 @@ test_ticketlock(void)return ret; } -REGISTER_FAST_TEST (ticketlock_autotest, true, true, test_ticketlock); +REGISTER_FAST_TEST (ticketlock_autotest,NOHUGE_OK ,ASAN_OK , test_ticketlock);
app/test/test_timer.c +1 -1
@@ -601,4 +601,4 @@ test_timer(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (timer_autotest, false, true, test_timer); +REGISTER_FAST_TEST (timer_autotest,NOHUGE_SKIP ,ASAN_OK , test_timer);
app/test/test_trace.c +1 -1
@@ -254,4 +254,4 @@ test_trace(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (trace_autotest, true, true, test_trace); +REGISTER_FAST_TEST (trace_autotest,NOHUGE_OK ,ASAN_OK , test_trace);
app/test/test_vdev.c +1 -1
@@ -166,4 +166,4 @@ test_vdev(void)return 0 ; } -REGISTER_FAST_TEST (vdev_autotest, true, true, test_vdev); +REGISTER_FAST_TEST (vdev_autotest,NOHUGE_OK ,ASAN_OK , test_vdev);
app/test/test_version.c +1 -1
@@ -25,4 +25,4 @@ test_version(void)return 0 ; } -REGISTER_FAST_TEST (version_autotest, true, true, test_version); +REGISTER_FAST_TEST (version_autotest,NOHUGE_OK ,ASAN_OK , test_version);
buildtools/get-test-suites.py +1 -1
@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}" for fname in input_list: with open(fname, "r", encoding="utf-8") as f:
doc/guides/contributing/unit_test.rst +6 -4
@@ -188,9 +188,11 @@ There are two important functions for interacting with the test harness: The test is automatically added to the Meson test suite `<MESON_SUITE>` by this macro. Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``. **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different, - in that it takes two additional parameters, - specifying whether the test can be run using ``--no-huge``, - and whether the test can be run using Address Sanitization (ASAN) + in that it takes two additional parameters before the function name: + the hugepage requirement (``NOHUGE_OK`` if the test can run without hugepages, + or ``NOHUGE_SKIP`` if hugepages are required), + and Address Sanitizer compatibility (``ASAN_OK`` if the test can run with ASan enabled, + or ``ASAN_SKIP`` if it cannot). ``unit_test_suite_runner(struct unit_test_suite *)`` Returns a runner for a full test suite object,
@@ -318,7 +320,7 @@ of the unit test suite structure, for example: return ret; } - REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests); + REGISTER_FAST_TEST(example_autotest, NOHUGE_OK, ASAN_OK, example_tests); Designing a test
Signature · 1 line
2.51.0
RE: [PATCH v2 01/10] app/test: make parameters clearer when adding fast tests
Apart from one cosmetic issue in a comment,
Quoted 15 lines
app/test/suites/meson.build +1
-0@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge. Note, the extraction script runs tolower()buildtools/get-test-suites.py +0
-0
buildtools/get-test-suites.py def get_fast_test_params(test_name, ln): · line 21
Quoted 5 lines
buildtools/get-test-suites.py +1
-1@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}"
Is the Note above no longer relevant?
Quoted 23 lines
buildtools/get-test-suites.py +0
-0for fname in input_list: with open(fname, "r", encoding="utf-8") as f:doc/guides/contributing/unit_test.rst +5
-3@@ -188,9 +188,11 @@ There are two important functions for interacting with the test harness: The test is automatically added to the Meson test suite `<MESON_SUITE>` by this macro. Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``. **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different, - in that it takes two additional parameters, - specifying whether the test can be run using ``--no-huge``, - and whether the test can be run using Address Sanitization (ASAN) + in that it takes two additional parameters before the function name: + the hugepage requirement (``NOHUGE_OK`` if the test can run without hugepages, + or ``NOHUGE_SKIP`` if hugepages are required), + and Address Sanitizer compatibility (``ASAN_OK`` if the test can run with ASan enabled, + or ``ASAN_SKIP`` if it cannot). ``unit_test_suite_runner(struct unit_test_suite *)`` Returns a runner for a full test suite object,
doc/guides/contributing/unit_test.rst of the unit test suite structure, for example: · line 323
Quoted 5 lines
doc/guides/contributing/unit_test.rst +1
-1@@ -318,7 +320,7 @@ of the unit test suite structure, for example: return ret; } - REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests); + REGISTER_FAST_TEST(example_autotest, NOHUGE_OK, ASAN_OK, example_tests);
I support change of this example meaning to what should be the default.
Re: [PATCH v2 01/10] app/test: make parameters clearer when adding fast tests
Quoted 14 lines · Marat Khalili
Apart from one cosmetic issue in a comment,
Acked-by Marat Khalili <[email protected]>Quoted 9 lines
app/test/suites/meson.build +1
-0@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge. Note, the extraction script runs tolower()
Quoted 13 lines
buildtools/get-test-suites.py def get_fast_test_params(test_name, ln): · line 21
Quoted 10 lines
buildtools/get-test-suites.py +1
-1@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}"Is the Note above no longer relevant?
Ooops, yes, good catch.
PATCH v2 2/10 app/test: fix undefined behaviour in red autotest
In reply to Bruce RichardsonThe shift of a negative number (or very large positive) is undefined behaviour which causes errors when run with UBSan. Fix this by making the behaviour explicit for the edge case of n being zero in the calculation.
--- lib/sched/rte_red.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
lib/sched/rte_red.h +8 -1
@@ -172,8 +172,15 @@ __rte_red_calc_qempty_factor(uint8_t wq_log2, uint16_t m) f = (n >>6 ) &0xf ; n >>=10 ; -if (n <RTE_RED_SCALING ) +if (n <RTE_RED_SCALING ) { +/* When n == 0, no rounding or shifting needed. +* For n > 0, add 2^(n-1) for rounding before right shift. +* This avoids UB from (1 << -1) when n == 0. +*/ +if (n ==0 ) +return (uint16_t ) rte_red_pow2_frac_inv[f];return (uint16_t ) ((rte_red_pow2_frac_inv[f] + (1 << (n -1 ))) >> n); + }return 0 ; }
Signature · 1 line
2.51.0
RE: [PATCH v2 02/10] app/test: fix undefined behaviour in red autotest
Quoted 42 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday 4 December 2025 18:21
To: [email protected]
Cc: Bruce Richardson <[email protected]>; [email protected]
Subject: [PATCH v2 02/10] app/test: fix undefined behaviour in red autotestThe shift of a negative number (or very large positive) is undefined behaviour which causes errors when run with UBSan. Fix this by making the behaviour explicit for the edge case of n being zero in the calculation.
Fixes de3cfa2c9823 ("sched: initial import")Signed-off-by Bruce Richardson <[email protected]>--- lib/sched/rte_red.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)lib/sched/rte_red.h +8
-2@@ -172,8 +172,15 @@ __rte_red_calc_qempty_factor(uint8_t wq_log2, uint16_t m) f = (n >>6 ) &0xf ; n >>=10 ; -if (n <RTE_RED_SCALING ) +if (n <RTE_RED_SCALING ) { +/* When n == 0, no rounding or shifting needed. +* For n > 0, add 2^(n-1) for rounding before right shift. +* This avoids UB from (1 << -1) when n == 0. +*/ +if (n ==0 ) +return (uint16_t ) rte_red_pow2_frac_inv[f];return (uint16_t ) ((rte_red_pow2_frac_inv[f] + (1 << (n -1 ))) >> n); + }return 0 ; } --
Quoted 1 line
2.51.0
PATCH v2 3/10 app/test: reduce duration of secondary timer test
In reply to Bruce RichardsonReduce the timer duration and the primary wait duration in the secondary process timer autotest. This should help ensure it doesn't time out what run in a CI environment.
--- app/test/test_timer_secondary.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
app/test/test_timer_secondary.c +3 -3
@@ -162,7 +162,7 @@ test_timer_secondary(void) ret =timer_secondary_spawn_wait (*sec_lcorep);TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); -rte_delay_ms (2000 ); +rte_delay_ms (500 ); test_info->exit_flag =1 ;rte_eal_wait_lcore (*mgr_lcorep);
@@ -189,8 +189,8 @@ test_timer_secondary(void)rte_timer_init (tim); -/* generate timeouts between 10 and 160 ms */ - timeout_ms = ((rte_rand () &0xF ) +1 ) *10 ; +/* generate timeouts between 10 and 80 ms */ + timeout_ms = ((rte_rand () &0x7 ) +1 ) *10 ; ticks = timeout_ms *rte_get_timer_hz () /MSECPERSEC ; ret = rte_timer_alt_reset(test_info->timer_data_id,
Signature · 1 line
2.51.0
PATCH v2 4/10 app/test: fix timer loop hang on secondary process failure
In reply to Bruce RichardsonWhen the secondary process run from timer_secontary_autotest fails, the timer loop is never stopped so the whole process hangs until timeout. Fix this by setting the stop flag before checking for success or failure of the secondary process.
--- app/test/test_timer_secondary.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
app/test/test_timer_secondary.c +3 -2
@@ -160,11 +160,12 @@ test_timer_secondary(void)TEST_ASSERT_SUCCESS (ret,"Failed to launch timer manage loop" ); ret =timer_secondary_spawn_wait (*sec_lcorep); -TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); +/* must set exit flag even on error case, so check ret later */ rte_delay_ms (500 ); - test_info->exit_flag =1 ; + +TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" );rte_eal_wait_lcore (*mgr_lcorep);#ifdef RTE_LIBRTE_TIMER_DEBUG
Signature · 1 line
2.51.0
PATCH v2 5/10 eal: add internal APIs to query loaded driver paths
In reply to Bruce RichardsonAdd APIs for internal DPDK use to allow querying the paths of drivers loaded into the running instance.
--- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++++--- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 4 deletions(-)
lib/eal/common/eal_common_options.c +50 -4
@@ -263,6 +263,7 @@ struct shared_driver {char name[PATH_MAX ];void * lib_handle; +bool from_cmdline;/**< true if from -d flag, false if driver found in a directory */ };/* List of external loadable drivers */
@@ -533,7 +534,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) }static int -eal_plugin_add (const char *path) +eal_plugin_add (const char *path,bool from_cmdline) {struct shared_driver *solib;
@@ -544,6 +545,7 @@ eal_plugin_add(const char *path) }memset (solib,0 ,sizeof (*solib));strlcpy (solib->name, path,PATH_MAX ); + solib->from_cmdline = from_cmdline;TAILQ_INSERT_TAIL (&solib_list, solib, next);return 0 ;
@@ -595,7 +597,7 @@ eal_plugindir_init(const char *path)if (!(stat (sopath, &sb) ==0 &&S_ISREG (sb.st_mode)))continue ; -if (eal_plugin_add (sopath) ==-1 ) +if (eal_plugin_add (sopath, false) ==-1 )break ; }
@@ -727,7 +729,7 @@ eal_plugins_init(void) *default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 && S_ISDIR(sb.st_mode)) - eal_plugin_add(default_solib_dir); +eal_plugin_add (default_solib_dir, false); TAILQ_FOREACH(solib, &solib_list, next) {
@@ -751,6 +753,50 @@ eal_plugins_init(void) }#endif +RTE_EXPORT_SYMBOL (rte_eal_driver_path_next) +const char * +rte_eal_driver_path_next (const char *start,bool cmdline_only) +{ +struct shared_driver *solib; + +if (start ==NULL ) { + solib =TAILQ_FIRST (&solib_list); + }else { +/* Find the current entry based on the name string */ + TAILQ_FOREACH(solib, &solib_list, next) { +if (start == solib->name) { + solib =TAILQ_NEXT (solib, next); +break ; + } + } +if (solib ==NULL ) +return NULL ; + } + +/* Skip entries that were expanded from directories if cmdline_only is true */ +if (cmdline_only) { +while (solib !=NULL && !solib->from_cmdline) + solib =TAILQ_NEXT (solib, next); + } + +return solib ? solib->name :NULL ; +} + +RTE_EXPORT_SYMBOL (rte_eal_driver_path_count) +unsigned int +rte_eal_driver_path_count (bool cmdline_only) +{ +struct shared_driver *solib; +unsigned int count =0 ; + + TAILQ_FOREACH(solib, &solib_list, next) { +if (!cmdline_only || solib->from_cmdline) + count++; + } + +return count; +} +/* * Parse the coremask given as argument (hexadecimal string) and fill * the global configuration (core role and core count) with the parsed
@@ -1929,7 +1975,7 @@ eal_parse_args(void)return -1 ;/* driver loading options */ TAILQ_FOREACH(arg, &args.driver_path, next) -if (eal_plugin_add (arg->arg) <0 ) +if (eal_plugin_add (arg->arg, true) <0 )return -1 ;if (remap_lcores && args.remap_lcore_ids != (void *)1 ) {
lib/eal/include/rte_eal.h +52 -0
58 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v2 6/10 app/test: pass loaded driver info to secondary procs
In reply to Bruce RichardsonFor unit tests which run secondary processes, allow passing the driver paths used by the primary process to that secondary. This allows use of mempools in those secondary tests. Without this, any tests using mempools in secondary process will fail in shared builds.
--- app/test/process.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
app/test/process.h +27 -1
@@ -18,6 +18,7 @@#include <rte_string_fns.h> /* strlcpy */ #include <rte_devargs.h> +#include <rte_eal.h> #ifdef RTE_EXEC_ENV_FREEBSD #define self "curproc"
@@ -36,6 +37,7 @@ extern uint16_t flag_for_send_pkts;#endif #define PREFIX_ALLOW "--allow=" +#define PREFIX_DRIVER_PATH "--driver-path="static int add_parameter_allow (char **argv,int max_capacity)
@@ -63,6 +65,23 @@ add_parameter_allow(char **argv, int max_capacity)return count; } +static int +add_parameter_driver_path (char **argv,int max_capacity) +{ +const char *driver_path; +int count =0 ; + + RTE_EAL_DRIVER_PATH_FOREACH(driver_path, true) { +if (asprintf (&argv[count],PREFIX_DRIVER_PATH "%s" , driver_path) <0 ) +break ; + +if (++count == max_capacity) +break ; + } + +return count; +} +/* * launches a second copy of the test process using the given argv parameters, * which should include argv[0] as the process name. To identify in the
@@ -75,6 +94,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)int num =0 ;char **argv_cpy;int allow_num; +int driver_path_num;int argv_num;int i, status;char path[32 ];
@@ -90,7 +110,8 @@ process_dup(const char *const argv[], int numargs, const char *env_value)return -1 ; else if (pid == 0) { allow_num =rte_devargs_type_count (RTE_DEVTYPE_ALLOWED ); - argv_num = numargs + allow_num +1 ; + driver_path_num =rte_eal_driver_path_count (true); + argv_num = numargs + allow_num + driver_path_num +1 ; argv_cpy =calloc (argv_num,sizeof (char *));if (!argv_cpy)rte_panic ("Memory allocation failed\n" );
@@ -105,6 +126,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value) num =add_parameter_allow (&argv_cpy[i], allow_num); num += numargs; +if (driver_path_num >0 ) { +int added =add_parameter_driver_path (&argv_cpy[num], driver_path_num); + num += added; + } +#ifdef RTE_EXEC_ENV_LINUX {const char *procdir ="/proc/" self"/fd/" ;
Signature · 1 line
2.51.0
PATCH v2 7/10 app/test: skip power capabilities test if unsupported
In reply to Bruce RichardsonIf the power subsystem cannot be initialized e.g. due to not being root, skip the capabilities test, rather than failing it.
--- app/test/test_power_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_power_cpufreq.c +1 -1
@@ -661,7 +661,7 @@ test_power_caps(void)"correctly(APCI cpufreq) or operating in another valid " "Power management environment\n", TEST_POWER_LCORE_ID);rte_power_unset_env (); -return -1 ; +return TEST_SKIPPED ; } ret =rte_power_get_capabilities (TEST_POWER_LCORE_ID , &caps);
Signature · 1 line
2.51.0
PATCH v2 8/10 app/test: add some unattached tests to fast-test suite
In reply to Bruce RichardsonThere are quite a number of test cases defined which are not present in any test-suite. Meson warns about these on build, so reduce the warnings by adding external-mem, ipsec-sad, red, power-caps and secondary timer test cases to the fast-test suite.
--- app/test/test_external_mem.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_red.c | 2 +- app/test/test_timer_secondary.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
app/test/test_external_mem.c +1 -1
@@ -587,4 +587,4 @@ test_external_mem(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (external_mem_autotest, test_external_mem); +REGISTER_FAST_TEST (external_mem_autotest,NOHUGE_SKIP ,ASAN_OK , test_external_mem);
app/test/test_ipsec_sad.c +1 -1
@@ -899,4 +899,4 @@ test_ipsec_sad(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (ipsec_sad_autotest, test_ipsec_sad); +REGISTER_FAST_TEST (ipsec_sad_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec_sad);
app/test/test_power_cpufreq.c +1 -1
@@ -679,4 +679,4 @@ test_power_caps(void)#endif REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq); -REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps); +REGISTER_FAST_TEST (power_caps_autotest,NOHUGE_OK ,ASAN_OK , test_power_caps);
app/test/test_red.c +1 -1
@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
app/test/test_timer_secondary.c +1 -1
@@ -225,4 +225,4 @@ test_timer_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (timer_secondary_autotest, test_timer_secondary); +REGISTER_FAST_TEST (timer_secondary_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_timer_secondary);
Signature · 1 line
2.51.0
Re: [PATCH v2 08/10] app/test: add some unattached tests to fast-test suite
app/test/test_red.c test_red_all(void) · line 1877
Quoted 12 lines · Bruce Richardson
app/test/test_red.c +1
-1@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
The commit 50823f30f0c8 ("test: build using per-file dependencies") removed some context on why some tests were not part of a testsuite. -# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [
- 'alarm_autotest', # ee00af60170b ("test: remove strict timing
requirements some tests")
- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
-]
I would prefer we don't put an unreliable test in fast-tests.
Signature · 1 line
David Marchand
Re: [PATCH v2 08/10] app/test: add some unattached tests to fast-test suite
Quoted 24 lines · David Marchand
app/test/test_red.c test_red_all(void) · line 1877
Quoted 12 lines · Bruce Richardson
app/test/test_red.c +1
-1@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);The commit
50823f30f0c8("test: build using per-file dependencies") removed some context on why some tests were not part of a testsuite.(quoted diff) +0
-3-# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [ - 'alarm_autotest', # ee00af60170b ("test: remove strict timingrequirements some tests")
- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
-]
Quoted 2 lines
I would prefer we don't put an unreliable test in fast-tests.
Agreed, but for many cases for developers running these on their systems, it's probably worth having them in. What would you think about having checks in the tests themselves to detect if they are running in github CI and to skip themselves in that case?
Re: [PATCH v2 08/10] app/test: add some unattached tests to fast-test suite
Quoted 26 lines · Bruce Richardson
Quoted 24 lines · David Marchand
app/test/test_red.c test_red_all(void) · line 1877
Quoted 12 lines · Bruce Richardson
app/test/test_red.c +1
-1@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);The commit
50823f30f0c8("test: build using per-file dependencies") removed some context on why some tests were not part of a testsuite.(quoted diff) +0
-3-# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [ - 'alarm_autotest', # ee00af60170b ("test: remove strict timingrequirements some tests")
- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
-]
Quoted 6 lines
Quoted 2 lines
I would prefer we don't put an unreliable test in fast-tests.
Agreed, but for many cases for developers running these on their systems, it's probably worth having them in. What would you think about having checks in the tests themselves to detect if they are running in github CI and to skip themselves in that case?
rte_red API has been left without tests for years.
I would prefer we remove the library completely rather than having to work more on it.
IIRC, the issue was seen at UNH, not in GHA and it was quite random. If the goal is just about removing a build warning, let's put this test in a "attic" testsuite.
Signature · 1 line
David Marchand
Re: [PATCH v2 08/10] app/test: add some unattached tests to fast-test suite
Quoted 35 lines · David Marchand
Quoted 26 lines · Bruce Richardson
Quoted 24 lines · David Marchand
app/test/test_red.c test_red_all(void) · line 1877
Quoted 12 lines · Bruce Richardson
app/test/test_red.c +1
-1@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);The commit
50823f30f0c8("test: build using per-file dependencies") removed some context on why some tests were not part of a testsuite.(quoted diff) +0
-3-# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [ - 'alarm_autotest', # ee00af60170b ("test: remove strict timingrequirements some tests")
- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
-]Quoted 6 lines
Quoted 2 lines
I would prefer we don't put an unreliable test in fast-tests.
Agreed, but for many cases for developers running these on their systems, it's probably worth having them in. What would you think about having checks in the tests themselves to detect if they are running in github CI and to skip themselves in that case?
Quoted 9 lines
rte_redAPI has been left without tests for years.
I would prefer we remove the library completely rather than having to work more on it.IIRC, the issue was seen at UNH, not in GHA and it was quite random. If the goal is just about removing a build warning, let's put this test in a "attic" testsuite.
Attic is it so. What about alarm autotest? I still see possibility of value in having it, but I get the fact that it is timing dependent. Attic also?
Re: [PATCH v2 08/10] app/test: add some unattached tests to fast-test suite
Quoted 42 lines · Bruce Richardson
Quoted 40 lines · David Marchand
Quoted 26 lines · Bruce Richardson
Quoted 24 lines · David Marchand
app/test/test_red.c test_red_all(void) · line 1877
Quoted 12 lines · Bruce Richardson
app/test/test_red.c +1
-1@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_FAST_TEST (red_autotest,NOHUGE_OK ,ASAN_OK , test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);The commit
50823f30f0c8("test: build using per-file dependencies") removed some context on why some tests were not part of a testsuite.(quoted diff) +0
-3-# Tests known to have issues or which don't belong in other tests lists. -extra_test_names = [ - 'alarm_autotest', # ee00af60170b ("test: remove strict timingrequirements some tests")
- 'red_autotest', # https://bugs.dpdk.org/show_bug.cgi?id=826
-]Quoted 6 lines
Quoted 2 lines
I would prefer we don't put an unreliable test in fast-tests.
Agreed, but for many cases for developers running these on their systems, it's probably worth having them in. What would you think about having checks in the tests themselves to detect if they are running in github CI and to skip themselves in that case?
rte_redAPI has been left without tests for years.
I would prefer we remove the library completely rather than having to work more on it.
Quoted 7 lines
Quoted 4 lines
IIRC, the issue was seen at UNH, not in GHA and it was quite random. If the goal is just about removing a build warning, let's put this test in a "attic" testsuite.
Attic is it so. What about alarm autotest? I still see possibility of value in having it, but I get the fact that it is timing dependent. Attic also?
Stephen stabilised it: 31fcb7d7dbf0 ("test/alarm: make the test more reliable"). And it was re-added to fast tests. app/test/test_alarm.c:REGISTER_FAST_TEST(alarm_autotest, true, true, test_alarm);
Signature · 1 line
David Marchand
PATCH v2 9/10 app/test: add tests to driver test suite
In reply to Bruce RichardsonA number of eventdev, cryptodev and ethdev tests require devices to be present in order to run so add them to the "driver" suite of tests.
--- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 ++-- app/test/test_event_timer_adapter.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-)
app/test/test_cryptodev_crosscheck.c +1 -1
@@ -1047,4 +1047,4 @@ test_crosscheck(void)return ret; } -REGISTER_TEST_COMMAND (cryptodev_crosscheck, test_crosscheck); +REGISTER_DRIVER_TEST (cryptodev_crosscheck, test_crosscheck);
app/test/test_ethdev_api.c +1 -1
@@ -185,4 +185,4 @@ test_ethdev_api(void)/* TODO: Make part of the fast test suite, `REGISTER_FAST_TEST()`, * when all drivers complies to the queue state requirement */ -REGISTER_TEST_COMMAND (ethdev_api, test_ethdev_api); +REGISTER_DRIVER_TEST (ethdev_api, test_ethdev_api);
app/test/test_event_crypto_adapter.c +1 -1
@@ -1625,5 +1625,5 @@ test_event_crypto_adapter(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_crypto_adapter_autotest, +REGISTER_DRIVER_TEST (event_crypto_adapter_autotest, test_event_crypto_adapter);
app/test/test_event_eth_rx_adapter.c +2 -2
@@ -1555,7 +1555,7 @@ test_event_eth_rx_intr_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_eth_rx_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_adapter_autotest, test_event_eth_rx_adapter_common); -REGISTER_TEST_COMMAND (event_eth_rx_intr_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_intr_adapter_autotest, test_event_eth_rx_intr_adapter_common);
app/test/test_event_timer_adapter.c +1 -1
@@ -2036,4 +2036,4 @@ test_event_timer_adapter_func(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_timer_adapter_test, test_event_timer_adapter_func); +REGISTER_DRIVER_TEST (event_timer_adapter_test, test_event_timer_adapter_func);
app/test/test_security_inline_macsec.c +1 -1
@@ -2584,4 +2584,4 @@ test_inline_macsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_macsec_autotest, test_inline_macsec); +REGISTER_DRIVER_TEST (inline_macsec_autotest, test_inline_macsec);
app/test/test_security_inline_proto.c +3 -3
@@ -3616,6 +3616,6 @@ test_event_inline_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_ipsec_autotest, test_inline_ipsec); -REGISTER_TEST_COMMAND (inline_ipsec_sg_autotest, test_inline_ipsec_sg); -REGISTER_TEST_COMMAND (event_inline_ipsec_autotest, test_event_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_autotest, test_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_sg_autotest, test_inline_ipsec_sg); +REGISTER_DRIVER_TEST (event_inline_ipsec_autotest, test_event_inline_ipsec);
Signature · 1 line
2.51.0
PATCH v2 10/10 buildtools/get-test-suites: suppress empty output
In reply to Bruce RichardsonIf there are no tests which are not assigned to a test suite, omit the line printing the non_suite_tests. This avoid having error messages from meson about test "" not being in any test suite.
--- buildtools/get-test-suites.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
buildtools/get-test-suites.py +2 -1
@@ -38,4 +38,5 @@ def get_fast_test_params(test_name, ln): for suite in test_suites.keys(): print(f"{suite}={','.join(test_suites[suite])}") -print(f"non_suite_tests={','.join(non_suite_tests)}") +if non_suite_tests: + print(f"non_suite_tests={','.join(non_suite_tests)}")
Signature · 1 line
2.51.0
RE: [PATCH v2 10/10] buildtools/get-test-suites: suppress empty output
Quoted 31 lines
-----Original Message-----
From: Bruce Richardson <[email protected]>
Sent: Thursday 4 December 2025 18:21
To: [email protected]
Cc: Bruce Richardson <[email protected]>; [email protected]
Subject: [PATCH v2 10/10] buildtools/get-test-suites: suppress empty outputIf there are no tests which are not assigned to a test suite, omit the line printing the
non_suite_tests. This avoid having error messages from meson about test "" not being in any test suite.Fixes 25065ef1f6c0 ("test: emit warning for orphaned tests")Signed-off-by Bruce Richardson <[email protected]>--- buildtools/get-test-suites.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)buildtools/get-test-suites.py +2
-2@@ -38,4 +38,5 @@ def get_fast_test_params(test_name, ln): for suite in test_suites.keys(): print(f"{suite}={','.join(test_suites[suite])}") -print(f"non_suite_tests={','.join(non_suite_tests)}") +if non_suite_tests: + print(f"non_suite_tests={','.join(non_suite_tests)}") --
Quoted 1 line
2.51.0
v3 cover Assign all unit tests to suites
In reply to Bruce RichardsonCategorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and add red_autotest to it.
V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached tests
Bruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to attic
app/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 313 insertions(+), 157 deletions(-)
--
2.51.0
PATCH v3 1/11 app/test: make parameters clearer when adding fast tests
For the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE_OK/NOHUGE_SKIP and ASAN_OK/ASAN_SKIP instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
--- app/test/suites/meson.build | 14 ++++++++++++-- app/test/test.h | 9 ++++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +++--- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++++++++------------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 ++-- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 ++-- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++++---- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 ++-- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 2 +- doc/guides/contributing/unit_test.rst | 10 ++++++---- 106 files changed, 148 insertions(+), 129 deletions(-)
app/test/suites/meson.build +12 -2
@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge + if params[1] != 'NOHUGE_OK' and params[1] != 'NOHUGE_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be NOHUGE_OK or NOHUGE_SKIP.' + .format(params[1], params[0])) + endif + if params[2] != 'ASAN_OK' and params[2] != 'ASAN_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be ASAN_OK or ASAN_SKIP.' + .format(params[2], params[0])) + endif + test_name = params[0] - nohuge = params[1] == 'true' - asan = params[2] == 'true' + nohuge = params[1] == 'NOHUGE_OK' + asan = params[2] == 'ASAN_OK' test_args = [] if nohuge
app/test/test.h +8 -1
@@ -207,9 +207,16 @@ void add_test_command(struct test_command *t);/* Register a test function as a particular type. * These can be used to build up test suites automatically */ -#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func)#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND#define REGISTER_STRESS_TEST REGISTER_TEST_COMMAND +/* fast tests are a bit special. They can be specified as supporting running without +* hugepages and/or under ASan. +* - The "no_huge" options should be passed as either "NOHUGE_OK" or "NOHUGE_SKIP" +* - The "ASan" options should be passed as either "ASAN_OK" or "ASAN_SKIP" +*/ +#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) + +#endif
app/test/test_acl.c +1 -1
@@ -1748,4 +1748,4 @@ test_acl(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (acl_autotest, true, true, test_acl); +REGISTER_FAST_TEST (acl_autotest,NOHUGE_OK ,ASAN_OK , test_acl);
app/test/test_alarm.c +1 -1
@@ -76,4 +76,4 @@ test_alarm(void)return 0 ; } -REGISTER_FAST_TEST (alarm_autotest, true, true, test_alarm); +REGISTER_FAST_TEST (alarm_autotest,NOHUGE_OK ,ASAN_OK , test_alarm);
app/test/test_argparse.c +1 -1
@@ -1618,4 +1618,4 @@ test_argparse(void)return unit_test_suite_runner (&argparse_test_suite); } -REGISTER_FAST_TEST (argparse_autotest, true, true, test_argparse); +REGISTER_FAST_TEST (argparse_autotest,NOHUGE_OK ,ASAN_OK , test_argparse);
app/test/test_atomic.c +1 -1
@@ -632,5 +632,5 @@ test_atomic(void) return 0; } -REGISTER_FAST_TEST (atomic_autotest, false, true, test_atomic); +REGISTER_FAST_TEST (atomic_autotest,NOHUGE_SKIP ,ASAN_OK , test_atomic);#endif /* RTE_TOOLCHAIN_MSVC */
app/test/test_bitcount.c +1 -1
@@ -171,4 +171,4 @@ test_bitcount(void)return unit_test_suite_runner (&bitcount_test_suite); } -REGISTER_FAST_TEST (bitcount_autotest, true, true, test_bitcount); +REGISTER_FAST_TEST (bitcount_autotest,NOHUGE_OK ,ASAN_OK , test_bitcount);
app/test/test_bitmap.c +1 -1
@@ -269,4 +269,4 @@ test_bitmap(void)return test_bitmap_all_set (); } -REGISTER_FAST_TEST (bitmap_autotest, true, true, test_bitmap); +REGISTER_FAST_TEST (bitmap_autotest,NOHUGE_OK ,ASAN_OK , test_bitmap);
app/test/test_bitops.c +1 -1
@@ -438,4 +438,4 @@ test_bitops(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (bitops_autotest, true, true, test_bitops); +REGISTER_FAST_TEST (bitops_autotest,NOHUGE_OK ,ASAN_OK , test_bitops);
app/test/test_bitratestats.c +1 -1
@@ -249,4 +249,4 @@ test_bitratestats(void) {return unit_test_suite_runner (&bitratestats_testsuite); } -REGISTER_FAST_TEST (bitratestats_autotest, true, true, test_bitratestats); +REGISTER_FAST_TEST (bitratestats_autotest,NOHUGE_OK ,ASAN_OK , test_bitratestats);
app/test/test_bitset.c +1 -1
@@ -909,4 +909,4 @@ test_bitset(void)return unit_test_suite_runner (&bitset_tests); } -REGISTER_FAST_TEST (bitset_autotest, true, true, test_bitset); +REGISTER_FAST_TEST (bitset_autotest,NOHUGE_OK ,ASAN_OK , test_bitset);
app/test/test_bpf.c +3 -3
@@ -3278,7 +3278,7 @@ test_bpf(void)#endif /* !RTE_LIB_BPF */ -REGISTER_FAST_TEST (bpf_autotest, true, true, test_bpf); +REGISTER_FAST_TEST (bpf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf);#ifdef TEST_BPF_ELF_LOAD
@@ -3751,7 +3751,7 @@ test_bpf_elf(void)#endif /* !TEST_BPF_ELF_LOAD */ -REGISTER_FAST_TEST (bpf_elf_autotest, true, true, test_bpf_elf); +REGISTER_FAST_TEST (bpf_elf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_elf);#ifndef RTE_HAS_LIBPCAP
@@ -3969,4 +3969,4 @@ test_bpf_convert(void)#endif /* RTE_HAS_LIBPCAP */ -REGISTER_FAST_TEST (bpf_convert_autotest, true, true, test_bpf_convert); +REGISTER_FAST_TEST (bpf_convert_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_convert);
app/test/test_byteorder.c +1 -1
@@ -63,4 +63,4 @@ test_byteorder(void)return 0 ; } -REGISTER_FAST_TEST (byteorder_autotest, true, true, test_byteorder); +REGISTER_FAST_TEST (byteorder_autotest,NOHUGE_OK ,ASAN_OK , test_byteorder);
app/test/test_cfgfile.c +1 -1
@@ -399,4 +399,4 @@ test_cfgfile(void)return unit_test_suite_runner (&test_cfgfile_suite); } -REGISTER_FAST_TEST (cfgfile_autotest, true, true, test_cfgfile); +REGISTER_FAST_TEST (cfgfile_autotest,NOHUGE_OK ,ASAN_OK , test_cfgfile);
app/test/test_cksum.c +1 -1
@@ -267,4 +267,4 @@ test_cksum(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (cksum_autotest, true, true, test_cksum); +REGISTER_FAST_TEST (cksum_autotest,NOHUGE_OK ,ASAN_OK , test_cksum);
app/test/test_cmdline.c +1 -1
@@ -60,4 +60,4 @@ test_cmdline(void)return 0 ; } -REGISTER_FAST_TEST (cmdline_autotest, true, true, test_cmdline); +REGISTER_FAST_TEST (cmdline_autotest,NOHUGE_OK ,ASAN_OK , test_cmdline);
app/test/test_common.c +1 -1
@@ -354,4 +354,4 @@ test_common(void)return ret; } -REGISTER_FAST_TEST (common_autotest, true, true, test_common); +REGISTER_FAST_TEST (common_autotest,NOHUGE_OK ,ASAN_OK , test_common);
app/test/test_compressdev.c +1 -1
@@ -4255,4 +4255,4 @@ test_compressdev(void)return unit_test_suite_runner (&compressdev_testsuite); } -REGISTER_FAST_TEST (compressdev_autotest, false, true, test_compressdev); +REGISTER_FAST_TEST (compressdev_autotest,NOHUGE_SKIP ,ASAN_OK , test_compressdev);
app/test/test_cpuflags.c +1 -1
@@ -327,4 +327,4 @@ test_cpuflags(void)return 0 ; } -REGISTER_FAST_TEST (cpuflags_autotest, true, true, test_cpuflags); +REGISTER_FAST_TEST (cpuflags_autotest,NOHUGE_OK ,ASAN_OK , test_cpuflags);
app/test/test_crc.c +1 -1
@@ -140,4 +140,4 @@ crc_autotest(void)return ret; } -REGISTER_FAST_TEST (crc_autotest, true, true, crc_autotest); +REGISTER_FAST_TEST (crc_autotest,NOHUGE_OK ,ASAN_OK , crc_autotest);
app/test/test_cycles.c +1 -1
@@ -53,4 +53,4 @@ test_user_delay_us(void)return 0 ; } -REGISTER_FAST_TEST (user_delay_us, true, true, test_user_delay_us); +REGISTER_FAST_TEST (user_delay_us,NOHUGE_OK ,ASAN_OK , test_user_delay_us);
app/test/test_debug.c +1 -1
@@ -183,4 +183,4 @@ test_debug(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (debug_autotest, true, true, test_debug); +REGISTER_FAST_TEST (debug_autotest,NOHUGE_OK ,ASAN_OK , test_debug);
app/test/test_devargs.c +1 -1
@@ -320,4 +320,4 @@ test_devargs(void)return 0 ; } -REGISTER_FAST_TEST (devargs_autotest, true, true, test_devargs); +REGISTER_FAST_TEST (devargs_autotest,NOHUGE_OK ,ASAN_OK , test_devargs);
app/test/test_dispatcher.c +1 -1
@@ -1053,4 +1053,4 @@ test_dispatcher(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (dispatcher_autotest, false, true, test_dispatcher); +REGISTER_FAST_TEST (dispatcher_autotest,NOHUGE_SKIP ,ASAN_OK , test_dispatcher);
app/test/test_distributor.c +1 -1
@@ -953,4 +953,4 @@ test_distributor(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (distributor_autotest, false, true, test_distributor); +REGISTER_FAST_TEST (distributor_autotest,NOHUGE_SKIP ,ASAN_OK , test_distributor);
app/test/test_eal_flags.c +12 -12
@@ -1692,15 +1692,15 @@ test_memory_flags(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_flags_c_opt_autotest, false, false, test_missing_c_flag); -REGISTER_FAST_TEST (eal_flags_main_opt_autotest, false, false, test_main_lcore_flag); -REGISTER_FAST_TEST (eal_flags_n_opt_autotest, false, false, test_invalid_n_flag); -REGISTER_FAST_TEST (eal_flags_hpet_autotest, false, false, test_no_hpet_flag); -REGISTER_FAST_TEST (eal_flags_no_huge_autotest, false, false, test_no_huge_flag); -REGISTER_FAST_TEST (eal_flags_a_opt_autotest, false, false, test_allow_flag); -REGISTER_FAST_TEST (eal_flags_b_opt_autotest, false, false, test_invalid_b_flag); -REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag); -REGISTER_FAST_TEST (eal_flags_r_opt_autotest, false, false, test_invalid_r_flag); -REGISTER_FAST_TEST (eal_flags_mem_autotest, false, false, test_memory_flags); -REGISTER_FAST_TEST (eal_flags_file_prefix_autotest, false, false, test_file_prefix); -REGISTER_FAST_TEST (eal_flags_misc_autotest, false, false, test_misc_flags); +REGISTER_FAST_TEST (eal_flags_c_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_missing_c_flag); +REGISTER_FAST_TEST (eal_flags_main_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_main_lcore_flag); +REGISTER_FAST_TEST (eal_flags_n_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_n_flag); +REGISTER_FAST_TEST (eal_flags_hpet_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_hpet_flag); +REGISTER_FAST_TEST (eal_flags_no_huge_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_huge_flag); +REGISTER_FAST_TEST (eal_flags_a_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_allow_flag); +REGISTER_FAST_TEST (eal_flags_b_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_b_flag); +REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_vdev_flag); +REGISTER_FAST_TEST (eal_flags_r_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_r_flag); +REGISTER_FAST_TEST (eal_flags_mem_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_memory_flags); +REGISTER_FAST_TEST (eal_flags_file_prefix_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_file_prefix); +REGISTER_FAST_TEST (eal_flags_misc_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_misc_flags);
app/test/test_eal_fs.c +1 -1
@@ -185,4 +185,4 @@ test_eal_fs(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_fs_autotest, true, true, test_eal_fs); +REGISTER_FAST_TEST (eal_fs_autotest,NOHUGE_OK ,ASAN_OK , test_eal_fs);
app/test/test_errno.c +1 -1
@@ -94,4 +94,4 @@ test_errno(void)return 0 ; } -REGISTER_FAST_TEST (errno_autotest, true, true, test_errno); +REGISTER_FAST_TEST (errno_autotest,NOHUGE_OK ,ASAN_OK , test_errno);
app/test/test_ethdev_link.c +1 -1
@@ -172,4 +172,4 @@ test_link_status(void)return unit_test_suite_runner (&link_status_testsuite); } -REGISTER_FAST_TEST (ethdev_link_status, true, true, test_link_status); +REGISTER_FAST_TEST (ethdev_link_status,NOHUGE_OK ,ASAN_OK , test_link_status);
app/test/test_event_eth_tx_adapter.c +1 -1
@@ -1010,4 +1010,4 @@ test_event_eth_tx_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_eth_tx_adapter_autotest, false, true, test_event_eth_tx_adapter_common); +REGISTER_FAST_TEST (event_eth_tx_adapter_autotest,NOHUGE_SKIP ,ASAN_OK , test_event_eth_tx_adapter_common);
app/test/test_event_ring.c +1 -1
@@ -256,4 +256,4 @@ test_event_ring(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_ring_autotest, true, true, test_event_ring); +REGISTER_FAST_TEST (event_ring_autotest,NOHUGE_OK ,ASAN_OK , test_event_ring);
app/test/test_event_vector_adapter.c +1 -1
@@ -709,5 +709,5 @@ test_event_vector_adapter(void)#endif /* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(event_vector_adapter_autotest, true, true, test_event_vector_adapter); +* REGISTER_FAST_TEST(event_vector_adapter_autotest, NOHUGE_OK, ASAN_OK, test_event_vector_adapter); */
app/test/test_eventdev.c +2 -2
@@ -1529,10 +1529,10 @@ test_eventdev_selftest_cn20k(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eventdev_common_autotest, true, true, test_eventdev_common); +REGISTER_FAST_TEST (eventdev_common_autotest,NOHUGE_OK ,ASAN_OK , test_eventdev_common);#ifndef RTE_EXEC_ENV_WINDOWS -REGISTER_FAST_TEST (eventdev_selftest_sw, true, true, test_eventdev_selftest_sw); +REGISTER_FAST_TEST (eventdev_selftest_sw,NOHUGE_OK ,ASAN_OK , test_eventdev_selftest_sw);REGISTER_DRIVER_TEST (eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);REGISTER_DRIVER_TEST (eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);REGISTER_DRIVER_TEST (eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
app/test/test_fbarray.c +1 -1
@@ -933,4 +933,4 @@ test_fbarray(void)return unit_test_suite_runner (&fbarray_test_suite); } -REGISTER_FAST_TEST (fbarray_autotest, true, true, test_fbarray); +REGISTER_FAST_TEST (fbarray_autotest,NOHUGE_OK ,ASAN_OK , test_fbarray);
app/test/test_fib.c +1 -1
@@ -629,5 +629,5 @@ test_slow_fib(void)return unit_test_suite_runner (&fib_slow_tests); } -REGISTER_FAST_TEST (fib_autotest, true, true, test_fib); +REGISTER_FAST_TEST (fib_autotest,NOHUGE_OK ,ASAN_OK , test_fib);REGISTER_PERF_TEST (fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +1 -1
@@ -640,5 +640,5 @@ test_slow_fib6(void)return unit_test_suite_runner (&fib6_slow_tests); } -REGISTER_FAST_TEST (fib6_autotest, true, true, test_fib6); +REGISTER_FAST_TEST (fib6_autotest,NOHUGE_OK ,ASAN_OK , test_fib6);REGISTER_PERF_TEST (fib6_slow_autotest, test_slow_fib6);
app/test/test_func_reentrancy.c +1 -1
@@ -511,4 +511,4 @@ test_func_reentrancy(void)return 0 ; } -REGISTER_FAST_TEST (func_reentrancy_autotest, false, true, test_func_reentrancy); +REGISTER_FAST_TEST (func_reentrancy_autotest,NOHUGE_SKIP ,ASAN_OK , test_func_reentrancy);
app/test/test_graph.c +2 -2
@@ -1150,7 +1150,7 @@ graph_autotest_fn(void)return unit_test_suite_runner (&graph_testsuite); } -REGISTER_FAST_TEST (graph_autotest, true, true, graph_autotest_fn); +REGISTER_FAST_TEST (graph_autotest,NOHUGE_OK ,ASAN_OK , graph_autotest_fn);static int test_node_list_dump (void )
@@ -1162,4 +1162,4 @@ test_node_list_dump(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (node_list_dump, true, true, test_node_list_dump); +REGISTER_FAST_TEST (node_list_dump,NOHUGE_OK ,ASAN_OK , test_node_list_dump);
app/test/test_graph_feature_arc.c +1 -1
@@ -1368,6 +1368,6 @@ graph_feature_arc_autotest_fn(void) return unit_test_suite_runner(&graph_feature_arc_testsuite); } -REGISTER_FAST_TEST (graph_feature_arc_autotest, true, true, graph_feature_arc_autotest_fn); +REGISTER_FAST_TEST (graph_feature_arc_autotest,NOHUGE_OK ,ASAN_OK , graph_feature_arc_autotest_fn);#endif /* !RTE_EXEC_ENV_WINDOWS */
app/test/test_hash.c +1 -1
@@ -2405,4 +2405,4 @@ test_hash(void)return 0 ; } -REGISTER_FAST_TEST (hash_autotest, true, true, test_hash); +REGISTER_FAST_TEST (hash_autotest,NOHUGE_OK ,ASAN_OK , test_hash);
app/test/test_hash_readwrite.c +1 -1
@@ -775,5 +775,5 @@ test_hash_rw_func_main(void)return 0 ; } -REGISTER_FAST_TEST (hash_readwrite_func_autotest, false, true, test_hash_rw_func_main); +REGISTER_FAST_TEST (hash_readwrite_func_autotest,NOHUGE_SKIP ,ASAN_OK , test_hash_rw_func_main);REGISTER_PERF_TEST (hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_interrupts.c +1 -1
@@ -594,4 +594,4 @@ test_interrupt(void)return ret; } -REGISTER_FAST_TEST (interrupt_autotest, true, true, test_interrupt); +REGISTER_FAST_TEST (interrupt_autotest,NOHUGE_OK ,ASAN_OK , test_interrupt);
app/test/test_ipfrag.c +1 -1
@@ -505,4 +505,4 @@ test_ipfrag(void) } -REGISTER_FAST_TEST (ipfrag_autotest, false, true, test_ipfrag); +REGISTER_FAST_TEST (ipfrag_autotest,NOHUGE_SKIP ,ASAN_OK , test_ipfrag);
app/test/test_ipsec.c +1 -1
@@ -2617,4 +2617,4 @@ test_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (ipsec_autotest, true, true, test_ipsec); +REGISTER_FAST_TEST (ipsec_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec);
app/test/test_kvargs.c +1 -1
@@ -364,4 +364,4 @@ test_kvargs(void)return unit_test_suite_runner (&kvargs_test_suite); } -REGISTER_FAST_TEST (kvargs_autotest, true, true, test_kvargs); +REGISTER_FAST_TEST (kvargs_autotest,NOHUGE_OK ,ASAN_OK , test_kvargs);
app/test/test_latencystats.c +1 -1
@@ -246,4 +246,4 @@ static int test_latencystats(void)return unit_test_suite_runner (&latencystats_testsuite); } -REGISTER_FAST_TEST (latencystats_autotest, true, true, test_latencystats); +REGISTER_FAST_TEST (latencystats_autotest,NOHUGE_OK ,ASAN_OK , test_latencystats);
app/test/test_lcore_var.c +1 -1
@@ -411,4 +411,4 @@ static int test_lcore_var(void)return unit_test_suite_runner (&lcore_var_testsuite); } -REGISTER_FAST_TEST (lcore_var_autotest, true, false, test_lcore_var); +REGISTER_FAST_TEST (lcore_var_autotest,NOHUGE_OK ,ASAN_SKIP , test_lcore_var);
app/test/test_lcores.c +1 -1
@@ -422,4 +422,4 @@ test_lcores(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (lcores_autotest, true, true, test_lcores); +REGISTER_FAST_TEST (lcores_autotest,NOHUGE_OK ,ASAN_OK , test_lcores);
app/test/test_logs.c +1 -1
@@ -158,4 +158,4 @@ test_logs(void)return 0 ; } -REGISTER_FAST_TEST (logs_autotest, true, true, test_logs); +REGISTER_FAST_TEST (logs_autotest,NOHUGE_OK ,ASAN_OK , test_logs);
app/test/test_lpm.c +1 -1
@@ -1584,4 +1584,4 @@ test_lpm(void)return global_status; } -REGISTER_FAST_TEST (lpm_autotest, true, true, test_lpm); +REGISTER_FAST_TEST (lpm_autotest,NOHUGE_OK ,ASAN_OK , test_lpm);
app/test/test_lpm6.c +1 -1
@@ -1767,4 +1767,4 @@ test_lpm6(void)return global_status; } -REGISTER_FAST_TEST (lpm6_autotest, true, true, test_lpm6); +REGISTER_FAST_TEST (lpm6_autotest,NOHUGE_OK ,ASAN_OK , test_lpm6);
app/test/test_malloc.c +1 -1
@@ -1166,4 +1166,4 @@ test_malloc(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (malloc_autotest, false, true, test_malloc); +REGISTER_FAST_TEST (malloc_autotest,NOHUGE_SKIP ,ASAN_OK , test_malloc);
app/test/test_mbuf.c +1 -1
@@ -2953,4 +2953,4 @@ test_mbuf(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (mbuf_autotest, false, true, test_mbuf); +REGISTER_FAST_TEST (mbuf_autotest,NOHUGE_SKIP ,ASAN_OK , test_mbuf);
app/test/test_mcslock.c +1 -1
@@ -241,4 +241,4 @@ test_mcslock(void)return ret; } -REGISTER_FAST_TEST (mcslock_autotest, false, true, test_mcslock); +REGISTER_FAST_TEST (mcslock_autotest,NOHUGE_SKIP ,ASAN_OK , test_mcslock);
app/test/test_member.c +1 -1
@@ -996,4 +996,4 @@ test_member(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (member_autotest, true, true, test_member); +REGISTER_FAST_TEST (member_autotest,NOHUGE_OK ,ASAN_OK , test_member);
app/test/test_memcpy.c +1 -1
@@ -129,4 +129,4 @@ test_memcpy(void)return 0 ; } -REGISTER_FAST_TEST (memcpy_autotest, true, true, test_memcpy); +REGISTER_FAST_TEST (memcpy_autotest,NOHUGE_OK ,ASAN_OK , test_memcpy);
app/test/test_memory.c +1 -1
@@ -110,4 +110,4 @@ test_memory(void)return 0 ; } -REGISTER_FAST_TEST (memory_autotest, false, true, test_memory); +REGISTER_FAST_TEST (memory_autotest,NOHUGE_SKIP ,ASAN_OK , test_memory);
app/test/test_mempool.c +1 -1
@@ -1122,4 +1122,4 @@ test_mempool(void)return ret; } -REGISTER_FAST_TEST (mempool_autotest, false, true, test_mempool); +REGISTER_FAST_TEST (mempool_autotest,NOHUGE_SKIP ,ASAN_OK , test_mempool);
app/test/test_memzone.c +1 -1
@@ -1162,4 +1162,4 @@ test_memzone(void)return 0 ; } -REGISTER_FAST_TEST (memzone_autotest, false, true, test_memzone); +REGISTER_FAST_TEST (memzone_autotest,NOHUGE_SKIP ,ASAN_OK , test_memzone);
app/test/test_meter.c +1 -1
@@ -713,4 +713,4 @@ test_meter(void) } -REGISTER_FAST_TEST (meter_autotest, true, true, test_meter); +REGISTER_FAST_TEST (meter_autotest,NOHUGE_OK ,ASAN_OK , test_meter);
app/test/test_metrics.c +1 -1
@@ -326,4 +326,4 @@ test_metrics(void)return unit_test_suite_runner (&metrics_testsuite); } -REGISTER_FAST_TEST (metrics_autotest, true, true, test_metrics); +REGISTER_FAST_TEST (metrics_autotest,NOHUGE_OK ,ASAN_OK , test_metrics);
app/test/test_mp_secondary.c +1 -1
@@ -222,4 +222,4 @@ test_mp_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (multiprocess_autotest, false, false, test_mp_secondary); +REGISTER_FAST_TEST (multiprocess_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_mp_secondary);
app/test/test_net_ether.c +1 -1
@@ -162,4 +162,4 @@ test_net_ether(void)return 0 ; } -REGISTER_FAST_TEST (net_ether_autotest, true, true, test_net_ether); +REGISTER_FAST_TEST (net_ether_autotest,NOHUGE_OK ,ASAN_OK , test_net_ether);
app/test/test_net_ip6.c +1 -1
@@ -218,4 +218,4 @@ test_net_ipv6(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (net_ipv6_autotest, true, true, test_net_ipv6); +REGISTER_FAST_TEST (net_ipv6_autotest,NOHUGE_OK ,ASAN_OK , test_net_ipv6);
app/test/test_pcapng.c +1 -1
@@ -464,4 +464,4 @@ test_pcapng(void)return unit_test_suite_runner (&test_pcapng_suite); } -REGISTER_FAST_TEST (pcapng_autotest, true, true, test_pcapng); +REGISTER_FAST_TEST (pcapng_autotest,NOHUGE_OK ,ASAN_OK , test_pcapng);
app/test/test_pdcp.c +1 -1
@@ -2388,4 +2388,4 @@ test_pdcp(void)return ret; } -REGISTER_FAST_TEST (pdcp_autotest, false, true, test_pdcp); +REGISTER_FAST_TEST (pdcp_autotest,NOHUGE_SKIP ,ASAN_OK , test_pdcp);
app/test/test_pdump.c +1 -1
@@ -218,4 +218,4 @@ test_pdump(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (pdump_autotest, true, false, test_pdump); +REGISTER_FAST_TEST (pdump_autotest,NOHUGE_OK ,ASAN_SKIP , test_pdump);
app/test/test_per_lcore.c +1 -1
@@ -118,4 +118,4 @@ test_per_lcore(void)return 0 ; } -REGISTER_FAST_TEST (per_lcore_autotest, true, true, test_per_lcore); +REGISTER_FAST_TEST (per_lcore_autotest,NOHUGE_OK ,ASAN_OK , test_per_lcore);
app/test/test_pflock.c +1 -1
@@ -194,4 +194,4 @@ test_pflock(void)return 0 ; } -REGISTER_FAST_TEST (pflock_autotest, true, true, test_pflock); +REGISTER_FAST_TEST (pflock_autotest,NOHUGE_OK ,ASAN_OK , test_pflock);
app/test/test_pie.c +1 -1
@@ -1082,6 +1082,6 @@ test_pie_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (pie_autotest, true, true, test_pie); +REGISTER_FAST_TEST (pie_autotest,NOHUGE_OK ,ASAN_OK , test_pie);REGISTER_PERF_TEST (pie_perf, test_pie_perf);REGISTER_PERF_TEST (pie_all, test_pie_all);
app/test/test_pmd_ring.c +1 -1
@@ -593,4 +593,4 @@ test_pmd_ring(void)return unit_test_suite_runner (&test_pmd_ring_suite); } -REGISTER_FAST_TEST (ring_pmd_autotest, true, true, test_pmd_ring); +REGISTER_FAST_TEST (ring_pmd_autotest,NOHUGE_OK ,ASAN_OK , test_pmd_ring);
app/test/test_pmu.c +1 -1
@@ -53,5 +53,5 @@ test_pmu(void) }/* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(pmu_autotest, true, true, test_pmu); +* REGISTER_FAST_TEST(pmu_autotest, NOHUGE_OK, ASAN_OK, test_pmu); */
app/test/test_power.c +1 -1
@@ -78,4 +78,4 @@ test_power(void) }#endif -REGISTER_FAST_TEST (power_autotest, true, true, test_power); +REGISTER_FAST_TEST (power_autotest,NOHUGE_OK ,ASAN_OK , test_power);
app/test/test_power_cpufreq.c +1 -1
@@ -678,5 +678,5 @@ test_power_caps(void)#endif -REGISTER_FAST_TEST (power_cpufreq_autotest, false, true, test_power_cpufreq); +REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq);REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
@@ -303,4 +303,4 @@ test_power_intel_uncore(void) }#endif -REGISTER_FAST_TEST (power_intel_uncore_autotest, true, true, test_power_intel_uncore); +REGISTER_FAST_TEST (power_intel_uncore_autotest,NOHUGE_OK ,ASAN_OK , test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
@@ -263,4 +263,4 @@ test_power_kvm_vm(void) }#endif -REGISTER_FAST_TEST (power_kvm_vm_autotest, false, true, test_power_kvm_vm); +REGISTER_FAST_TEST (power_kvm_vm_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
@@ -35,4 +35,4 @@ test_prefetch(void)return 0 ; } -REGISTER_FAST_TEST (prefetch_autotest, true, true, test_prefetch); +REGISTER_FAST_TEST (prefetch_autotest,NOHUGE_OK ,ASAN_OK , test_prefetch);
app/test/test_ptr_compress.c +1 -1
@@ -190,4 +190,4 @@ test_ptr_compress(void)return 0 ; } -REGISTER_FAST_TEST (ptr_compress_autotest, true, true, test_ptr_compress); +REGISTER_FAST_TEST (ptr_compress_autotest,NOHUGE_OK ,ASAN_OK , test_ptr_compress);
app/test/test_rawdev.c +1 -1
@@ -74,4 +74,4 @@ test_rawdev_selftests(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (rawdev_autotest, true, true, test_rawdev_selftests); +REGISTER_FAST_TEST (rawdev_autotest,NOHUGE_OK ,ASAN_OK , test_rawdev_selftests);
app/test/test_rcu_qsbr.c +1 -1
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)return -1 ; } -REGISTER_FAST_TEST (rcu_qsbr_autotest, true, true, test_rcu_qsbr_main); +REGISTER_FAST_TEST (rcu_qsbr_autotest,NOHUGE_OK ,ASAN_OK , test_rcu_qsbr_main);
app/test/test_reorder.c +1 -1
@@ -552,4 +552,4 @@ test_reorder(void) } -REGISTER_FAST_TEST (reorder_autotest, true, true, test_reorder); +REGISTER_FAST_TEST (reorder_autotest,NOHUGE_OK ,ASAN_OK , test_reorder);
app/test/test_rib.c +1 -1
@@ -363,5 +363,5 @@ test_slow_rib(void)return unit_test_suite_runner (&rib_slow_tests); } -REGISTER_FAST_TEST (rib_autotest, true, true, test_rib); +REGISTER_FAST_TEST (rib_autotest,NOHUGE_OK ,ASAN_OK , test_rib);REGISTER_PERF_TEST (rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +1 -1
@@ -362,5 +362,5 @@ test_slow_rib6(void)return unit_test_suite_runner (&rib6_slow_tests); } -REGISTER_FAST_TEST (rib6_autotest, true, true, test_rib6); +REGISTER_FAST_TEST (rib6_autotest,NOHUGE_OK ,ASAN_OK , test_rib6);REGISTER_PERF_TEST (rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
@@ -1248,4 +1248,4 @@ test_ring(void)return -1 ; } -REGISTER_FAST_TEST (ring_autotest, true, true, test_ring); +REGISTER_FAST_TEST (ring_autotest,NOHUGE_OK ,ASAN_OK , test_ring);
app/test/test_rwlock.c +4 -4
@@ -507,7 +507,7 @@ try_rwlock_test_rde_wro(void)return process_try_lcore_stats (); } -REGISTER_FAST_TEST (rwlock_test1_autotest, true, true, rwlock_test1); -REGISTER_FAST_TEST (rwlock_rda_autotest, true, true, try_rwlock_test_rda); -REGISTER_FAST_TEST (rwlock_rds_wrm_autotest, true, true, try_rwlock_test_rds_wrm); -REGISTER_FAST_TEST (rwlock_rde_wro_autotest, true, true, try_rwlock_test_rde_wro); +REGISTER_FAST_TEST (rwlock_test1_autotest,NOHUGE_OK ,ASAN_OK , rwlock_test1); +REGISTER_FAST_TEST (rwlock_rda_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rda); +REGISTER_FAST_TEST (rwlock_rds_wrm_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rds_wrm); +REGISTER_FAST_TEST (rwlock_rde_wro_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rde_wro);
app/test/test_sched.c +1 -1
@@ -215,4 +215,4 @@ test_sched(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (sched_autotest, true, true, test_sched); +REGISTER_FAST_TEST (sched_autotest,NOHUGE_OK ,ASAN_OK , test_sched);
app/test/test_security.c +1 -1
@@ -2314,4 +2314,4 @@ test_security(void)return unit_test_suite_runner (&security_testsuite); } -REGISTER_FAST_TEST (security_autotest, false, true, test_security); +REGISTER_FAST_TEST (security_autotest,NOHUGE_SKIP ,ASAN_OK , test_security);
app/test/test_seqlock.c +1 -1
@@ -187,4 +187,4 @@ test_seqlock(void)return rc; } -REGISTER_FAST_TEST (seqlock_autotest, true, true, test_seqlock); +REGISTER_FAST_TEST (seqlock_autotest,NOHUGE_OK ,ASAN_OK , test_seqlock);
app/test/test_service_cores.c +1 -1
@@ -1081,7 +1081,7 @@ test_service_common(void)return unit_test_suite_runner (&service_tests); } -REGISTER_FAST_TEST (service_autotest, true, true, test_service_common); +REGISTER_FAST_TEST (service_autotest,NOHUGE_OK ,ASAN_OK , test_service_common);static struct unit_test_suite service_perf_tests = { .suite_name ="service core performance test suite" ,
app/test/test_soring.c +1 -1
@@ -438,4 +438,4 @@ test_soring(void)return -1 ; } -REGISTER_FAST_TEST (soring_autotest, true, true, test_soring); +REGISTER_FAST_TEST (soring_autotest,NOHUGE_OK ,ASAN_OK , test_soring);
app/test/test_spinlock.c +1 -1
@@ -303,4 +303,4 @@ test_spinlock(void)return ret; } -REGISTER_FAST_TEST (spinlock_autotest, true, true, test_spinlock); +REGISTER_FAST_TEST (spinlock_autotest,NOHUGE_OK ,ASAN_OK , test_spinlock);
app/test/test_stack.c +2 -2
@@ -379,5 +379,5 @@ test_lf_stack(void)#endif } -REGISTER_FAST_TEST (stack_autotest, false, true, test_stack); -REGISTER_FAST_TEST (stack_lf_autotest, false, true, test_lf_stack); +REGISTER_FAST_TEST (stack_autotest,NOHUGE_SKIP ,ASAN_OK , test_stack); +REGISTER_FAST_TEST (stack_lf_autotest,NOHUGE_SKIP ,ASAN_OK , test_lf_stack);
app/test/test_string_fns.c +1 -1
@@ -328,4 +328,4 @@ test_string_fns(void)return 0 ; } -REGISTER_FAST_TEST (string_autotest, true, true, test_string_fns); +REGISTER_FAST_TEST (string_autotest,NOHUGE_OK ,ASAN_OK , test_string_fns);
app/test/test_table.c +1 -1
@@ -206,4 +206,4 @@ test_table(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (table_autotest, true, true, test_table); +REGISTER_FAST_TEST (table_autotest,NOHUGE_OK ,ASAN_OK , test_table);
app/test/test_tailq.c +1 -1
@@ -125,4 +125,4 @@ test_tailq(void)return ret; } -REGISTER_FAST_TEST (tailq_autotest, true, true, test_tailq); +REGISTER_FAST_TEST (tailq_autotest,NOHUGE_OK ,ASAN_OK , test_tailq);
app/test/test_telemetry_data.c +1 -1
@@ -615,4 +615,4 @@ telemetry_data_autotest(void) }#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (telemetry_data_autotest, true, true, telemetry_data_autotest); +REGISTER_FAST_TEST (telemetry_data_autotest,NOHUGE_OK ,ASAN_OK , telemetry_data_autotest);
app/test/test_telemetry_json.c +1 -1
@@ -213,4 +213,4 @@ test_telemetry_json(void)return 0 ; } -REGISTER_FAST_TEST (telemetry_json_autotest, true, true, test_telemetry_json); +REGISTER_FAST_TEST (telemetry_json_autotest,NOHUGE_OK ,ASAN_OK , test_telemetry_json);
app/test/test_thash.c +1 -1
@@ -1060,4 +1060,4 @@ test_thash(void)return unit_test_suite_runner (&thash_tests); } -REGISTER_FAST_TEST (thash_autotest, true, true, test_thash); +REGISTER_FAST_TEST (thash_autotest,NOHUGE_OK ,ASAN_OK , test_thash);
app/test/test_threads.c +1 -1
@@ -280,4 +280,4 @@ test_threads(void)return unit_test_suite_runner (&threads_test_suite); } -REGISTER_FAST_TEST (threads_autotest, true, true, test_threads); +REGISTER_FAST_TEST (threads_autotest,NOHUGE_OK ,ASAN_OK , test_threads);
app/test/test_ticketlock.c +1 -1
@@ -315,4 +315,4 @@ test_ticketlock(void)return ret; } -REGISTER_FAST_TEST (ticketlock_autotest, true, true, test_ticketlock); +REGISTER_FAST_TEST (ticketlock_autotest,NOHUGE_OK ,ASAN_OK , test_ticketlock);
app/test/test_timer.c +1 -1
@@ -601,4 +601,4 @@ test_timer(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (timer_autotest, false, true, test_timer); +REGISTER_FAST_TEST (timer_autotest,NOHUGE_SKIP ,ASAN_OK , test_timer);
app/test/test_trace.c +1 -1
@@ -254,4 +254,4 @@ test_trace(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (trace_autotest, true, true, test_trace); +REGISTER_FAST_TEST (trace_autotest,NOHUGE_OK ,ASAN_OK , test_trace);
app/test/test_vdev.c +1 -1
@@ -166,4 +166,4 @@ test_vdev(void)return 0 ; } -REGISTER_FAST_TEST (vdev_autotest, true, true, test_vdev); +REGISTER_FAST_TEST (vdev_autotest,NOHUGE_OK ,ASAN_OK , test_vdev);
app/test/test_version.c +1 -1
@@ -25,4 +25,4 @@ test_version(void)return 0 ; } -REGISTER_FAST_TEST (version_autotest, true, true, test_version); +REGISTER_FAST_TEST (version_autotest,NOHUGE_OK ,ASAN_OK , test_version);
buildtools/get-test-suites.py +1 -1
@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}" for fname in input_list: with open(fname, "r", encoding="utf-8") as f:
doc/guides/contributing/unit_test.rst +6 -4
@@ -188,9 +188,11 @@ There are two important functions for interacting with the test harness: The test is automatically added to the Meson test suite `<MESON_SUITE>` by this macro. Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``. **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different, - in that it takes two additional parameters, - specifying whether the test can be run using ``--no-huge``, - and whether the test can be run using Address Sanitization (ASAN) + in that it takes two additional parameters before the function name: + the hugepage requirement (``NOHUGE_OK`` if the test can run without hugepages, + or ``NOHUGE_SKIP`` if hugepages are required), + and Address Sanitizer compatibility (``ASAN_OK`` if the test can run with ASan enabled, + or ``ASAN_SKIP`` if it cannot). ``unit_test_suite_runner(struct unit_test_suite *)`` Returns a runner for a full test suite object,
@@ -318,7 +320,7 @@ of the unit test suite structure, for example: return ret; } - REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests); + REGISTER_FAST_TEST(example_autotest, NOHUGE_OK, ASAN_OK, example_tests); Designing a test
Signature · 1 line
2.51.0
PATCH v3 2/11 app/test: fix undefined behaviour in red autotest
In reply to Bruce RichardsonThe shift of a negative number (or very large positive) is undefined behaviour which causes errors when run with UBSan. Fix this by making the behaviour explicit for the edge case of n being zero in the calculation.
--- lib/sched/rte_red.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
lib/sched/rte_red.h +8 -1
@@ -172,8 +172,15 @@ __rte_red_calc_qempty_factor(uint8_t wq_log2, uint16_t m) f = (n >>6 ) &0xf ; n >>=10 ; -if (n <RTE_RED_SCALING ) +if (n <RTE_RED_SCALING ) { +/* When n == 0, no rounding or shifting needed. +* For n > 0, add 2^(n-1) for rounding before right shift. +* This avoids UB from (1 << -1) when n == 0. +*/ +if (n ==0 ) +return (uint16_t ) rte_red_pow2_frac_inv[f];return (uint16_t ) ((rte_red_pow2_frac_inv[f] + (1 << (n -1 ))) >> n); + }return 0 ; }
Signature · 1 line
2.51.0
PATCH v3 3/11 app/test: reduce duration of secondary timer test
In reply to Bruce RichardsonReduce the timer duration and the primary wait duration in the secondary process timer autotest. This should help ensure it doesn't time out what run in a CI environment.
--- app/test/test_timer_secondary.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
app/test/test_timer_secondary.c +3 -3
@@ -162,7 +162,7 @@ test_timer_secondary(void) ret =timer_secondary_spawn_wait (*sec_lcorep);TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); -rte_delay_ms (2000 ); +rte_delay_ms (500 ); test_info->exit_flag =1 ;rte_eal_wait_lcore (*mgr_lcorep);
@@ -189,8 +189,8 @@ test_timer_secondary(void)rte_timer_init (tim); -/* generate timeouts between 10 and 160 ms */ - timeout_ms = ((rte_rand () &0xF ) +1 ) *10 ; +/* generate timeouts between 10 and 80 ms */ + timeout_ms = ((rte_rand () &0x7 ) +1 ) *10 ; ticks = timeout_ms *rte_get_timer_hz () /MSECPERSEC ; ret = rte_timer_alt_reset(test_info->timer_data_id,
Signature · 1 line
2.51.0
PATCH v3 4/11 app/test: fix timer loop hang on secondary process failure
In reply to Bruce RichardsonWhen the secondary process run from timer_secontary_autotest fails, the timer loop is never stopped so the whole process hangs until timeout. Fix this by setting the stop flag before checking for success or failure of the secondary process.
--- app/test/test_timer_secondary.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
app/test/test_timer_secondary.c +3 -2
@@ -160,11 +160,12 @@ test_timer_secondary(void)TEST_ASSERT_SUCCESS (ret,"Failed to launch timer manage loop" ); ret =timer_secondary_spawn_wait (*sec_lcorep); -TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); +/* must set exit flag even on error case, so check ret later */ rte_delay_ms (500 ); - test_info->exit_flag =1 ; + +TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" );rte_eal_wait_lcore (*mgr_lcorep);#ifdef RTE_LIBRTE_TIMER_DEBUG
Signature · 1 line
2.51.0
PATCH v3 5/11 eal: add internal APIs to query loaded driver paths
In reply to Bruce RichardsonAdd APIs for internal DPDK use to allow querying the paths of drivers loaded into the running instance.
--- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++++--- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 4 deletions(-)
lib/eal/common/eal_common_options.c +50 -4
@@ -263,6 +263,7 @@ struct shared_driver {char name[PATH_MAX ];void * lib_handle; +bool from_cmdline;/**< true if from -d flag, false if driver found in a directory */ };/* List of external loadable drivers */
@@ -533,7 +534,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) }static int -eal_plugin_add (const char *path) +eal_plugin_add (const char *path,bool from_cmdline) {struct shared_driver *solib;
@@ -544,6 +545,7 @@ eal_plugin_add(const char *path) }memset (solib,0 ,sizeof (*solib));strlcpy (solib->name, path,PATH_MAX ); + solib->from_cmdline = from_cmdline;TAILQ_INSERT_TAIL (&solib_list, solib, next);return 0 ;
@@ -595,7 +597,7 @@ eal_plugindir_init(const char *path)if (!(stat (sopath, &sb) ==0 &&S_ISREG (sb.st_mode)))continue ; -if (eal_plugin_add (sopath) ==-1 ) +if (eal_plugin_add (sopath, false) ==-1 )break ; }
@@ -727,7 +729,7 @@ eal_plugins_init(void) *default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 && S_ISDIR(sb.st_mode)) - eal_plugin_add(default_solib_dir); +eal_plugin_add (default_solib_dir, false); TAILQ_FOREACH(solib, &solib_list, next) {
@@ -751,6 +753,50 @@ eal_plugins_init(void) }#endif +RTE_EXPORT_SYMBOL (rte_eal_driver_path_next) +const char * +rte_eal_driver_path_next (const char *start,bool cmdline_only) +{ +struct shared_driver *solib; + +if (start ==NULL ) { + solib =TAILQ_FIRST (&solib_list); + }else { +/* Find the current entry based on the name string */ + TAILQ_FOREACH(solib, &solib_list, next) { +if (start == solib->name) { + solib =TAILQ_NEXT (solib, next); +break ; + } + } +if (solib ==NULL ) +return NULL ; + } + +/* Skip entries that were expanded from directories if cmdline_only is true */ +if (cmdline_only) { +while (solib !=NULL && !solib->from_cmdline) + solib =TAILQ_NEXT (solib, next); + } + +return solib ? solib->name :NULL ; +} + +RTE_EXPORT_SYMBOL (rte_eal_driver_path_count) +unsigned int +rte_eal_driver_path_count (bool cmdline_only) +{ +struct shared_driver *solib; +unsigned int count =0 ; + + TAILQ_FOREACH(solib, &solib_list, next) { +if (!cmdline_only || solib->from_cmdline) + count++; + } + +return count; +} +/* * Parse the coremask given as argument (hexadecimal string) and fill * the global configuration (core role and core count) with the parsed
@@ -1929,7 +1975,7 @@ eal_parse_args(void)return -1 ;/* driver loading options */ TAILQ_FOREACH(arg, &args.driver_path, next) -if (eal_plugin_add (arg->arg) <0 ) +if (eal_plugin_add (arg->arg, true) <0 )return -1 ;if (remap_lcores && args.remap_lcore_ids != (void *)1 ) {
lib/eal/include/rte_eal.h +52 -0
58 lines not on this page · raw message
Signature · 1 line
2.51.0
Re: [PATCH v3 05/11] eal: add internal APIs to query loaded driver paths
lib/eal/common/eal_common_options.c eal_plugins_init(void) · line 761
Quoted 6 lines · On Mon, 8 Dec 2025 11:52:39 +0000 Bruce Richardson…
lib/eal/common/eal_common_options.c +5
-0+RTE_EXPORT_SYMBOL (rte_eal_driver_path_next) +const char * +rte_eal_driver_path_next (const char *start,bool cmdline_only) +{ +
Shouldn't this be RTE_EXPORT_INTERNAL_SYMBOL
Re: [PATCH v3 05/11] eal: add internal APIs to query loaded driver paths
Quoted 11 lines · Stephen Hemminger
lib/eal/common/eal_common_options.c eal_plugins_init(void) · line 761
Quoted 6 lines · On Mon, 8 Dec 2025 11:52:39 +0000 Bruce Richardson…
lib/eal/common/eal_common_options.c +5
-0+RTE_EXPORT_SYMBOL (rte_eal_driver_path_next) +const char * +rte_eal_driver_path_next (const char *start,bool cmdline_only) +{ +Shouldn't this be
RTE_EXPORT_INTERNAL_SYMBOL
Yes, will fix.
PATCH v3 6/11 app/test: pass loaded driver info to secondary procs
In reply to Bruce RichardsonFor unit tests which run secondary processes, allow passing the driver paths used by the primary process to that secondary. This allows use of mempools in those secondary tests. Without this, any tests using mempools in secondary process will fail in shared builds.
--- app/test/process.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
app/test/process.h +27 -1
@@ -18,6 +18,7 @@#include <rte_string_fns.h> /* strlcpy */ #include <rte_devargs.h> +#include <rte_eal.h> #ifdef RTE_EXEC_ENV_FREEBSD #define self "curproc"
@@ -36,6 +37,7 @@ extern uint16_t flag_for_send_pkts;#endif #define PREFIX_ALLOW "--allow=" +#define PREFIX_DRIVER_PATH "--driver-path="static int add_parameter_allow (char **argv,int max_capacity)
@@ -63,6 +65,23 @@ add_parameter_allow(char **argv, int max_capacity)return count; } +static int +add_parameter_driver_path (char **argv,int max_capacity) +{ +const char *driver_path; +int count =0 ; + + RTE_EAL_DRIVER_PATH_FOREACH(driver_path, true) { +if (asprintf (&argv[count],PREFIX_DRIVER_PATH "%s" , driver_path) <0 ) +break ; + +if (++count == max_capacity) +break ; + } + +return count; +} +/* * launches a second copy of the test process using the given argv parameters, * which should include argv[0] as the process name. To identify in the
@@ -75,6 +94,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)int num =0 ;char **argv_cpy;int allow_num; +int driver_path_num;int argv_num;int i, status;char path[32 ];
@@ -90,7 +110,8 @@ process_dup(const char *const argv[], int numargs, const char *env_value)return -1 ; else if (pid == 0) { allow_num =rte_devargs_type_count (RTE_DEVTYPE_ALLOWED ); - argv_num = numargs + allow_num +1 ; + driver_path_num =rte_eal_driver_path_count (true); + argv_num = numargs + allow_num + driver_path_num +1 ; argv_cpy =calloc (argv_num,sizeof (char *));if (!argv_cpy)rte_panic ("Memory allocation failed\n" );
@@ -105,6 +126,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value) num =add_parameter_allow (&argv_cpy[i], allow_num); num += numargs; +if (driver_path_num >0 ) { +int added =add_parameter_driver_path (&argv_cpy[num], driver_path_num); + num += added; + } +#ifdef RTE_EXEC_ENV_LINUX {const char *procdir ="/proc/" self"/fd/" ;
Signature · 1 line
2.51.0
PATCH v3 7/11 app/test: skip power capabilities test if unsupported
In reply to Bruce RichardsonIf the power subsystem cannot be initialized e.g. due to not being root, skip the capabilities test, rather than failing it.
--- app/test/test_power_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_power_cpufreq.c +1 -1
@@ -661,7 +661,7 @@ test_power_caps(void)"correctly(APCI cpufreq) or operating in another valid " "Power management environment\n", TEST_POWER_LCORE_ID);rte_power_unset_env (); -return -1 ; +return TEST_SKIPPED ; } ret =rte_power_get_capabilities (TEST_POWER_LCORE_ID , &caps);
Signature · 1 line
2.51.0
PATCH v3 8/11 app/test: add some unattached tests to fast-test suite
In reply to Bruce RichardsonThere are quite a number of test cases defined which are not present in any test-suite. Meson warns about these on build, so reduce the warnings by adding external-mem, ipsec-sad, power-caps and secondary timer test cases to the fast-test suite.
--- app/test/test_external_mem.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_timer_secondary.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
app/test/test_external_mem.c +1 -1
@@ -587,4 +587,4 @@ test_external_mem(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (external_mem_autotest, test_external_mem); +REGISTER_FAST_TEST (external_mem_autotest,NOHUGE_SKIP ,ASAN_OK , test_external_mem);
app/test/test_ipsec_sad.c +1 -1
@@ -899,4 +899,4 @@ test_ipsec_sad(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (ipsec_sad_autotest, test_ipsec_sad); +REGISTER_FAST_TEST (ipsec_sad_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec_sad);
app/test/test_power_cpufreq.c +1 -1
@@ -679,4 +679,4 @@ test_power_caps(void)#endif REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq); -REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps); +REGISTER_FAST_TEST (power_caps_autotest,NOHUGE_OK ,ASAN_OK , test_power_caps);
app/test/test_timer_secondary.c +1 -1
@@ -225,4 +225,4 @@ test_timer_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (timer_secondary_autotest, test_timer_secondary); +REGISTER_FAST_TEST (timer_secondary_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_timer_secondary);
Signature · 1 line
2.51.0
PATCH v3 9/11 app/test: add tests to driver test suite
In reply to Bruce RichardsonA number of eventdev, cryptodev and ethdev tests require devices to be present in order to run so add them to the "driver" suite of tests.
--- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 ++-- app/test/test_event_timer_adapter.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-)
app/test/test_cryptodev_crosscheck.c +1 -1
@@ -1047,4 +1047,4 @@ test_crosscheck(void)return ret; } -REGISTER_TEST_COMMAND (cryptodev_crosscheck, test_crosscheck); +REGISTER_DRIVER_TEST (cryptodev_crosscheck, test_crosscheck);
app/test/test_ethdev_api.c +1 -1
@@ -185,4 +185,4 @@ test_ethdev_api(void)/* TODO: Make part of the fast test suite, `REGISTER_FAST_TEST()`, * when all drivers complies to the queue state requirement */ -REGISTER_TEST_COMMAND (ethdev_api, test_ethdev_api); +REGISTER_DRIVER_TEST (ethdev_api, test_ethdev_api);
app/test/test_event_crypto_adapter.c +1 -1
@@ -1625,5 +1625,5 @@ test_event_crypto_adapter(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_crypto_adapter_autotest, +REGISTER_DRIVER_TEST (event_crypto_adapter_autotest, test_event_crypto_adapter);
app/test/test_event_eth_rx_adapter.c +2 -2
@@ -1555,7 +1555,7 @@ test_event_eth_rx_intr_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_eth_rx_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_adapter_autotest, test_event_eth_rx_adapter_common); -REGISTER_TEST_COMMAND (event_eth_rx_intr_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_intr_adapter_autotest, test_event_eth_rx_intr_adapter_common);
app/test/test_event_timer_adapter.c +1 -1
@@ -2036,4 +2036,4 @@ test_event_timer_adapter_func(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_timer_adapter_test, test_event_timer_adapter_func); +REGISTER_DRIVER_TEST (event_timer_adapter_test, test_event_timer_adapter_func);
app/test/test_security_inline_macsec.c +1 -1
@@ -2584,4 +2584,4 @@ test_inline_macsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_macsec_autotest, test_inline_macsec); +REGISTER_DRIVER_TEST (inline_macsec_autotest, test_inline_macsec);
app/test/test_security_inline_proto.c +3 -3
@@ -3616,6 +3616,6 @@ test_event_inline_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_ipsec_autotest, test_inline_ipsec); -REGISTER_TEST_COMMAND (inline_ipsec_sg_autotest, test_inline_ipsec_sg); -REGISTER_TEST_COMMAND (event_inline_ipsec_autotest, test_event_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_autotest, test_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_sg_autotest, test_inline_ipsec_sg); +REGISTER_DRIVER_TEST (event_inline_ipsec_autotest, test_event_inline_ipsec);
Signature · 1 line
2.51.0
PATCH v3 10/11 buildtools/get-test-suites: suppress empty output
In reply to Bruce RichardsonIf there are no tests which are not assigned to a test suite, omit the line printing the non_suite_tests. This avoid having error messages from meson about test "" not being in any test suite.
--- buildtools/get-test-suites.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
buildtools/get-test-suites.py +2 -1
@@ -38,4 +38,5 @@ def get_fast_test_params(test_name, ln): for suite in test_suites.keys(): print(f"{suite}={','.join(test_suites[suite])}") -print(f"non_suite_tests={','.join(non_suite_tests)}") +if non_suite_tests: + print(f"non_suite_tests={','.join(non_suite_tests)}")
Signature · 1 line
2.51.0
PATCH v3 11/11 app/test: move red autotest to attic
In reply to Bruce RichardsonDefine an "attic" test suite for unstable or unmaintained tests, and move the red autotest to that suite.
--- app/test/test.h | 4 ++++ app/test/test_red.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
app/test/test.h +4 -0
@@ -218,5 +218,9 @@ void add_test_command(struct test_command *t);*/ #define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) +/* For unstable or experimental tests cases which need work or which may be removed +* in the future. +*/ +#define REGISTER_ATTIC_TEST REGISTER_TEST_COMMAND#endif
app/test/test_red.c +1 -1
@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_ATTIC_TEST (red_autotest, test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
Signature · 1 line
2.51.0
Re: [PATCH v3 00/11] Assign all unit tests to suites
In reply to Bruce RichardsonQuoted 155 lines · On Mon, 8 Dec 2025 11:52:34 +0000 Bruce Richardson…
Categorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and addred_autotestto it.V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached testsBruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to atticapp/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 313 insertions(+), 157 deletions(-)
Quoted 3 lines
--
2.51.0
Overall looks good, one comment is to try and make sure the new functions are internal only? or experimental?
Re: [PATCH v3 00/11] Assign all unit tests to suites
Quoted 158 lines · Stephen Hemminger
Quoted 155 lines · On Mon, 8 Dec 2025 11:52:34 +0000 Bruce Richardson…
Categorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and addred_autotestto it.V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached testsBruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to atticapp/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 52 +++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 313 insertions(+), 157 deletions(-)
Quoted 7 lines
Quoted 3 lines
--
2.51.0Overall looks good, one comment is to try and make sure the new functions are internal only? or experimental?
I think internal-only. I've marked them in doxygen as internal-only but did not put it in the export line. I don't see the need for apps to use these APIs, so let's limit the scope as much as possible, because we can always open it up further later.
/Bruce
v4 cover Assign all unit tests to suites
In reply to Bruce RichardsonCategorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V4:
- export new internal functions using proper EXPORT_INTERNAL macros (patch 5)
V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and add red_autotest to it.
V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached tests
Bruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to attic
app/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 54 ++++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 315 insertions(+), 157 deletions(-)
--
2.51.0
PATCH v4 1/11 app/test: make parameters clearer when adding fast tests
For the fast tests, we have two extra parameters specifying when the test can be run without hugepages or using ASan. The true/false nature of these parameters is not very clear, so change things so that they are explicitly specified as NOHUGE_OK/NOHUGE_SKIP and ASAN_OK/ASAN_SKIP instead. Explicitly validate the options in the meson.build files, rather than just checking for one of the pair of options - which can hide errors.
--- app/test/suites/meson.build | 14 ++++++++++++-- app/test/test.h | 9 ++++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +++--- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++++++++------------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 ++-- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 ++-- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++++---- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 ++-- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_trace.c | 2 +- app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 2 +- doc/guides/contributing/unit_test.rst | 10 ++++++---- 106 files changed, 148 insertions(+), 129 deletions(-)
app/test/suites/meson.build +12 -2
@@ -67,9 +67,19 @@ foreach suite:test_suites # special fast-test handling here foreach t: suite_tests params = t.split(':') + # check for valid options for asan and nohuge + if params[1] != 'NOHUGE_OK' and params[1] != 'NOHUGE_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be NOHUGE_OK or NOHUGE_SKIP.' + .format(params[1], params[0])) + endif + if params[2] != 'ASAN_OK' and params[2] != 'ASAN_SKIP' + error('Invalid parameter "@0@" for test "@1@". Must be ASAN_OK or ASAN_SKIP.' + .format(params[2], params[0])) + endif + test_name = params[0] - nohuge = params[1] == 'true' - asan = params[2] == 'true' + nohuge = params[1] == 'NOHUGE_OK' + asan = params[2] == 'ASAN_OK' test_args = [] if nohuge
app/test/test.h +8 -1
@@ -207,9 +207,16 @@ void add_test_command(struct test_command *t);/* Register a test function as a particular type. * These can be used to build up test suites automatically */ -#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func)#define REGISTER_PERF_TEST REGISTER_TEST_COMMAND#define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND#define REGISTER_STRESS_TEST REGISTER_TEST_COMMAND +/* fast tests are a bit special. They can be specified as supporting running without +* hugepages and/or under ASan. +* - The "no_huge" options should be passed as either "NOHUGE_OK" or "NOHUGE_SKIP" +* - The "ASan" options should be passed as either "ASAN_OK" or "ASAN_SKIP" +*/ +#define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) + +#endif
app/test/test_acl.c +1 -1
@@ -1748,4 +1748,4 @@ test_acl(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (acl_autotest, true, true, test_acl); +REGISTER_FAST_TEST (acl_autotest,NOHUGE_OK ,ASAN_OK , test_acl);
app/test/test_alarm.c +1 -1
@@ -76,4 +76,4 @@ test_alarm(void)return 0 ; } -REGISTER_FAST_TEST (alarm_autotest, true, true, test_alarm); +REGISTER_FAST_TEST (alarm_autotest,NOHUGE_OK ,ASAN_OK , test_alarm);
app/test/test_argparse.c +1 -1
@@ -1618,4 +1618,4 @@ test_argparse(void)return unit_test_suite_runner (&argparse_test_suite); } -REGISTER_FAST_TEST (argparse_autotest, true, true, test_argparse); +REGISTER_FAST_TEST (argparse_autotest,NOHUGE_OK ,ASAN_OK , test_argparse);
app/test/test_atomic.c +1 -1
@@ -632,5 +632,5 @@ test_atomic(void) return 0; } -REGISTER_FAST_TEST (atomic_autotest, false, true, test_atomic); +REGISTER_FAST_TEST (atomic_autotest,NOHUGE_SKIP ,ASAN_OK , test_atomic);#endif /* RTE_TOOLCHAIN_MSVC */
app/test/test_bitcount.c +1 -1
@@ -171,4 +171,4 @@ test_bitcount(void)return unit_test_suite_runner (&bitcount_test_suite); } -REGISTER_FAST_TEST (bitcount_autotest, true, true, test_bitcount); +REGISTER_FAST_TEST (bitcount_autotest,NOHUGE_OK ,ASAN_OK , test_bitcount);
app/test/test_bitmap.c +1 -1
@@ -269,4 +269,4 @@ test_bitmap(void)return test_bitmap_all_set (); } -REGISTER_FAST_TEST (bitmap_autotest, true, true, test_bitmap); +REGISTER_FAST_TEST (bitmap_autotest,NOHUGE_OK ,ASAN_OK , test_bitmap);
app/test/test_bitops.c +1 -1
@@ -438,4 +438,4 @@ test_bitops(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (bitops_autotest, true, true, test_bitops); +REGISTER_FAST_TEST (bitops_autotest,NOHUGE_OK ,ASAN_OK , test_bitops);
app/test/test_bitratestats.c +1 -1
@@ -249,4 +249,4 @@ test_bitratestats(void) {return unit_test_suite_runner (&bitratestats_testsuite); } -REGISTER_FAST_TEST (bitratestats_autotest, true, true, test_bitratestats); +REGISTER_FAST_TEST (bitratestats_autotest,NOHUGE_OK ,ASAN_OK , test_bitratestats);
app/test/test_bitset.c +1 -1
@@ -909,4 +909,4 @@ test_bitset(void)return unit_test_suite_runner (&bitset_tests); } -REGISTER_FAST_TEST (bitset_autotest, true, true, test_bitset); +REGISTER_FAST_TEST (bitset_autotest,NOHUGE_OK ,ASAN_OK , test_bitset);
app/test/test_bpf.c +3 -3
@@ -3278,7 +3278,7 @@ test_bpf(void)#endif /* !RTE_LIB_BPF */ -REGISTER_FAST_TEST (bpf_autotest, true, true, test_bpf); +REGISTER_FAST_TEST (bpf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf);#ifdef TEST_BPF_ELF_LOAD
@@ -3751,7 +3751,7 @@ test_bpf_elf(void)#endif /* !TEST_BPF_ELF_LOAD */ -REGISTER_FAST_TEST (bpf_elf_autotest, true, true, test_bpf_elf); +REGISTER_FAST_TEST (bpf_elf_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_elf);#ifndef RTE_HAS_LIBPCAP
@@ -3969,4 +3969,4 @@ test_bpf_convert(void)#endif /* RTE_HAS_LIBPCAP */ -REGISTER_FAST_TEST (bpf_convert_autotest, true, true, test_bpf_convert); +REGISTER_FAST_TEST (bpf_convert_autotest,NOHUGE_OK ,ASAN_OK , test_bpf_convert);
app/test/test_byteorder.c +1 -1
@@ -63,4 +63,4 @@ test_byteorder(void)return 0 ; } -REGISTER_FAST_TEST (byteorder_autotest, true, true, test_byteorder); +REGISTER_FAST_TEST (byteorder_autotest,NOHUGE_OK ,ASAN_OK , test_byteorder);
app/test/test_cfgfile.c +1 -1
@@ -399,4 +399,4 @@ test_cfgfile(void)return unit_test_suite_runner (&test_cfgfile_suite); } -REGISTER_FAST_TEST (cfgfile_autotest, true, true, test_cfgfile); +REGISTER_FAST_TEST (cfgfile_autotest,NOHUGE_OK ,ASAN_OK , test_cfgfile);
app/test/test_cksum.c +1 -1
@@ -267,4 +267,4 @@ test_cksum(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (cksum_autotest, true, true, test_cksum); +REGISTER_FAST_TEST (cksum_autotest,NOHUGE_OK ,ASAN_OK , test_cksum);
app/test/test_cmdline.c +1 -1
@@ -60,4 +60,4 @@ test_cmdline(void)return 0 ; } -REGISTER_FAST_TEST (cmdline_autotest, true, true, test_cmdline); +REGISTER_FAST_TEST (cmdline_autotest,NOHUGE_OK ,ASAN_OK , test_cmdline);
app/test/test_common.c +1 -1
@@ -354,4 +354,4 @@ test_common(void)return ret; } -REGISTER_FAST_TEST (common_autotest, true, true, test_common); +REGISTER_FAST_TEST (common_autotest,NOHUGE_OK ,ASAN_OK , test_common);
app/test/test_compressdev.c +1 -1
@@ -4255,4 +4255,4 @@ test_compressdev(void)return unit_test_suite_runner (&compressdev_testsuite); } -REGISTER_FAST_TEST (compressdev_autotest, false, true, test_compressdev); +REGISTER_FAST_TEST (compressdev_autotest,NOHUGE_SKIP ,ASAN_OK , test_compressdev);
app/test/test_cpuflags.c +1 -1
@@ -327,4 +327,4 @@ test_cpuflags(void)return 0 ; } -REGISTER_FAST_TEST (cpuflags_autotest, true, true, test_cpuflags); +REGISTER_FAST_TEST (cpuflags_autotest,NOHUGE_OK ,ASAN_OK , test_cpuflags);
app/test/test_crc.c +1 -1
@@ -140,4 +140,4 @@ crc_autotest(void)return ret; } -REGISTER_FAST_TEST (crc_autotest, true, true, crc_autotest); +REGISTER_FAST_TEST (crc_autotest,NOHUGE_OK ,ASAN_OK , crc_autotest);
app/test/test_cycles.c +1 -1
@@ -53,4 +53,4 @@ test_user_delay_us(void)return 0 ; } -REGISTER_FAST_TEST (user_delay_us, true, true, test_user_delay_us); +REGISTER_FAST_TEST (user_delay_us,NOHUGE_OK ,ASAN_OK , test_user_delay_us);
app/test/test_debug.c +1 -1
@@ -183,4 +183,4 @@ test_debug(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (debug_autotest, true, true, test_debug); +REGISTER_FAST_TEST (debug_autotest,NOHUGE_OK ,ASAN_OK , test_debug);
app/test/test_devargs.c +1 -1
@@ -320,4 +320,4 @@ test_devargs(void)return 0 ; } -REGISTER_FAST_TEST (devargs_autotest, true, true, test_devargs); +REGISTER_FAST_TEST (devargs_autotest,NOHUGE_OK ,ASAN_OK , test_devargs);
app/test/test_dispatcher.c +1 -1
@@ -1053,4 +1053,4 @@ test_dispatcher(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (dispatcher_autotest, false, true, test_dispatcher); +REGISTER_FAST_TEST (dispatcher_autotest,NOHUGE_SKIP ,ASAN_OK , test_dispatcher);
app/test/test_distributor.c +1 -1
@@ -953,4 +953,4 @@ test_distributor(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (distributor_autotest, false, true, test_distributor); +REGISTER_FAST_TEST (distributor_autotest,NOHUGE_SKIP ,ASAN_OK , test_distributor);
app/test/test_eal_flags.c +12 -12
@@ -1692,15 +1692,15 @@ test_memory_flags(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_flags_c_opt_autotest, false, false, test_missing_c_flag); -REGISTER_FAST_TEST (eal_flags_main_opt_autotest, false, false, test_main_lcore_flag); -REGISTER_FAST_TEST (eal_flags_n_opt_autotest, false, false, test_invalid_n_flag); -REGISTER_FAST_TEST (eal_flags_hpet_autotest, false, false, test_no_hpet_flag); -REGISTER_FAST_TEST (eal_flags_no_huge_autotest, false, false, test_no_huge_flag); -REGISTER_FAST_TEST (eal_flags_a_opt_autotest, false, false, test_allow_flag); -REGISTER_FAST_TEST (eal_flags_b_opt_autotest, false, false, test_invalid_b_flag); -REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag); -REGISTER_FAST_TEST (eal_flags_r_opt_autotest, false, false, test_invalid_r_flag); -REGISTER_FAST_TEST (eal_flags_mem_autotest, false, false, test_memory_flags); -REGISTER_FAST_TEST (eal_flags_file_prefix_autotest, false, false, test_file_prefix); -REGISTER_FAST_TEST (eal_flags_misc_autotest, false, false, test_misc_flags); +REGISTER_FAST_TEST (eal_flags_c_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_missing_c_flag); +REGISTER_FAST_TEST (eal_flags_main_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_main_lcore_flag); +REGISTER_FAST_TEST (eal_flags_n_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_n_flag); +REGISTER_FAST_TEST (eal_flags_hpet_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_hpet_flag); +REGISTER_FAST_TEST (eal_flags_no_huge_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_no_huge_flag); +REGISTER_FAST_TEST (eal_flags_a_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_allow_flag); +REGISTER_FAST_TEST (eal_flags_b_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_b_flag); +REGISTER_FAST_TEST (eal_flags_vdev_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_vdev_flag); +REGISTER_FAST_TEST (eal_flags_r_opt_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_invalid_r_flag); +REGISTER_FAST_TEST (eal_flags_mem_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_memory_flags); +REGISTER_FAST_TEST (eal_flags_file_prefix_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_file_prefix); +REGISTER_FAST_TEST (eal_flags_misc_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_misc_flags);
app/test/test_eal_fs.c +1 -1
@@ -185,4 +185,4 @@ test_eal_fs(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eal_fs_autotest, true, true, test_eal_fs); +REGISTER_FAST_TEST (eal_fs_autotest,NOHUGE_OK ,ASAN_OK , test_eal_fs);
app/test/test_errno.c +1 -1
@@ -94,4 +94,4 @@ test_errno(void)return 0 ; } -REGISTER_FAST_TEST (errno_autotest, true, true, test_errno); +REGISTER_FAST_TEST (errno_autotest,NOHUGE_OK ,ASAN_OK , test_errno);
app/test/test_ethdev_link.c +1 -1
@@ -172,4 +172,4 @@ test_link_status(void)return unit_test_suite_runner (&link_status_testsuite); } -REGISTER_FAST_TEST (ethdev_link_status, true, true, test_link_status); +REGISTER_FAST_TEST (ethdev_link_status,NOHUGE_OK ,ASAN_OK , test_link_status);
app/test/test_event_eth_tx_adapter.c +1 -1
@@ -1010,4 +1010,4 @@ test_event_eth_tx_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_eth_tx_adapter_autotest, false, true, test_event_eth_tx_adapter_common); +REGISTER_FAST_TEST (event_eth_tx_adapter_autotest,NOHUGE_SKIP ,ASAN_OK , test_event_eth_tx_adapter_common);
app/test/test_event_ring.c +1 -1
@@ -256,4 +256,4 @@ test_event_ring(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (event_ring_autotest, true, true, test_event_ring); +REGISTER_FAST_TEST (event_ring_autotest,NOHUGE_OK ,ASAN_OK , test_event_ring);
app/test/test_event_vector_adapter.c +1 -1
@@ -709,5 +709,5 @@ test_event_vector_adapter(void)#endif /* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(event_vector_adapter_autotest, true, true, test_event_vector_adapter); +* REGISTER_FAST_TEST(event_vector_adapter_autotest, NOHUGE_OK, ASAN_OK, test_event_vector_adapter); */
app/test/test_eventdev.c +2 -2
@@ -1529,10 +1529,10 @@ test_eventdev_selftest_cn20k(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (eventdev_common_autotest, true, true, test_eventdev_common); +REGISTER_FAST_TEST (eventdev_common_autotest,NOHUGE_OK ,ASAN_OK , test_eventdev_common);#ifndef RTE_EXEC_ENV_WINDOWS -REGISTER_FAST_TEST (eventdev_selftest_sw, true, true, test_eventdev_selftest_sw); +REGISTER_FAST_TEST (eventdev_selftest_sw,NOHUGE_OK ,ASAN_OK , test_eventdev_selftest_sw);REGISTER_DRIVER_TEST (eventdev_selftest_octeontx, test_eventdev_selftest_octeontx);REGISTER_DRIVER_TEST (eventdev_selftest_dpaa2, test_eventdev_selftest_dpaa2);REGISTER_DRIVER_TEST (eventdev_selftest_dlb2, test_eventdev_selftest_dlb2);
app/test/test_fbarray.c +1 -1
@@ -933,4 +933,4 @@ test_fbarray(void)return unit_test_suite_runner (&fbarray_test_suite); } -REGISTER_FAST_TEST (fbarray_autotest, true, true, test_fbarray); +REGISTER_FAST_TEST (fbarray_autotest,NOHUGE_OK ,ASAN_OK , test_fbarray);
app/test/test_fib.c +1 -1
@@ -629,5 +629,5 @@ test_slow_fib(void)return unit_test_suite_runner (&fib_slow_tests); } -REGISTER_FAST_TEST (fib_autotest, true, true, test_fib); +REGISTER_FAST_TEST (fib_autotest,NOHUGE_OK ,ASAN_OK , test_fib);REGISTER_PERF_TEST (fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +1 -1
@@ -640,5 +640,5 @@ test_slow_fib6(void)return unit_test_suite_runner (&fib6_slow_tests); } -REGISTER_FAST_TEST (fib6_autotest, true, true, test_fib6); +REGISTER_FAST_TEST (fib6_autotest,NOHUGE_OK ,ASAN_OK , test_fib6);REGISTER_PERF_TEST (fib6_slow_autotest, test_slow_fib6);
app/test/test_func_reentrancy.c +1 -1
@@ -511,4 +511,4 @@ test_func_reentrancy(void)return 0 ; } -REGISTER_FAST_TEST (func_reentrancy_autotest, false, true, test_func_reentrancy); +REGISTER_FAST_TEST (func_reentrancy_autotest,NOHUGE_SKIP ,ASAN_OK , test_func_reentrancy);
app/test/test_graph.c +2 -2
@@ -1150,7 +1150,7 @@ graph_autotest_fn(void)return unit_test_suite_runner (&graph_testsuite); } -REGISTER_FAST_TEST (graph_autotest, true, true, graph_autotest_fn); +REGISTER_FAST_TEST (graph_autotest,NOHUGE_OK ,ASAN_OK , graph_autotest_fn);static int test_node_list_dump (void )
@@ -1162,4 +1162,4 @@ test_node_list_dump(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (node_list_dump, true, true, test_node_list_dump); +REGISTER_FAST_TEST (node_list_dump,NOHUGE_OK ,ASAN_OK , test_node_list_dump);
app/test/test_graph_feature_arc.c +1 -1
@@ -1368,6 +1368,6 @@ graph_feature_arc_autotest_fn(void) return unit_test_suite_runner(&graph_feature_arc_testsuite); } -REGISTER_FAST_TEST (graph_feature_arc_autotest, true, true, graph_feature_arc_autotest_fn); +REGISTER_FAST_TEST (graph_feature_arc_autotest,NOHUGE_OK ,ASAN_OK , graph_feature_arc_autotest_fn);#endif /* !RTE_EXEC_ENV_WINDOWS */
app/test/test_hash.c +1 -1
@@ -2405,4 +2405,4 @@ test_hash(void)return 0 ; } -REGISTER_FAST_TEST (hash_autotest, true, true, test_hash); +REGISTER_FAST_TEST (hash_autotest,NOHUGE_OK ,ASAN_OK , test_hash);
app/test/test_hash_readwrite.c +1 -1
@@ -775,5 +775,5 @@ test_hash_rw_func_main(void)return 0 ; } -REGISTER_FAST_TEST (hash_readwrite_func_autotest, false, true, test_hash_rw_func_main); +REGISTER_FAST_TEST (hash_readwrite_func_autotest,NOHUGE_SKIP ,ASAN_OK , test_hash_rw_func_main);REGISTER_PERF_TEST (hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_interrupts.c +1 -1
@@ -594,4 +594,4 @@ test_interrupt(void)return ret; } -REGISTER_FAST_TEST (interrupt_autotest, true, true, test_interrupt); +REGISTER_FAST_TEST (interrupt_autotest,NOHUGE_OK ,ASAN_OK , test_interrupt);
app/test/test_ipfrag.c +1 -1
@@ -505,4 +505,4 @@ test_ipfrag(void) } -REGISTER_FAST_TEST (ipfrag_autotest, false, true, test_ipfrag); +REGISTER_FAST_TEST (ipfrag_autotest,NOHUGE_SKIP ,ASAN_OK , test_ipfrag);
app/test/test_ipsec.c +1 -1
@@ -2617,4 +2617,4 @@ test_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (ipsec_autotest, true, true, test_ipsec); +REGISTER_FAST_TEST (ipsec_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec);
app/test/test_kvargs.c +1 -1
@@ -364,4 +364,4 @@ test_kvargs(void)return unit_test_suite_runner (&kvargs_test_suite); } -REGISTER_FAST_TEST (kvargs_autotest, true, true, test_kvargs); +REGISTER_FAST_TEST (kvargs_autotest,NOHUGE_OK ,ASAN_OK , test_kvargs);
app/test/test_latencystats.c +1 -1
@@ -246,4 +246,4 @@ static int test_latencystats(void)return unit_test_suite_runner (&latencystats_testsuite); } -REGISTER_FAST_TEST (latencystats_autotest, true, true, test_latencystats); +REGISTER_FAST_TEST (latencystats_autotest,NOHUGE_OK ,ASAN_OK , test_latencystats);
app/test/test_lcore_var.c +1 -1
@@ -411,4 +411,4 @@ static int test_lcore_var(void)return unit_test_suite_runner (&lcore_var_testsuite); } -REGISTER_FAST_TEST (lcore_var_autotest, true, false, test_lcore_var); +REGISTER_FAST_TEST (lcore_var_autotest,NOHUGE_OK ,ASAN_SKIP , test_lcore_var);
app/test/test_lcores.c +1 -1
@@ -422,4 +422,4 @@ test_lcores(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (lcores_autotest, true, true, test_lcores); +REGISTER_FAST_TEST (lcores_autotest,NOHUGE_OK ,ASAN_OK , test_lcores);
app/test/test_logs.c +1 -1
@@ -158,4 +158,4 @@ test_logs(void)return 0 ; } -REGISTER_FAST_TEST (logs_autotest, true, true, test_logs); +REGISTER_FAST_TEST (logs_autotest,NOHUGE_OK ,ASAN_OK , test_logs);
app/test/test_lpm.c +1 -1
@@ -1584,4 +1584,4 @@ test_lpm(void)return global_status; } -REGISTER_FAST_TEST (lpm_autotest, true, true, test_lpm); +REGISTER_FAST_TEST (lpm_autotest,NOHUGE_OK ,ASAN_OK , test_lpm);
app/test/test_lpm6.c +1 -1
@@ -1767,4 +1767,4 @@ test_lpm6(void)return global_status; } -REGISTER_FAST_TEST (lpm6_autotest, true, true, test_lpm6); +REGISTER_FAST_TEST (lpm6_autotest,NOHUGE_OK ,ASAN_OK , test_lpm6);
app/test/test_malloc.c +1 -1
@@ -1166,4 +1166,4 @@ test_malloc(void)return unit_test_suite_runner (&test_suite); } -REGISTER_FAST_TEST (malloc_autotest, false, true, test_malloc); +REGISTER_FAST_TEST (malloc_autotest,NOHUGE_SKIP ,ASAN_OK , test_malloc);
app/test/test_mbuf.c +1 -1
@@ -2953,4 +2953,4 @@ test_mbuf(void) }#undef GOTO_FAIL -REGISTER_FAST_TEST (mbuf_autotest, false, true, test_mbuf); +REGISTER_FAST_TEST (mbuf_autotest,NOHUGE_SKIP ,ASAN_OK , test_mbuf);
app/test/test_mcslock.c +1 -1
@@ -241,4 +241,4 @@ test_mcslock(void)return ret; } -REGISTER_FAST_TEST (mcslock_autotest, false, true, test_mcslock); +REGISTER_FAST_TEST (mcslock_autotest,NOHUGE_SKIP ,ASAN_OK , test_mcslock);
app/test/test_member.c +1 -1
@@ -996,4 +996,4 @@ test_member(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (member_autotest, true, true, test_member); +REGISTER_FAST_TEST (member_autotest,NOHUGE_OK ,ASAN_OK , test_member);
app/test/test_memcpy.c +1 -1
@@ -129,4 +129,4 @@ test_memcpy(void)return 0 ; } -REGISTER_FAST_TEST (memcpy_autotest, true, true, test_memcpy); +REGISTER_FAST_TEST (memcpy_autotest,NOHUGE_OK ,ASAN_OK , test_memcpy);
app/test/test_memory.c +1 -1
@@ -110,4 +110,4 @@ test_memory(void)return 0 ; } -REGISTER_FAST_TEST (memory_autotest, false, true, test_memory); +REGISTER_FAST_TEST (memory_autotest,NOHUGE_SKIP ,ASAN_OK , test_memory);
app/test/test_mempool.c +1 -1
@@ -1122,4 +1122,4 @@ test_mempool(void)return ret; } -REGISTER_FAST_TEST (mempool_autotest, false, true, test_mempool); +REGISTER_FAST_TEST (mempool_autotest,NOHUGE_SKIP ,ASAN_OK , test_mempool);
app/test/test_memzone.c +1 -1
@@ -1162,4 +1162,4 @@ test_memzone(void)return 0 ; } -REGISTER_FAST_TEST (memzone_autotest, false, true, test_memzone); +REGISTER_FAST_TEST (memzone_autotest,NOHUGE_SKIP ,ASAN_OK , test_memzone);
app/test/test_meter.c +1 -1
@@ -713,4 +713,4 @@ test_meter(void) } -REGISTER_FAST_TEST (meter_autotest, true, true, test_meter); +REGISTER_FAST_TEST (meter_autotest,NOHUGE_OK ,ASAN_OK , test_meter);
app/test/test_metrics.c +1 -1
@@ -326,4 +326,4 @@ test_metrics(void)return unit_test_suite_runner (&metrics_testsuite); } -REGISTER_FAST_TEST (metrics_autotest, true, true, test_metrics); +REGISTER_FAST_TEST (metrics_autotest,NOHUGE_OK ,ASAN_OK , test_metrics);
app/test/test_mp_secondary.c +1 -1
@@ -223,4 +223,4 @@ test_mp_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (multiprocess_autotest, false, false, test_mp_secondary); +REGISTER_FAST_TEST (multiprocess_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_mp_secondary);
app/test/test_net_ether.c +1 -1
@@ -162,4 +162,4 @@ test_net_ether(void)return 0 ; } -REGISTER_FAST_TEST (net_ether_autotest, true, true, test_net_ether); +REGISTER_FAST_TEST (net_ether_autotest,NOHUGE_OK ,ASAN_OK , test_net_ether);
app/test/test_net_ip6.c +1 -1
@@ -218,4 +218,4 @@ test_net_ipv6(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (net_ipv6_autotest, true, true, test_net_ipv6); +REGISTER_FAST_TEST (net_ipv6_autotest,NOHUGE_OK ,ASAN_OK , test_net_ipv6);
app/test/test_pcapng.c +1 -1
@@ -464,4 +464,4 @@ test_pcapng(void)return unit_test_suite_runner (&test_pcapng_suite); } -REGISTER_FAST_TEST (pcapng_autotest, true, true, test_pcapng); +REGISTER_FAST_TEST (pcapng_autotest,NOHUGE_OK ,ASAN_OK , test_pcapng);
app/test/test_pdcp.c +1 -1
@@ -2388,4 +2388,4 @@ test_pdcp(void)return ret; } -REGISTER_FAST_TEST (pdcp_autotest, false, true, test_pdcp); +REGISTER_FAST_TEST (pdcp_autotest,NOHUGE_SKIP ,ASAN_OK , test_pdcp);
app/test/test_pdump.c +1 -1
@@ -219,4 +219,4 @@ test_pdump(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (pdump_autotest, true, false, test_pdump); +REGISTER_FAST_TEST (pdump_autotest,NOHUGE_OK ,ASAN_SKIP , test_pdump);
app/test/test_per_lcore.c +1 -1
@@ -118,4 +118,4 @@ test_per_lcore(void)return 0 ; } -REGISTER_FAST_TEST (per_lcore_autotest, true, true, test_per_lcore); +REGISTER_FAST_TEST (per_lcore_autotest,NOHUGE_OK ,ASAN_OK , test_per_lcore);
app/test/test_pflock.c +1 -1
@@ -194,4 +194,4 @@ test_pflock(void)return 0 ; } -REGISTER_FAST_TEST (pflock_autotest, true, true, test_pflock); +REGISTER_FAST_TEST (pflock_autotest,NOHUGE_OK ,ASAN_OK , test_pflock);
app/test/test_pie.c +1 -1
@@ -1082,6 +1082,6 @@ test_pie_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (pie_autotest, true, true, test_pie); +REGISTER_FAST_TEST (pie_autotest,NOHUGE_OK ,ASAN_OK , test_pie);REGISTER_PERF_TEST (pie_perf, test_pie_perf);REGISTER_PERF_TEST (pie_all, test_pie_all);
app/test/test_pmd_ring.c +1 -1
@@ -593,4 +593,4 @@ test_pmd_ring(void)return unit_test_suite_runner (&test_pmd_ring_suite); } -REGISTER_FAST_TEST (ring_pmd_autotest, true, true, test_pmd_ring); +REGISTER_FAST_TEST (ring_pmd_autotest,NOHUGE_OK ,ASAN_OK , test_pmd_ring);
app/test/test_pmu.c +1 -1
@@ -53,5 +53,5 @@ test_pmu(void) }/* disabled because of reported failures, waiting for a fix -* REGISTER_FAST_TEST(pmu_autotest, true, true, test_pmu); +* REGISTER_FAST_TEST(pmu_autotest, NOHUGE_OK, ASAN_OK, test_pmu); */
app/test/test_power.c +1 -1
@@ -78,4 +78,4 @@ test_power(void) }#endif -REGISTER_FAST_TEST (power_autotest, true, true, test_power); +REGISTER_FAST_TEST (power_autotest,NOHUGE_OK ,ASAN_OK , test_power);
app/test/test_power_cpufreq.c +1 -1
@@ -678,5 +678,5 @@ test_power_caps(void)#endif -REGISTER_FAST_TEST (power_cpufreq_autotest, false, true, test_power_cpufreq); +REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq);REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
@@ -303,4 +303,4 @@ test_power_intel_uncore(void) }#endif -REGISTER_FAST_TEST (power_intel_uncore_autotest, true, true, test_power_intel_uncore); +REGISTER_FAST_TEST (power_intel_uncore_autotest,NOHUGE_OK ,ASAN_OK , test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
@@ -263,4 +263,4 @@ test_power_kvm_vm(void) }#endif -REGISTER_FAST_TEST (power_kvm_vm_autotest, false, true, test_power_kvm_vm); +REGISTER_FAST_TEST (power_kvm_vm_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
@@ -35,4 +35,4 @@ test_prefetch(void)return 0 ; } -REGISTER_FAST_TEST (prefetch_autotest, true, true, test_prefetch); +REGISTER_FAST_TEST (prefetch_autotest,NOHUGE_OK ,ASAN_OK , test_prefetch);
app/test/test_ptr_compress.c +1 -1
@@ -190,4 +190,4 @@ test_ptr_compress(void)return 0 ; } -REGISTER_FAST_TEST (ptr_compress_autotest, true, true, test_ptr_compress); +REGISTER_FAST_TEST (ptr_compress_autotest,NOHUGE_OK ,ASAN_OK , test_ptr_compress);
app/test/test_rawdev.c +1 -1
@@ -74,4 +74,4 @@ test_rawdev_selftests(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (rawdev_autotest, true, true, test_rawdev_selftests); +REGISTER_FAST_TEST (rawdev_autotest,NOHUGE_OK ,ASAN_OK , test_rawdev_selftests);
app/test/test_rcu_qsbr.c +1 -1
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)return -1 ; } -REGISTER_FAST_TEST (rcu_qsbr_autotest, true, true, test_rcu_qsbr_main); +REGISTER_FAST_TEST (rcu_qsbr_autotest,NOHUGE_OK ,ASAN_OK , test_rcu_qsbr_main);
app/test/test_reorder.c +1 -1
@@ -552,4 +552,4 @@ test_reorder(void) } -REGISTER_FAST_TEST (reorder_autotest, true, true, test_reorder); +REGISTER_FAST_TEST (reorder_autotest,NOHUGE_OK ,ASAN_OK , test_reorder);
app/test/test_rib.c +1 -1
@@ -363,5 +363,5 @@ test_slow_rib(void)return unit_test_suite_runner (&rib_slow_tests); } -REGISTER_FAST_TEST (rib_autotest, true, true, test_rib); +REGISTER_FAST_TEST (rib_autotest,NOHUGE_OK ,ASAN_OK , test_rib);REGISTER_PERF_TEST (rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +1 -1
@@ -362,5 +362,5 @@ test_slow_rib6(void)return unit_test_suite_runner (&rib6_slow_tests); } -REGISTER_FAST_TEST (rib6_autotest, true, true, test_rib6); +REGISTER_FAST_TEST (rib6_autotest,NOHUGE_OK ,ASAN_OK , test_rib6);REGISTER_PERF_TEST (rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
@@ -1248,4 +1248,4 @@ test_ring(void)return -1 ; } -REGISTER_FAST_TEST (ring_autotest, true, true, test_ring); +REGISTER_FAST_TEST (ring_autotest,NOHUGE_OK ,ASAN_OK , test_ring);
app/test/test_rwlock.c +4 -4
@@ -507,7 +507,7 @@ try_rwlock_test_rde_wro(void)return process_try_lcore_stats (); } -REGISTER_FAST_TEST (rwlock_test1_autotest, true, true, rwlock_test1); -REGISTER_FAST_TEST (rwlock_rda_autotest, true, true, try_rwlock_test_rda); -REGISTER_FAST_TEST (rwlock_rds_wrm_autotest, true, true, try_rwlock_test_rds_wrm); -REGISTER_FAST_TEST (rwlock_rde_wro_autotest, true, true, try_rwlock_test_rde_wro); +REGISTER_FAST_TEST (rwlock_test1_autotest,NOHUGE_OK ,ASAN_OK , rwlock_test1); +REGISTER_FAST_TEST (rwlock_rda_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rda); +REGISTER_FAST_TEST (rwlock_rds_wrm_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rds_wrm); +REGISTER_FAST_TEST (rwlock_rde_wro_autotest,NOHUGE_OK ,ASAN_OK , try_rwlock_test_rde_wro);
app/test/test_sched.c +1 -1
@@ -215,4 +215,4 @@ test_sched(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (sched_autotest, true, true, test_sched); +REGISTER_FAST_TEST (sched_autotest,NOHUGE_OK ,ASAN_OK , test_sched);
app/test/test_security.c +1 -1
@@ -2314,4 +2314,4 @@ test_security(void)return unit_test_suite_runner (&security_testsuite); } -REGISTER_FAST_TEST (security_autotest, false, true, test_security); +REGISTER_FAST_TEST (security_autotest,NOHUGE_SKIP ,ASAN_OK , test_security);
app/test/test_seqlock.c +1 -1
@@ -187,4 +187,4 @@ test_seqlock(void)return rc; } -REGISTER_FAST_TEST (seqlock_autotest, true, true, test_seqlock); +REGISTER_FAST_TEST (seqlock_autotest,NOHUGE_OK ,ASAN_OK , test_seqlock);
app/test/test_service_cores.c +1 -1
@@ -1081,7 +1081,7 @@ test_service_common(void)return unit_test_suite_runner (&service_tests); } -REGISTER_FAST_TEST (service_autotest, true, true, test_service_common); +REGISTER_FAST_TEST (service_autotest,NOHUGE_OK ,ASAN_OK , test_service_common);static struct unit_test_suite service_perf_tests = { .suite_name ="service core performance test suite" ,
app/test/test_soring.c +1 -1
@@ -438,4 +438,4 @@ test_soring(void)return -1 ; } -REGISTER_FAST_TEST (soring_autotest, true, true, test_soring); +REGISTER_FAST_TEST (soring_autotest,NOHUGE_OK ,ASAN_OK , test_soring);
app/test/test_spinlock.c +1 -1
@@ -303,4 +303,4 @@ test_spinlock(void)return ret; } -REGISTER_FAST_TEST (spinlock_autotest, true, true, test_spinlock); +REGISTER_FAST_TEST (spinlock_autotest,NOHUGE_OK ,ASAN_OK , test_spinlock);
app/test/test_stack.c +2 -2
@@ -379,5 +379,5 @@ test_lf_stack(void)#endif } -REGISTER_FAST_TEST (stack_autotest, false, true, test_stack); -REGISTER_FAST_TEST (stack_lf_autotest, false, true, test_lf_stack); +REGISTER_FAST_TEST (stack_autotest,NOHUGE_SKIP ,ASAN_OK , test_stack); +REGISTER_FAST_TEST (stack_lf_autotest,NOHUGE_SKIP ,ASAN_OK , test_lf_stack);
app/test/test_string_fns.c +1 -1
@@ -328,4 +328,4 @@ test_string_fns(void)return 0 ; } -REGISTER_FAST_TEST (string_autotest, true, true, test_string_fns); +REGISTER_FAST_TEST (string_autotest,NOHUGE_OK ,ASAN_OK , test_string_fns);
app/test/test_table.c +1 -1
@@ -206,4 +206,4 @@ test_table(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (table_autotest, true, true, test_table); +REGISTER_FAST_TEST (table_autotest,NOHUGE_OK ,ASAN_OK , test_table);
app/test/test_tailq.c +1 -1
@@ -125,4 +125,4 @@ test_tailq(void)return ret; } -REGISTER_FAST_TEST (tailq_autotest, true, true, test_tailq); +REGISTER_FAST_TEST (tailq_autotest,NOHUGE_OK ,ASAN_OK , test_tailq);
app/test/test_telemetry_data.c +1 -1
@@ -615,4 +615,4 @@ telemetry_data_autotest(void) }#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (telemetry_data_autotest, true, true, telemetry_data_autotest); +REGISTER_FAST_TEST (telemetry_data_autotest,NOHUGE_OK ,ASAN_OK , telemetry_data_autotest);
app/test/test_telemetry_json.c +1 -1
@@ -213,4 +213,4 @@ test_telemetry_json(void)return 0 ; } -REGISTER_FAST_TEST (telemetry_json_autotest, true, true, test_telemetry_json); +REGISTER_FAST_TEST (telemetry_json_autotest,NOHUGE_OK ,ASAN_OK , test_telemetry_json);
app/test/test_thash.c +1 -1
@@ -1060,4 +1060,4 @@ test_thash(void)return unit_test_suite_runner (&thash_tests); } -REGISTER_FAST_TEST (thash_autotest, true, true, test_thash); +REGISTER_FAST_TEST (thash_autotest,NOHUGE_OK ,ASAN_OK , test_thash);
app/test/test_threads.c +1 -1
@@ -280,4 +280,4 @@ test_threads(void)return unit_test_suite_runner (&threads_test_suite); } -REGISTER_FAST_TEST (threads_autotest, true, true, test_threads); +REGISTER_FAST_TEST (threads_autotest,NOHUGE_OK ,ASAN_OK , test_threads);
app/test/test_ticketlock.c +1 -1
@@ -315,4 +315,4 @@ test_ticketlock(void)return ret; } -REGISTER_FAST_TEST (ticketlock_autotest, true, true, test_ticketlock); +REGISTER_FAST_TEST (ticketlock_autotest,NOHUGE_OK ,ASAN_OK , test_ticketlock);
app/test/test_timer.c +1 -1
@@ -601,4 +601,4 @@ test_timer(void)return TEST_SUCCESS ; } -REGISTER_FAST_TEST (timer_autotest, false, true, test_timer); +REGISTER_FAST_TEST (timer_autotest,NOHUGE_SKIP ,ASAN_OK , test_timer);
app/test/test_trace.c +1 -1
@@ -254,4 +254,4 @@ test_trace(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_FAST_TEST (trace_autotest, true, true, test_trace); +REGISTER_FAST_TEST (trace_autotest,NOHUGE_OK ,ASAN_OK , test_trace);
app/test/test_vdev.c +1 -1
@@ -166,4 +166,4 @@ test_vdev(void)return 0 ; } -REGISTER_FAST_TEST (vdev_autotest, true, true, test_vdev); +REGISTER_FAST_TEST (vdev_autotest,NOHUGE_OK ,ASAN_OK , test_vdev);
app/test/test_version.c +1 -1
@@ -25,4 +25,4 @@ test_version(void)return 0 ; } -REGISTER_FAST_TEST (version_autotest, true, true, test_version); +REGISTER_FAST_TEST (version_autotest,NOHUGE_OK ,ASAN_OK , test_version);
buildtools/get-test-suites.py +1 -1
@@ -18,7 +18,7 @@ def get_fast_test_params(test_name, ln): "Extract the extra fast-test parameters from the line" (_, rest_of_line) = ln.split(test_name, 1) (_, nohuge, asan, _func) = rest_of_line.split(',', 3) - return f":{nohuge.strip().lower()}:{asan.strip().lower()}" + return f":{nohuge.strip()}:{asan.strip()}" for fname in input_list: with open(fname, "r", encoding="utf-8") as f:
doc/guides/contributing/unit_test.rst +6 -4
@@ -188,9 +188,11 @@ There are two important functions for interacting with the test harness: The test is automatically added to the Meson test suite `<MESON_SUITE>` by this macro. Examples would be ``REGISTER_DRIVER_TEST``, or ``REGISTER_PERF_TEST``. **NOTE:** The ``REGISTER_FAST_TEST`` macro is slightly different, - in that it takes two additional parameters, - specifying whether the test can be run using ``--no-huge``, - and whether the test can be run using Address Sanitization (ASAN) + in that it takes two additional parameters before the function name: + the hugepage requirement (``NOHUGE_OK`` if the test can run without hugepages, + or ``NOHUGE_SKIP`` if hugepages are required), + and Address Sanitizer compatibility (``ASAN_OK`` if the test can run with ASan enabled, + or ``ASAN_SKIP`` if it cannot). ``unit_test_suite_runner(struct unit_test_suite *)`` Returns a runner for a full test suite object,
@@ -318,7 +320,7 @@ of the unit test suite structure, for example: return ret; } - REGISTER_FAST_TEST(example_autotest, true /*no-huge*/, false /*ASan*/, example_tests); + REGISTER_FAST_TEST(example_autotest, NOHUGE_OK, ASAN_OK, example_tests); Designing a test
Signature · 1 line
2.51.0
PATCH v4 2/11 app/test: fix undefined behaviour in red autotest
In reply to Bruce RichardsonThe shift of a negative number (or very large positive) is undefined behaviour which causes errors when run with UBSan. Fix this by making the behaviour explicit for the edge case of n being zero in the calculation.
--- lib/sched/rte_red.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
lib/sched/rte_red.h +8 -1
@@ -172,8 +172,15 @@ __rte_red_calc_qempty_factor(uint8_t wq_log2, uint16_t m) f = (n >>6 ) &0xf ; n >>=10 ; -if (n <RTE_RED_SCALING ) +if (n <RTE_RED_SCALING ) { +/* When n == 0, no rounding or shifting needed. +* For n > 0, add 2^(n-1) for rounding before right shift. +* This avoids UB from (1 << -1) when n == 0. +*/ +if (n ==0 ) +return (uint16_t ) rte_red_pow2_frac_inv[f];return (uint16_t ) ((rte_red_pow2_frac_inv[f] + (1 << (n -1 ))) >> n); + }return 0 ; }
Signature · 1 line
2.51.0
PATCH v4 3/11 app/test: reduce duration of secondary timer test
In reply to Bruce RichardsonReduce the timer duration and the primary wait duration in the secondary process timer autotest. This should help ensure it doesn't time out what run in a CI environment.
--- app/test/test_timer_secondary.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
app/test/test_timer_secondary.c +3 -3
@@ -162,7 +162,7 @@ test_timer_secondary(void) ret =timer_secondary_spawn_wait (*sec_lcorep);TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); -rte_delay_ms (2000 ); +rte_delay_ms (500 ); test_info->exit_flag =1 ;rte_eal_wait_lcore (*mgr_lcorep);
@@ -189,8 +189,8 @@ test_timer_secondary(void)rte_timer_init (tim); -/* generate timeouts between 10 and 160 ms */ - timeout_ms = ((rte_rand () &0xF ) +1 ) *10 ; +/* generate timeouts between 10 and 80 ms */ + timeout_ms = ((rte_rand () &0x7 ) +1 ) *10 ; ticks = timeout_ms *rte_get_timer_hz () /MSECPERSEC ; ret = rte_timer_alt_reset(test_info->timer_data_id,
Signature · 1 line
2.51.0
PATCH v4 4/11 app/test: fix timer loop hang on secondary process failure
In reply to Bruce RichardsonWhen the secondary process run from timer_secontary_autotest fails, the timer loop is never stopped so the whole process hangs until timeout. Fix this by setting the stop flag before checking for success or failure of the secondary process.
--- app/test/test_timer_secondary.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
app/test/test_timer_secondary.c +3 -2
@@ -160,11 +160,12 @@ test_timer_secondary(void)TEST_ASSERT_SUCCESS (ret,"Failed to launch timer manage loop" ); ret =timer_secondary_spawn_wait (*sec_lcorep); -TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" ); +/* must set exit flag even on error case, so check ret later */ rte_delay_ms (500 ); - test_info->exit_flag =1 ; + +TEST_ASSERT_SUCCESS (ret,"Secondary process execution failed" );rte_eal_wait_lcore (*mgr_lcorep);#ifdef RTE_LIBRTE_TIMER_DEBUG
Signature · 1 line
2.51.0
PATCH v4 5/11 eal: add internal APIs to query loaded driver paths
In reply to Bruce RichardsonAdd APIs for internal DPDK use to allow querying the paths of drivers loaded into the running instance.
--- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++++--- lib/eal/include/rte_eal.h | 54 +++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 4 deletions(-)
lib/eal/common/eal_common_options.c +50 -4
@@ -263,6 +263,7 @@ struct shared_driver {char name[PATH_MAX ];void * lib_handle; +bool from_cmdline;/**< true if from -d flag, false if driver found in a directory */ };/* List of external loadable drivers */
@@ -533,7 +534,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg) }static int -eal_plugin_add (const char *path) +eal_plugin_add (const char *path,bool from_cmdline) {struct shared_driver *solib;
@@ -544,6 +545,7 @@ eal_plugin_add(const char *path) }memset (solib,0 ,sizeof (*solib));strlcpy (solib->name, path,PATH_MAX ); + solib->from_cmdline = from_cmdline;TAILQ_INSERT_TAIL (&solib_list, solib, next);return 0 ;
@@ -595,7 +597,7 @@ eal_plugindir_init(const char *path)if (!(stat (sopath, &sb) ==0 &&S_ISREG (sb.st_mode)))continue ; -if (eal_plugin_add (sopath) ==-1 ) +if (eal_plugin_add (sopath, false) ==-1 )break ; }
@@ -727,7 +729,7 @@ eal_plugins_init(void) *default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 && S_ISDIR(sb.st_mode)) - eal_plugin_add(default_solib_dir); +eal_plugin_add (default_solib_dir, false); TAILQ_FOREACH(solib, &solib_list, next) {
@@ -751,6 +753,50 @@ eal_plugins_init(void) }#endif +RTE_EXPORT_INTERNAL_SYMBOL (rte_eal_driver_path_next) +const char * +rte_eal_driver_path_next (const char *start,bool cmdline_only) +{ +struct shared_driver *solib; + +if (start ==NULL ) { + solib =TAILQ_FIRST (&solib_list); + }else { +/* Find the current entry based on the name string */ + TAILQ_FOREACH(solib, &solib_list, next) { +if (start == solib->name) { + solib =TAILQ_NEXT (solib, next); +break ; + } + } +if (solib ==NULL ) +return NULL ; + } + +/* Skip entries that were expanded from directories if cmdline_only is true */ +if (cmdline_only) { +while (solib !=NULL && !solib->from_cmdline) + solib =TAILQ_NEXT (solib, next); + } + +return solib ? solib->name :NULL ; +} + +RTE_EXPORT_INTERNAL_SYMBOL (rte_eal_driver_path_count) +unsigned int +rte_eal_driver_path_count (bool cmdline_only) +{ +struct shared_driver *solib; +unsigned int count =0 ; + + TAILQ_FOREACH(solib, &solib_list, next) { +if (!cmdline_only || solib->from_cmdline) + count++; + } + +return count; +} +/* * Parse the coremask given as argument (hexadecimal string) and fill * the global configuration (core role and core count) with the parsed
@@ -1929,7 +1975,7 @@ eal_parse_args(void)return -1 ;/* driver loading options */ TAILQ_FOREACH(arg, &args.driver_path, next) -if (eal_plugin_add (arg->arg) <0 ) +if (eal_plugin_add (arg->arg, true) <0 )return -1 ;if (remap_lcores && args.remap_lcore_ids != (void *)1 ) {
lib/eal/include/rte_eal.h +54 -0
60 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v4 6/11 app/test: pass loaded driver info to secondary procs
In reply to Bruce RichardsonFor unit tests which run secondary processes, allow passing the driver paths used by the primary process to that secondary. This allows use of mempools in those secondary tests. Without this, any tests using mempools in secondary process will fail in shared builds.
--- app/test/process.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
app/test/process.h +27 -1
@@ -18,6 +18,7 @@#include <rte_string_fns.h> /* strlcpy */ #include <rte_devargs.h> +#include <rte_eal.h> #ifdef RTE_EXEC_ENV_FREEBSD #define self "curproc"
@@ -36,6 +37,7 @@ extern uint16_t flag_for_send_pkts;#endif #define PREFIX_ALLOW "--allow=" +#define PREFIX_DRIVER_PATH "--driver-path="static int add_parameter_allow (char **argv,int max_capacity)
@@ -63,6 +65,23 @@ add_parameter_allow(char **argv, int max_capacity)return count; } +static int +add_parameter_driver_path (char **argv,int max_capacity) +{ +const char *driver_path; +int count =0 ; + + RTE_EAL_DRIVER_PATH_FOREACH(driver_path, true) { +if (asprintf (&argv[count],PREFIX_DRIVER_PATH "%s" , driver_path) <0 ) +break ; + +if (++count == max_capacity) +break ; + } + +return count; +} +/* * launches a second copy of the test process using the given argv parameters, * which should include argv[0] as the process name. To identify in the
@@ -75,6 +94,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)int num =0 ;char **argv_cpy;int allow_num; +int driver_path_num;int argv_num;int i, status;char path[32 ];
@@ -90,7 +110,8 @@ process_dup(const char *const argv[], int numargs, const char *env_value)return -1 ; else if (pid == 0) { allow_num =rte_devargs_type_count (RTE_DEVTYPE_ALLOWED ); - argv_num = numargs + allow_num +1 ; + driver_path_num =rte_eal_driver_path_count (true); + argv_num = numargs + allow_num + driver_path_num +1 ; argv_cpy =calloc (argv_num,sizeof (char *));if (!argv_cpy)rte_panic ("Memory allocation failed\n" );
@@ -105,6 +126,11 @@ process_dup(const char *const argv[], int numargs, const char *env_value) num =add_parameter_allow (&argv_cpy[i], allow_num); num += numargs; +if (driver_path_num >0 ) { +int added =add_parameter_driver_path (&argv_cpy[num], driver_path_num); + num += added; + } +#ifdef RTE_EXEC_ENV_LINUX {const char *procdir ="/proc/" self"/fd/" ;
Signature · 1 line
2.51.0
PATCH v4 7/11 app/test: skip power capabilities test if unsupported
In reply to Bruce RichardsonIf the power subsystem cannot be initialized e.g. due to not being root, skip the capabilities test, rather than failing it.
--- app/test/test_power_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_power_cpufreq.c +1 -1
@@ -661,7 +661,7 @@ test_power_caps(void)"correctly(APCI cpufreq) or operating in another valid " "Power management environment\n", TEST_POWER_LCORE_ID);rte_power_unset_env (); -return -1 ; +return TEST_SKIPPED ; } ret =rte_power_get_capabilities (TEST_POWER_LCORE_ID , &caps);
Signature · 1 line
2.51.0
PATCH v4 8/11 app/test: add some unattached tests to fast-test suite
In reply to Bruce RichardsonThere are quite a number of test cases defined which are not present in any test-suite. Meson warns about these on build, so reduce the warnings by adding external-mem, ipsec-sad, power-caps and secondary timer test cases to the fast-test suite.
--- app/test/test_external_mem.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_power_cpufreq.c | 2 +- app/test/test_timer_secondary.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
app/test/test_external_mem.c +1 -1
@@ -587,4 +587,4 @@ test_external_mem(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (external_mem_autotest, test_external_mem); +REGISTER_FAST_TEST (external_mem_autotest,NOHUGE_SKIP ,ASAN_OK , test_external_mem);
app/test/test_ipsec_sad.c +1 -1
@@ -899,4 +899,4 @@ test_ipsec_sad(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (ipsec_sad_autotest, test_ipsec_sad); +REGISTER_FAST_TEST (ipsec_sad_autotest,NOHUGE_OK ,ASAN_OK , test_ipsec_sad);
app/test/test_power_cpufreq.c +1 -1
@@ -679,4 +679,4 @@ test_power_caps(void)#endif REGISTER_FAST_TEST (power_cpufreq_autotest,NOHUGE_SKIP ,ASAN_OK , test_power_cpufreq); -REGISTER_TEST_COMMAND (power_caps_autotest, test_power_caps); +REGISTER_FAST_TEST (power_caps_autotest,NOHUGE_OK ,ASAN_OK , test_power_caps);
app/test/test_timer_secondary.c +1 -1
@@ -225,4 +225,4 @@ test_timer_secondary(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (timer_secondary_autotest, test_timer_secondary); +REGISTER_FAST_TEST (timer_secondary_autotest,NOHUGE_SKIP ,ASAN_SKIP , test_timer_secondary);
Signature · 1 line
2.51.0
PATCH v4 9/11 app/test: add tests to driver test suite
In reply to Bruce RichardsonA number of eventdev, cryptodev and ethdev tests require devices to be present in order to run so add them to the "driver" suite of tests.
--- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 ++-- app/test/test_event_timer_adapter.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-)
app/test/test_cryptodev_crosscheck.c +1 -1
@@ -1047,4 +1047,4 @@ test_crosscheck(void)return ret; } -REGISTER_TEST_COMMAND (cryptodev_crosscheck, test_crosscheck); +REGISTER_DRIVER_TEST (cryptodev_crosscheck, test_crosscheck);
app/test/test_ethdev_api.c +1 -1
@@ -185,4 +185,4 @@ test_ethdev_api(void)/* TODO: Make part of the fast test suite, `REGISTER_FAST_TEST()`, * when all drivers complies to the queue state requirement */ -REGISTER_TEST_COMMAND (ethdev_api, test_ethdev_api); +REGISTER_DRIVER_TEST (ethdev_api, test_ethdev_api);
app/test/test_event_crypto_adapter.c +1 -1
@@ -1625,5 +1625,5 @@ test_event_crypto_adapter(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_crypto_adapter_autotest, +REGISTER_DRIVER_TEST (event_crypto_adapter_autotest, test_event_crypto_adapter);
app/test/test_event_eth_rx_adapter.c +2 -2
@@ -1555,7 +1555,7 @@ test_event_eth_rx_intr_adapter_common(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_eth_rx_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_adapter_autotest, test_event_eth_rx_adapter_common); -REGISTER_TEST_COMMAND (event_eth_rx_intr_adapter_autotest, +REGISTER_DRIVER_TEST (event_eth_rx_intr_adapter_autotest, test_event_eth_rx_intr_adapter_common);
app/test/test_event_timer_adapter.c +1 -1
@@ -2036,4 +2036,4 @@ test_event_timer_adapter_func(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (event_timer_adapter_test, test_event_timer_adapter_func); +REGISTER_DRIVER_TEST (event_timer_adapter_test, test_event_timer_adapter_func);
app/test/test_security_inline_macsec.c +1 -1
@@ -2584,4 +2584,4 @@ test_inline_macsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_macsec_autotest, test_inline_macsec); +REGISTER_DRIVER_TEST (inline_macsec_autotest, test_inline_macsec);
app/test/test_security_inline_proto.c +3 -3
@@ -3616,6 +3616,6 @@ test_event_inline_ipsec(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (inline_ipsec_autotest, test_inline_ipsec); -REGISTER_TEST_COMMAND (inline_ipsec_sg_autotest, test_inline_ipsec_sg); -REGISTER_TEST_COMMAND (event_inline_ipsec_autotest, test_event_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_autotest, test_inline_ipsec); +REGISTER_DRIVER_TEST (inline_ipsec_sg_autotest, test_inline_ipsec_sg); +REGISTER_DRIVER_TEST (event_inline_ipsec_autotest, test_event_inline_ipsec);
Signature · 1 line
2.51.0
PATCH v4 10/11 buildtools/get-test-suites: suppress empty output
In reply to Bruce RichardsonIf there are no tests which are not assigned to a test suite, omit the line printing the non_suite_tests. This avoid having error messages from meson about test "" not being in any test suite.
--- buildtools/get-test-suites.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
buildtools/get-test-suites.py +2 -1
@@ -38,4 +38,5 @@ def get_fast_test_params(test_name, ln): for suite in test_suites.keys(): print(f"{suite}={','.join(test_suites[suite])}") -print(f"non_suite_tests={','.join(non_suite_tests)}") +if non_suite_tests: + print(f"non_suite_tests={','.join(non_suite_tests)}")
Signature · 1 line
2.51.0
PATCH v4 11/11 app/test: move red autotest to attic
In reply to Bruce RichardsonDefine an "attic" test suite for unstable or unmaintained tests, and move the red autotest to that suite.
--- app/test/test.h | 4 ++++ app/test/test_red.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
app/test/test.h +4 -0
@@ -218,5 +218,9 @@ void add_test_command(struct test_command *t);*/ #define REGISTER_FAST_TEST (cmd, no_huge, ASan, func) REGISTER_TEST_COMMAND(cmd, func) +/* For unstable or experimental tests cases which need work or which may be removed +* in the future. +*/ +#define REGISTER_ATTIC_TEST REGISTER_TEST_COMMAND#endif
app/test/test_red.c +1 -1
@@ -1872,6 +1872,6 @@ test_red_all(void)#endif /* !RTE_EXEC_ENV_WINDOWS */ -REGISTER_TEST_COMMAND (red_autotest, test_red); +REGISTER_ATTIC_TEST (red_autotest, test_red);REGISTER_PERF_TEST (red_perf, test_red_perf);REGISTER_PERF_TEST (red_all, test_red_all);
Signature · 1 line
2.51.0
Re: [PATCH v4 00/11] Assign all unit tests to suites
In reply to Bruce RichardsonQuoted 151 lines · Bruce Richardson
Categorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V4:
- export new internal functions using properEXPORT_INTERNALmacros (patch 5)V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and addred_autotestto it.V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached testsBruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to atticapp/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +-
Quoted 8 lines
app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 54 ++++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 315 insertions(+), 157 deletions(-)
Series applied, thanks.
Signature · 1 line
David Marchand
Re: [PATCH v4 00/11] Assign all unit tests to suites
Hello Bruce,
Quoted 163 lines · David Marchand
Quoted 151 lines · Bruce Richardson
Categorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
V4:
- export new internal functions using properEXPORT_INTERNALmacros (patch 5)V3:
- correct comment in patch 1
- define "attic" suite for unstable tests and addred_autotestto it.V2:
- rename the parameters for fast-test
- fix issues with the tests to be added to fast-tests:
* allow loading drivers from secondary processes
* fix undefined behaviour flagged by asan in red test
* skip unrunnable power tests, rather than failing
- add tests to driver-test suite also
- add patch fixing output in case we have no unattached testsBruce Richardson (11):
app/test: make parameters clearer when adding fast tests app/test: fix undefined behaviour in red autotest app/test: reduce duration of secondary timer test app/test: fix timer loop hang on secondary process failure
eal: add internal APIs to query loaded driver paths app/test: pass loaded driver info to secondary procs app/test: skip power capabilities test if unsupported app/test: add some unattached tests to fast-test suite app/test: add tests to driver test suite buildtools/get-test-suites: suppress empty output app/test: move red autotest to atticapp/test/process.h | 28 ++++++++++++- app/test/suites/meson.build | 14 ++++++- app/test/test.h | 13 ++++++- app/test/test_acl.c | 2 +- app/test/test_alarm.c | 2 +- app/test/test_argparse.c | 2 +- app/test/test_atomic.c | 2 +- app/test/test_bitcount.c | 2 +- app/test/test_bitmap.c | 2 +- app/test/test_bitops.c | 2 +- app/test/test_bitratestats.c | 2 +- app/test/test_bitset.c | 2 +- app/test/test_bpf.c | 6 +-- app/test/test_byteorder.c | 2 +- app/test/test_cfgfile.c | 2 +- app/test/test_cksum.c | 2 +- app/test/test_cmdline.c | 2 +- app/test/test_common.c | 2 +- app/test/test_compressdev.c | 2 +- app/test/test_cpuflags.c | 2 +- app/test/test_crc.c | 2 +- app/test/test_cryptodev_crosscheck.c | 2 +- app/test/test_cycles.c | 2 +- app/test/test_debug.c | 2 +- app/test/test_devargs.c | 2 +- app/test/test_dispatcher.c | 2 +- app/test/test_distributor.c | 2 +- app/test/test_eal_flags.c | 24 ++++++------ app/test/test_eal_fs.c | 2 +- app/test/test_errno.c | 2 +- app/test/test_ethdev_api.c | 2 +- app/test/test_ethdev_link.c | 2 +- app/test/test_event_crypto_adapter.c | 2 +- app/test/test_event_eth_rx_adapter.c | 4 +- app/test/test_event_eth_tx_adapter.c | 2 +- app/test/test_event_ring.c | 2 +- app/test/test_event_timer_adapter.c | 2 +- app/test/test_event_vector_adapter.c | 2 +- app/test/test_eventdev.c | 4 +- app/test/test_external_mem.c | 2 +- app/test/test_fbarray.c | 2 +- app/test/test_fib.c | 2 +- app/test/test_fib6.c | 2 +- app/test/test_func_reentrancy.c | 2 +- app/test/test_graph.c | 4 +- app/test/test_graph_feature_arc.c | 2 +- app/test/test_hash.c | 2 +- app/test/test_hash_readwrite.c | 2 +- app/test/test_interrupts.c | 2 +- app/test/test_ipfrag.c | 2 +- app/test/test_ipsec.c | 2 +- app/test/test_ipsec_sad.c | 2 +- app/test/test_kvargs.c | 2 +- app/test/test_latencystats.c | 2 +- app/test/test_lcore_var.c | 2 +- app/test/test_lcores.c | 2 +- app/test/test_logs.c | 2 +- app/test/test_lpm.c | 2 +- app/test/test_lpm6.c | 2 +- app/test/test_malloc.c | 2 +- app/test/test_mbuf.c | 2 +- app/test/test_mcslock.c | 2 +- app/test/test_member.c | 2 +- app/test/test_memcpy.c | 2 +- app/test/test_memory.c | 2 +- app/test/test_mempool.c | 2 +- app/test/test_memzone.c | 2 +- app/test/test_meter.c | 2 +- app/test/test_metrics.c | 2 +- app/test/test_mp_secondary.c | 2 +- app/test/test_net_ether.c | 2 +- app/test/test_net_ip6.c | 2 +- app/test/test_pcapng.c | 2 +- app/test/test_pdcp.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 2 +- app/test/test_pflock.c | 2 +- app/test/test_pie.c | 2 +- app/test/test_pmd_ring.c | 2 +- app/test/test_pmu.c | 2 +- app/test/test_power.c | 2 +- app/test/test_power_cpufreq.c | 6 +-- app/test/test_power_intel_uncore.c | 2 +- app/test/test_power_kvm_vm.c | 2 +- app/test/test_prefetch.c | 2 +- app/test/test_ptr_compress.c | 2 +- app/test/test_rawdev.c | 2 +- app/test/test_rcu_qsbr.c | 2 +- app/test/test_red.c | 2 +- app/test/test_reorder.c | 2 +- app/test/test_rib.c | 2 +- app/test/test_rib6.c | 2 +- app/test/test_ring.c | 2 +- app/test/test_rwlock.c | 8 ++-- app/test/test_sched.c | 2 +- app/test/test_security.c | 2 +- app/test/test_security_inline_macsec.c | 2 +- app/test/test_security_inline_proto.c | 6 +-- app/test/test_seqlock.c | 2 +- app/test/test_service_cores.c | 2 +- app/test/test_soring.c | 2 +- app/test/test_spinlock.c | 2 +- app/test/test_stack.c | 4 +- app/test/test_string_fns.c | 2 +- app/test/test_table.c | 2 +- app/test/test_tailq.c | 2 +- app/test/test_telemetry_data.c | 2 +- app/test/test_telemetry_json.c | 2 +- app/test/test_thash.c | 2 +- app/test/test_threads.c | 2 +- app/test/test_ticketlock.c | 2 +- app/test/test_timer.c | 2 +- app/test/test_timer_secondary.c | 13 ++++--- app/test/test_trace.c | 2 +-Quoted 8 lines
app/test/test_vdev.c | 2 +- app/test/test_version.c | 2 +- buildtools/get-test-suites.py | 5 ++- doc/guides/contributing/unit_test.rst | 10 +++-- lib/eal/common/eal_common_options.c | 54 ++++++++++++++++++++++++-- lib/eal/include/rte_eal.h | 54 ++++++++++++++++++++++++++ lib/sched/rte_red.h | 9 ++++- 121 files changed, 315 insertions(+), 157 deletions(-)
Quoted 1 line
Series applied, thanks.
I can see a few failures, namely, for the daily tests on the main branch in GHA, and it seems reproducible.
Attempt 1:
https://github.com/DPDK/dpdk/actions/runs/21121155333/job/60734135604
Attempt 2:
https://github.com/DPDK/dpdk/actions/runs/21121155333/job/60756716459
Could you have a look please?
Signature · 1 line
David Marchand
Re: [PATCH v4 00/11] Assign all unit tests to suites
Quoted 13 lines · David Marchand
Hello Bruce,
Quoted 10 lines · David Marchand
Quoted 7 lines · Bruce Richardson
Categorize all unit tests into one of the test suites: generally driver tests or fast-tests. In order to add some of the tests to fast tests, some additional work was required, hence the additional patches in this set. Also, make the parameters for asan and hugepages clearer in each test's definition.
<snip>
Quoted 6 lines
Quoted 2 lines
Series applied, thanks.
I can see a few failures, namely, for the daily tests on the main branch in GHA, and it seems reproducible.
Quoted 7 lines
Attempt 1:
https://github.com/DPDK/dpdk/actions/runs/21121155333/job/60734135604
Attempt 2:
https://github.com/DPDK/dpdk/actions/runs/21121155333/job/60756716459Could you have a look please?
Yes, will investigate. Unfortunately the logs don't show anything immediately obvious, so some digging is required. I also don't see the errors when I do a push of latest main to my own github fork, which is strange.
/Bruce