Skip to contentSkip to conversation

replace build code for unit tests

RFC PATCH In review Bruce Richardson 6 participants 93 messages Jul 21, 2023 – Aug 23, 2023 Page 1 of 2

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover replace build code for unit tests

While working on series such as [1] to make DPDK builds more configurable, the majority of the complexity involved centered on the unit tests, and ensuring that the individual files were added/removed from the build as the components were enabled/disabled.

This complexity was exacerbated by:
* C files having multiple dependencies, specifically,
* Some libraries having one set of independent tests, while other library tests requiring additional components
* Having to maintain lists of tests in various suites which also needed to be updated, depending on component availability.
* Everything having to be checked via if-else clauses, since this was not data-driven

This RFC attempts to address these issues by doing the following:
* Creating a per-file dependency list for the autotests, allowing easy checks of when a file could be built
* Tagging the various fast-tests/perf-tests/drivers-tests suites via macros in the C code. Then scan the C-files we are building to construct the test suites based on what is available

This RFC is just an early prototype, and probably needs cleanup and validation of the dependency lists. Windows support is probably also broken, given the fact that our current build file maintains custom lists there. However, I would hope it should not be too big a job to enable the unit tests for the windows components that are already available. (Tests for any components not being build on windows are already removed via the dependency lists).

Another (hopefully less-impactful) side-effect of this change is that the "test" binary has moved in the build folder. It is now put along-side the other binaries in "build/app" rather than being in the subdirectory "build/app/test".

Future work could also be done to scan the C files that are not being build for tests. Those tests could then be stubbed out in an auto-genereated file to always return "SKIPPED", meaning that all test commands are always valid, irrespective of what components are present or not.

[1] http://patches.dpdk.org/project/dpdk/list/?series=28628&state=10

Bruce Richardson (5):
app/test: add new macros for various test types app/test: tag tests with the test type
app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros app/test: add fast test suite to new build infrastructure

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 796 +++++-------------
 app/test/suites/meson.build                   |  75 ++
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kni.c                           |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 114 files changed, 478 insertions(+), 754 deletions(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

#1 lore raw

RFC PATCH 1/5 app/test: add new macros for various test types

Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type.

---
 app/test/test.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test.h +8 -1
index 85f57efbc6..a91ded76af 100644
@@ -190,7 +190,7 @@ struct test_command {
 
 void add_test_command(struct test_command *t);
 
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
 #define REGISTER_TEST_COMMAND(cmd, func) \
 	static struct test_command test_struct_##cmd = { \
 		.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
 		add_test_command(&test_struct_##cmd); \
 	}
 
+/* 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
+
 #endif
Signature · 1 line
2.39.2
#2 lore raw

RFC PATCH 2/5 app/test: tag tests with the test type

In reply to Bruce Richardson

Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.

---
NOTE:
This replacement was automatically done using the list of tests given in the meson.build file. As can be seen by checking the repo after this, there were a number of tests not called out in any test suite. The addition of these tests to suites is a separate issue not covered by this patchset

---
 app/test/test_acl.c                      |  2 +-
 app/test/test_atomic.c                   |  2 +-
 app/test/test_barrier.c                  |  2 +-
 app/test/test_bitmap.c                   |  2 +-
 app/test/test_bitops.c                   |  2 +-
 app/test/test_bpf.c                      |  4 +--
 app/test/test_byteorder.c                |  2 +-
 app/test/test_cksum.c                    |  2 +-
 app/test/test_cmdline.c                  |  2 +-
 app/test/test_common.c                   |  2 +-
 app/test/test_cpuflags.c                 |  2 +-
 app/test/test_crc.c                      |  2 +-
 app/test/test_cryptodev.c                | 38 ++++++++++++------------
 app/test/test_cryptodev_asym.c           |  2 +-
 app/test/test_cycles.c                   |  2 +-
 app/test/test_debug.c                    |  2 +-
 app/test/test_devargs.c                  |  2 +-
 app/test/test_distributor.c              |  2 +-
 app/test/test_distributor_perf.c         |  2 +-
 app/test/test_dmadev.c                   |  2 +-
 app/test/test_eal_flags.c                | 24 +++++++--------
 app/test/test_eal_fs.c                   |  2 +-
 app/test/test_efd.c                      |  2 +-
 app/test/test_efd_perf.c                 |  2 +-
 app/test/test_errno.c                    |  2 +-
 app/test/test_ethdev_link.c              |  2 +-
 app/test/test_event_ring.c               |  2 +-
 app/test/test_eventdev.c                 |  2 +-
 app/test/test_fbarray.c                  |  2 +-
 app/test/test_fib.c                      |  4 +--
 app/test/test_fib6.c                     |  4 +--
 app/test/test_fib6_perf.c                |  2 +-
 app/test/test_fib_perf.c                 |  2 +-
 app/test/test_func_reentrancy.c          |  2 +-
 app/test/test_hash.c                     |  2 +-
 app/test/test_hash_functions.c           |  2 +-
 app/test/test_hash_multiwriter.c         |  2 +-
 app/test/test_hash_perf.c                |  2 +-
 app/test/test_hash_readwrite.c           |  4 +--
 app/test/test_hash_readwrite_lf_perf.c   |  2 +-
 app/test/test_interrupts.c               |  2 +-
 app/test/test_ipfrag.c                   |  2 +-
 app/test/test_ipsec.c                    |  2 +-
 app/test/test_ipsec_perf.c               |  2 +-
 app/test/test_kni.c                      |  2 +-
 app/test/test_kvargs.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_lpm6_perf.c                |  2 +-
 app/test/test_lpm_perf.c                 |  2 +-
 app/test/test_malloc.c                   |  2 +-
 app/test/test_malloc_perf.c              |  2 +-
 app/test/test_mbuf.c                     |  2 +-
 app/test/test_mcslock.c                  |  2 +-
 app/test/test_member.c                   |  2 +-
 app/test/test_member_perf.c              |  2 +-
 app/test/test_memcpy.c                   |  2 +-
 app/test/test_memcpy_perf.c              |  2 +-
 app/test/test_memory.c                   |  2 +-
 app/test/test_mempool.c                  |  2 +-
 app/test/test_mempool_perf.c             |  2 +-
 app/test/test_memzone.c                  |  2 +-
 app/test/test_meter.c                    |  2 +-
 app/test/test_mp_secondary.c             |  2 +-
 app/test/test_per_lcore.c                |  2 +-
 app/test/test_pflock.c                   |  2 +-
 app/test/test_pie.c                      |  6 ++--
 app/test/test_pmd_perf.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_rand_perf.c                |  2 +-
 app/test/test_rcu_qsbr.c                 |  2 +-
 app/test/test_rcu_qsbr_perf.c            |  2 +-
 app/test/test_reassembly_perf.c          |  2 +-
 app/test/test_reciprocal_division.c      |  2 +-
 app/test/test_reciprocal_division_perf.c |  2 +-
 app/test/test_red.c                      |  4 +--
 app/test/test_reorder.c                  |  2 +-
 app/test/test_rib.c                      |  4 +--
 app/test/test_rib6.c                     |  4 +--
 app/test/test_ring.c                     |  2 +-
 app/test/test_ring_perf.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            |  4 +--
 app/test/test_spinlock.c                 |  2 +-
 app/test/test_stack.c                    |  4 +--
 app/test/test_stack_perf.c               |  4 +--
 app/test/test_string_fns.c               |  2 +-
 app/test/test_tailq.c                    |  2 +-
 app/test/test_thash.c                    |  2 +-
 app/test/test_thash_perf.c               |  2 +-
 app/test/test_threads.c                  |  2 +-
 app/test/test_ticketlock.c               |  2 +-
 app/test/test_timer.c                    |  2 +-
 app/test/test_timer_perf.c               |  2 +-
 app/test/test_timer_racecond.c           |  2 +-
 app/test/test_trace.c                    |  2 +-
 app/test/test_trace_perf.c               |  2 +-
 app/test/test_version.c                  |  2 +-
 107 files changed, 151 insertions(+), 151 deletions(-)
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);
app/test/test_atomic.c +1 -1
index e4b997827e..b52420c10b 100644
@@ -631,4 +631,4 @@ test_atomic(void)
 
 	return 0;
 }
-REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
+REGISTER_FAST_TEST(atomic_autotest, False, True, test_atomic);
app/test/test_barrier.c +1 -1
index ec69af25bf..925a88b68a 100644
@@ -285,4 +285,4 @@ test_barrier(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(barrier_autotest, test_barrier);
+REGISTER_PERF_TEST(barrier_autotest, test_barrier);
app/test/test_bitmap.c +1 -1
index e9c61590ae..2014d2682c 100644
@@ -269,4 +269,4 @@ test_bitmap(void)
 	return test_bitmap_all_set();
 }
 
-REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap);
+REGISTER_FAST_TEST(bitmap_autotest, True, True, test_bitmap);
app/test/test_bitops.c +1 -1
index c21426bf2f..dac466602b 100644
@@ -135,4 +135,4 @@ test_bitops(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(bitops_autotest, test_bitops);
+REGISTER_FAST_TEST(bitops_autotest, True, True, test_bitops);
app/test/test_bpf.c +2 -2
index f5af5e8a3f..5fef17fbc2 100644
@@ -3262,7 +3262,7 @@ test_bpf(void)
 
 #endif /* !RTE_LIB_BPF */
 
-REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
+REGISTER_FAST_TEST(bpf_autotest, True, True, test_bpf);
 
 #ifndef RTE_HAS_LIBPCAP
 
@@ -3473,4 +3473,4 @@ test_bpf_convert(void)
 
 #endif /* RTE_HAS_LIBPCAP */
 
-REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
+REGISTER_FAST_TEST(bpf_convert_autotest, True, True, test_bpf_convert);
app/test/test_byteorder.c +1 -1
index de14ed539e..2189f94744 100644
@@ -63,4 +63,4 @@ test_byteorder(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
+REGISTER_FAST_TEST(byteorder_autotest, True, True, test_byteorder);
app/test/test_cksum.c +1 -1
index 6c15de9a93..c04fae800e 100644
@@ -267,4 +267,4 @@ test_cksum(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
+REGISTER_FAST_TEST(cksum_autotest, True, True, test_cksum);
app/test/test_cmdline.c +1 -1
index 115bee966d..c2a375ac1c 100644
@@ -60,4 +60,4 @@ test_cmdline(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
+REGISTER_FAST_TEST(cmdline_autotest, True, True, test_cmdline);
app/test/test_common.c +1 -1
index f89e1eb7ee..c7b41a3f0e 100644
@@ -350,4 +350,4 @@ test_common(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(common_autotest, test_common);
+REGISTER_FAST_TEST(common_autotest, True, True, test_common);
app/test/test_cpuflags.c +1 -1
index a0e342ae48..c3417dda24 100644
@@ -334,4 +334,4 @@ test_cpuflags(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
+REGISTER_FAST_TEST(cpuflags_autotest, True, True, test_cpuflags);
app/test/test_crc.c +1 -1
index 5edc8fb13b..b267bdde9f 100644
@@ -171,4 +171,4 @@ test_crc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(crc_autotest, test_crc);
+REGISTER_FAST_TEST(crc_autotest, True, True, test_crc);
app/test/test_cryptodev.c +19 -19
index fb2af40b99..956268bfcd 100644
@@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest,
 		test_cryptodev_dpaa_sec_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest,
 		test_cryptodev_qat_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest,
 	test_cryptodev_cpu_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest,
 	test_cryptodev_chacha_poly_mb);
-REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
+REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl);
+REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest,
 	test_cryptodev_cpu_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
-REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
-REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
-REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
-REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
+REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null);
+REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
+REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
+REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
+REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
+REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
+REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
+REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
 REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp);
-REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk);
+REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk);
 REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
 REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
 REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
 REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
-REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
-REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
+REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
app/test/test_cryptodev_asym.c +1 -1
index 0ef2642fdd..3d5a73bf89 100644
@@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void)
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
-REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
+REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
app/test/test_cycles.c +1 -1
index 66d11e6db8..08c91cef78 100644
@@ -53,4 +53,4 @@ test_user_delay_us(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us);
+REGISTER_FAST_TEST(user_delay_us, True, True, test_user_delay_us);
app/test/test_debug.c +1 -1
index 2704f5b927..acd9542257 100644
@@ -140,4 +140,4 @@ test_debug(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(debug_autotest, test_debug);
+REGISTER_FAST_TEST(debug_autotest, True, True, test_debug);
app/test/test_devargs.c +1 -1
index 0a4c34a1ad..59ec04957e 100644
@@ -213,4 +213,4 @@ test_devargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
+REGISTER_FAST_TEST(devargs_autotest, True, True, test_devargs);
app/test/test_distributor.c +1 -1
index 3efa4af104..ee263a7fee 100644
@@ -952,4 +952,4 @@ test_distributor(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
+REGISTER_FAST_TEST(distributor_autotest, False, True, test_distributor);
app/test/test_distributor_perf.c +1 -1
index ee4321486d..ca868451d7 100644
@@ -277,4 +277,4 @@ test_distributor_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
+REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf);
app/test/test_dmadev.c +1 -1
index 0736ff2a18..6ef875e545 100644
@@ -941,4 +941,4 @@ test_dma(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
+REGISTER_DRIVER_TEST(dmadev_autotest, test_dma);
app/test/test_eal_flags.c +12 -12
index d2b91e2075..e016881191 100644
@@ -1644,15 +1644,15 @@ test_memory_flags(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
-REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
-REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
-REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
-REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag);
-REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);
-REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);
-REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);
-REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags);
-REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix);
-REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags);
+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);
app/test/test_eal_fs.c +1 -1
index b3686edcb4..a4bdc1236d 100644
@@ -185,4 +185,4 @@ test_eal_fs(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
+REGISTER_FAST_TEST(eal_fs_autotest, True, True, test_eal_fs);
app/test/test_efd.c +1 -1
index fa29e8f97a..1c0986b9bc 100644
@@ -473,4 +473,4 @@ test_efd(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_autotest, test_efd);
+REGISTER_PERF_TEST(efd_autotest, test_efd);
app/test/test_efd_perf.c +1 -1
index 4d04ed93e3..b212e96767 100644
@@ -393,4 +393,4 @@ test_efd_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
+REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf);
app/test/test_errno.c +1 -1
index 0db4fbc8b3..1082299665 100644
@@ -94,4 +94,4 @@ test_errno(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(errno_autotest, test_errno);
+REGISTER_FAST_TEST(errno_autotest, True, True, test_errno);
app/test/test_ethdev_link.c +1 -1
index ab52385a12..d73e18065d 100644
@@ -167,4 +167,4 @@ test_link_status(void)
 	return unit_test_suite_runner(&link_status_testsuite);
 }
 
-REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status);
+REGISTER_FAST_TEST(ethdev_link_status, True, True, test_link_status);
app/test/test_event_ring.c +1 -1
index bc4a6e73f5..d5c8499cfd 100644
@@ -256,4 +256,4 @@ test_event_ring(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
+REGISTER_FAST_TEST(event_ring_autotest, True, True, test_event_ring);
app/test/test_eventdev.c +1 -1
index 336529038e..e65d893781 100644
@@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+REGISTER_FAST_TEST(eventdev_common_autotest, True, True, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
app/test/test_fbarray.c +1 -1
index a691bf4458..03428a45fe 100644
@@ -733,4 +733,4 @@ test_fbarray(void)
 	return unit_test_suite_runner(&fbarray_test_suite);
 }
 
-REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray);
+REGISTER_FAST_TEST(fbarray_autotest, True, True, test_fbarray);
app/test/test_fib.c +2 -2
index eb69d6e2fd..2a8404db61 100644
@@ -415,5 +415,5 @@ test_slow_fib(void)
 	return unit_test_suite_runner(&fib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib_autotest, test_fib);
-REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
+REGISTER_FAST_TEST(fib_autotest, True, True, test_fib);
+REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +2 -2
index 15ad09178a..9b1c0ac8c7 100644
@@ -424,5 +424,5 @@ test_slow_fib6(void)
 	return unit_test_suite_runner(&fib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
-REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
+REGISTER_FAST_TEST(fib6_autotest, True, True, test_fib6);
+REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6);
app/test/test_fib6_perf.c +1 -1
index add20c2331..a7abc46af9 100644
@@ -156,4 +156,4 @@ test_fib6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
+REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf);
app/test/test_fib_perf.c +1 -1
index b56293e64f..a9119c1bb0 100644
@@ -409,4 +409,4 @@ test_fib_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
+REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf);
app/test/test_func_reentrancy.c +1 -1
index ae9de6f93d..63b00009b5 100644
@@ -507,4 +507,4 @@ test_func_reentrancy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
+REGISTER_FAST_TEST(func_reentrancy_autotest, False, True, test_func_reentrancy);
app/test/test_hash.c +1 -1
index 3e45afaa67..e160b27b4c 100644
@@ -2264,4 +2264,4 @@ test_hash(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_autotest, test_hash);
+REGISTER_FAST_TEST(hash_autotest, True, True, test_hash);
app/test/test_hash_functions.c +1 -1
index 76d51b6e71..70820d1f19 100644
@@ -290,4 +290,4 @@ test_hash_functions(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
+REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions);
app/test/test_hash_multiwriter.c +1 -1
index 0c5a8ca186..dd5ca677b9 100644
@@ -287,4 +287,4 @@ test_hash_multiwriter_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
+REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);
app/test/test_hash_perf.c +1 -1
index 14a1283aba..d66b96e5ce 100644
@@ -757,4 +757,4 @@ test_hash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
+REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf);
app/test/test_hash_readwrite.c +2 -2
index 6373e62d33..9c33b49878 100644
@@ -760,5 +760,5 @@ test_hash_rw_func_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
-REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
+REGISTER_FAST_TEST(hash_readwrite_func_autotest, False, True, test_hash_rw_func_main);
+REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_hash_readwrite_lf_perf.c +1 -1
index cf86046a2f..5d18850e19 100644
@@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest,
 	test_hash_readwrite_lf_perf_main);
app/test/test_interrupts.c +1 -1
index b59ab42699..cf6b5a6a8e 100644
@@ -594,4 +594,4 @@ test_interrupt(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
+REGISTER_FAST_TEST(interrupt_autotest, True, True, test_interrupt);
app/test/test_ipfrag.c +1 -1
index 402ce361c1..264825634d 100644
@@ -510,4 +510,4 @@ test_ipfrag(void)
 }
 
 
-REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
+REGISTER_FAST_TEST(ipfrag_autotest, False, True, test_ipfrag);
app/test/test_ipsec.c +1 -1
index c2a52ec305..629580bc21 100644
@@ -2532,4 +2532,4 @@ test_ipsec(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
+REGISTER_FAST_TEST(ipsec_autotest, True, True, test_ipsec);
app/test/test_ipsec_perf.c +1 -1
index b221b7fc32..a32a2086e9 100644
@@ -631,4 +631,4 @@ test_libipsec_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
+REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
app/test/test_kni.c +1 -1
index 4039da0b08..70b1bd6a05 100644
@@ -737,4 +737,4 @@ test_kni(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(kni_autotest, test_kni);
+REGISTER_FAST_TEST(kni_autotest, False, True, test_kni);
app/test/test_kvargs.c +1 -1
index b7b97a0dd9..d0f05a55c7 100644
@@ -292,4 +292,4 @@ test_kvargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
+REGISTER_FAST_TEST(kvargs_autotest, True, True, test_kvargs);
app/test/test_lcores.c +1 -1
index 2c945b0136..b86629c0db 100644
@@ -412,4 +412,4 @@ test_lcores(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
+REGISTER_FAST_TEST(lcores_autotest, True, True, test_lcores);
app/test/test_logs.c +1 -1
index 8da8824bee..38052910e9 100644
@@ -158,4 +158,4 @@ test_logs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(logs_autotest, test_logs);
+REGISTER_FAST_TEST(logs_autotest, True, True, test_logs);
app/test/test_lpm.c +1 -1
index 37b460af3a..85a75ccec0 100644
@@ -1584,4 +1584,4 @@ test_lpm(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
+REGISTER_FAST_TEST(lpm_autotest, True, True, test_lpm);
app/test/test_lpm6.c +1 -1
index b6b6f8615e..4a9eddf276 100644
@@ -1793,4 +1793,4 @@ test_lpm6(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
+REGISTER_FAST_TEST(lpm6_autotest, True, True, test_lpm6);
app/test/test_lpm6_perf.c +1 -1
index 5b684686a6..8a49f74c84 100644
@@ -161,4 +161,4 @@ test_lpm6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
+REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf);
app/test/test_lpm_perf.c +1 -1
index e72437ba38..15ff396dd0 100644
@@ -760,4 +760,4 @@ test_lpm_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
+REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf);
app/test/test_malloc.c +1 -1
index ff081dd931..6057623473 100644
@@ -1091,4 +1091,4 @@ test_malloc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
+REGISTER_FAST_TEST(malloc_autotest, False, True, test_malloc);
app/test/test_malloc_perf.c +1 -1
index 9bd1662981..a99bfd8531 100644
@@ -171,4 +171,4 @@ test_malloc_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);
+REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf);
app/test/test_mbuf.c +1 -1
index efac01806b..2eeed268af 100644
@@ -2955,4 +2955,4 @@ test_mbuf(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
+REGISTER_FAST_TEST(mbuf_autotest, False, True, test_mbuf);
app/test/test_mcslock.c +1 -1
index 52e45e7e2a..a3753a4397 100644
@@ -241,4 +241,4 @@ test_mcslock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock);
+REGISTER_FAST_TEST(mcslock_autotest, False, True, test_mcslock);
app/test/test_member.c +1 -1
index 4a93f8bff4..e17a8f3190 100644
@@ -996,4 +996,4 @@ test_member(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_autotest, test_member);
+REGISTER_FAST_TEST(member_autotest, True, True, test_member);
app/test/test_member_perf.c +1 -1
index 2f79888fbd..db6b8a18ef 100644
@@ -780,4 +780,4 @@ test_member_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
+REGISTER_PERF_TEST(member_perf_autotest, test_member_perf);
app/test/test_memcpy.c +1 -1
index 1ab86f4967..c81efb85c2 100644
@@ -129,4 +129,4 @@ test_memcpy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
+REGISTER_FAST_TEST(memcpy_autotest, True, True, test_memcpy);
app/test/test_memcpy_perf.c +1 -1
index 3727c160e6..5c05a84619 100644
@@ -348,4 +348,4 @@ test_memcpy_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
+REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf);
app/test/test_memory.c +1 -1
index 440e5ef838..13ae9569c2 100644
@@ -110,4 +110,4 @@ test_memory(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memory_autotest, test_memory);
+REGISTER_FAST_TEST(memory_autotest, False, True, test_memory);
app/test/test_mempool.c +1 -1
index 8e493eda47..03047e5b14 100644
@@ -1043,4 +1043,4 @@ test_mempool(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
+REGISTER_FAST_TEST(mempool_autotest, False, True, test_mempool);
app/test/test_mempool_perf.c +1 -1
index ce7c6241ab..96de347f04 100644
@@ -437,4 +437,4 @@ test_mempool_perf(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
+REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf);
app/test/test_memzone.c +1 -1
index f10f4fd9cd..85b5839034 100644
@@ -1163,4 +1163,4 @@ test_memzone(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
+REGISTER_FAST_TEST(memzone_autotest, False, True, test_memzone);
app/test/test_meter.c +1 -1
index 15d5a4839b..3016681bbc 100644
@@ -713,4 +713,4 @@ test_meter(void)
 
 }
 
-REGISTER_TEST_COMMAND(meter_autotest, test_meter);
+REGISTER_FAST_TEST(meter_autotest, True, True, test_meter);
app/test/test_mp_secondary.c +1 -1
index ad47d578f2..502b0235a7 100644
@@ -223,4 +223,4 @@ test_mp_secondary(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
+REGISTER_FAST_TEST(multiprocess_autotest, False, False, test_mp_secondary);
app/test/test_per_lcore.c +1 -1
index 129578d1a3..50011366a7 100644
@@ -105,4 +105,4 @@ test_per_lcore(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
+REGISTER_FAST_TEST(per_lcore_autotest, True, True, test_per_lcore);
app/test/test_pflock.c +1 -1
index 38da6bce27..07e4a68c2c 100644
@@ -193,4 +193,4 @@ test_pflock(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);
+REGISTER_FAST_TEST(pflock_autotest, True, True, test_pflock);
app/test/test_pie.c +3 -3
index a3c0f97c9d..5674602b69 100644
@@ -1087,6 +1087,6 @@ test_pie_all(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(pie_autotest, test_pie);
-REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
-REGISTER_TEST_COMMAND(pie_all, test_pie_all);
+REGISTER_FAST_TEST(pie_autotest, True, True, test_pie);
+REGISTER_PERF_TEST(pie_perf, test_pie_perf);
+REGISTER_PERF_TEST(pie_all, test_pie_all);
app/test/test_pmd_perf.c +1 -1
index 3ef590cb51..f6d97f21c9 100644
@@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
+REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf);
app/test/test_power.c +1 -1
index b7b5561348..d4f622ff2f 100644
@@ -172,4 +172,4 @@ test_power(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_autotest, test_power);
+REGISTER_FAST_TEST(power_autotest, True, True, test_power);
app/test/test_power_cpufreq.c +1 -1
index 4d013cd7bb..f56053ac10 100644
@@ -703,5 +703,5 @@ test_power_caps(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq);
+REGISTER_FAST_TEST(power_cpufreq_autotest, False, True, test_power_cpufreq);
 REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
index 31163af84e..c8a8621e44 100644
@@ -298,4 +298,4 @@ test_power_intel_uncore(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore);
+REGISTER_FAST_TEST(power_intel_uncore_autotest, True, True, test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
index cc66b7a8a0..4919df8b62 100644
@@ -299,4 +299,4 @@ test_power_kvm_vm(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
+REGISTER_FAST_TEST(power_kvm_vm_autotest, False, True, test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
index 7b4a8e4144..a72ae80557 100644
@@ -35,4 +35,4 @@ test_prefetch(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
+REGISTER_FAST_TEST(prefetch_autotest, True, True, test_prefetch);
app/test/test_rand_perf.c +1 -1
index 26fb1d9a58..30204e12c0 100644
@@ -96,4 +96,4 @@ test_rand_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);
+REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf);
app/test/test_rcu_qsbr.c +1 -1
index 70404e89e6..16c24f58e7 100644
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main);
+REGISTER_FAST_TEST(rcu_qsbr_autotest, True, True, test_rcu_qsbr_main);
app/test/test_rcu_qsbr_perf.c +1 -1
index b15e5cef88..ce88a7333c 100644
@@ -690,4 +690,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
+REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
app/test/test_reassembly_perf.c +1 -1
index c11b65291f..4b4929d777 100644
@@ -1000,4 +1000,4 @@ test_reassembly_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf);
+REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf);
app/test/test_reciprocal_division.c +1 -1
index 8ea9b1d24d..fb52b2d5a1 100644
@@ -164,4 +164,4 @@ test_reciprocal(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
+REGISTER_PERF_TEST(reciprocal_division, test_reciprocal);
app/test/test_reciprocal_division_perf.c +1 -1
index 4f625873e5..cf96d46a22 100644
@@ -205,4 +205,4 @@ test_reciprocal_division_perf(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
+REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf);
app/test/test_red.c +2 -2
index 84c292f8d8..aa7538d51a 100644
@@ -1878,5 +1878,5 @@ test_red_all(void)
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
 REGISTER_TEST_COMMAND(red_autotest, test_red);
-REGISTER_TEST_COMMAND(red_perf, test_red_perf);
-REGISTER_TEST_COMMAND(red_all, test_red_all);
+REGISTER_PERF_TEST(red_perf, test_red_perf);
+REGISTER_PERF_TEST(red_all, test_red_all);
app/test/test_reorder.c +1 -1
index c188f6ce67..e66b4b05d4 100644
@@ -548,4 +548,4 @@ test_reorder(void)
 }
 
 
-REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
+REGISTER_FAST_TEST(reorder_autotest, True, True, test_reorder);
app/test/test_rib.c +2 -2
index 65b6856410..a8d60acc3a 100644
@@ -363,5 +363,5 @@ test_slow_rib(void)
 	return unit_test_suite_runner(&rib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib_autotest, test_rib);
-REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
+REGISTER_FAST_TEST(rib_autotest, True, True, test_rib);
+REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +2 -2
index 336b779d2e..9bbd0f406d 100644
@@ -367,5 +367,5 @@ test_slow_rib6(void)
 	return unit_test_suite_runner(&rib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
-REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
+REGISTER_FAST_TEST(rib6_autotest, True, True, test_rib6);
+REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
index bde33ab4a1..d2accbabfa 100644
@@ -1241,4 +1241,4 @@ test_ring(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(ring_autotest, test_ring);
+REGISTER_FAST_TEST(ring_autotest, True, True, test_ring);
app/test/test_ring_perf.c +1 -1
index 3972fd9db3..d7c5a4c30b 100644
@@ -579,4 +579,4 @@ test_ring_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
+REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf);
app/test/test_rwlock.c +4 -4
index 4ae0bf8deb..e8086888fe 100644
@@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void)
 	return process_try_lcore_stats();
 }
 
-REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1);
-REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda);
-REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm);
-REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);
+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);
app/test/test_sched.c +1 -1
index ddec572447..385ca45136 100644
@@ -215,4 +215,4 @@ test_sched(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(sched_autotest, test_sched);
+REGISTER_FAST_TEST(sched_autotest, True, True, test_sched);
app/test/test_security.c +1 -1
index 4783cd0663..a3b962750a 100644
@@ -2314,4 +2314,4 @@ test_security(void)
 	return unit_test_suite_runner(&security_testsuite);
 }
 
-REGISTER_TEST_COMMAND(security_autotest, test_security);
+REGISTER_FAST_TEST(security_autotest, False, True, test_security);
app/test/test_seqlock.c +1 -1
index d26d2c010e..325af38070 100644
@@ -187,4 +187,4 @@ test_seqlock(void)
 	return rc;
 }
 
-REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock);
+REGISTER_FAST_TEST(seqlock_autotest, True, True, test_seqlock);
app/test/test_service_cores.c +2 -2
index 422d2a83e8..6c000417d2 100644
@@ -1040,7 +1040,7 @@ test_service_common(void)
 	return unit_test_suite_runner(&service_tests);
 }
 
-REGISTER_TEST_COMMAND(service_autotest, test_service_common);
+REGISTER_FAST_TEST(service_autotest, True, True, test_service_common);
 
 static struct unit_test_suite service_perf_tests  = {
 	.suite_name = "service core performance test suite",
@@ -1062,4 +1062,4 @@ test_service_perf(void)
 	return unit_test_suite_runner(&service_perf_tests);
 }
 
-REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf);
+REGISTER_PERF_TEST(service_perf_autotest, test_service_perf);
app/test/test_spinlock.c +1 -1
index 3f59372300..d655b606f7 100644
@@ -302,4 +302,4 @@ test_spinlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
+REGISTER_FAST_TEST(spinlock_autotest, True, True, test_spinlock);
app/test/test_stack.c +2 -2
index bc38961433..93bba18469 100644
@@ -379,5 +379,5 @@ test_lf_stack(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_autotest, test_stack);
-REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack);
+REGISTER_FAST_TEST(stack_autotest, False, True, test_stack);
+REGISTER_FAST_TEST(stack_lf_autotest, False, True, test_lf_stack);
app/test/test_stack_perf.c +2 -2
index 1eae00a334..c5e1caa036 100644
@@ -354,5 +354,5 @@ test_lf_stack_perf(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
-REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf);
+REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf);
+REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf);
app/test/test_string_fns.c +1 -1
index 5e105d2bb9..07e72bf680 100644
@@ -182,4 +182,4 @@ test_string_fns(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
+REGISTER_FAST_TEST(string_autotest, True, True, test_string_fns);
app/test/test_tailq.c +1 -1
index 9520219b0a..5598bcd12d 100644
@@ -125,4 +125,4 @@ test_tailq(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
+REGISTER_FAST_TEST(tailq_autotest, True, True, test_tailq);
app/test/test_thash.c +1 -1
index 53d9611e18..dd6468eb56 100644
@@ -966,4 +966,4 @@ test_thash(void)
 	return unit_test_suite_runner(&thash_tests);
 }
 
-REGISTER_TEST_COMMAND(thash_autotest, test_thash);
+REGISTER_FAST_TEST(thash_autotest, True, True, test_thash);
app/test/test_thash_perf.c +1 -1
index 687582aa32..9dfd5d3c21 100644
@@ -135,4 +135,4 @@ test_thash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);
+REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf);
app/test/test_threads.c +1 -1
index a4c4f651a4..6ed6b168d4 100644
@@ -279,4 +279,4 @@ test_threads(void)
 	return unit_test_suite_runner(&threads_test_suite);
 }
 
-REGISTER_TEST_COMMAND(threads_autotest, test_threads);
+REGISTER_FAST_TEST(threads_autotest, True, True, test_threads);
app/test/test_ticketlock.c +1 -1
index 242c136478..25af697c0a 100644
@@ -314,4 +314,4 @@ test_ticketlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock);
+REGISTER_FAST_TEST(ticketlock_autotest, True, True, test_ticketlock);
app/test/test_timer.c +1 -1
index 0c36dc9010..09608a1845 100644
@@ -594,4 +594,4 @@ test_timer(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_autotest, test_timer);
+REGISTER_FAST_TEST(timer_autotest, False, True, test_timer);
app/test/test_timer_perf.c +1 -1
index 0ede4b3e40..d2d74ebbc6 100644
@@ -131,4 +131,4 @@ test_timer_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
+REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf);
app/test/test_timer_racecond.c +1 -1
index bb56ae8324..6f8b448ff8 100644
@@ -172,4 +172,4 @@ test_timer_racecond(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
+REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond);
app/test/test_trace.c +1 -1
index ad4a394a29..96829caed5 100644
@@ -250,4 +250,4 @@ test_trace(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_FAST_TEST(trace_autotest, True, True, test_trace);
app/test/test_trace_perf.c +1 -1
index 46ae7d8074..a6dd075722 100644
@@ -179,4 +179,4 @@ test_trace_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf);
+REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf);
app/test/test_version.c +1 -1
index 1e1ff18656..21016237bc 100644
@@ -25,4 +25,4 @@ test_version(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(version_autotest, test_version);
+REGISTER_FAST_TEST(version_autotest, True, True, test_version);

--
2.39.2

#3 lore raw

RFC PATCH 3/5 app/test: build using per-file dependency matrix

In reply to Bruce Richardson

Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon.

Initial version of this table was generated via analysis of the header files included in each C file.

---
 app/meson.build      |   8 +-
 app/test/meson.build | 796 +++++++++++--------------------------------
 2 files changed, 203 insertions(+), 601 deletions(-)
app/meson.build +5 -3
index 4fc1a83eba..0d8b618e7f 100644
@@ -32,6 +32,11 @@ apps = [
         'test-security-perf',
 ]
 
+if get_option('tests')
+# build the auto test app if enabled.
+    apps += 'test'
+endif
+
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -106,6 +111,3 @@ foreach app:apps
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
 endforeach
-
-# special case the autotests
-subdir('test')
app/test/meson.build +198 -598

804 lines not on this page · raw message

Signature · 1 line
2.39.2
#4 lore raw

RFC PATCH 4/5 app/test: define unit tests suites based on test macros

In reply to Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

---
 app/meson.build               |  7 ++++++-
 app/test/suites/meson.build   | 29 +++++++++++++++++++++++++++++
 buildtools/get-test-suites.py | 24 ++++++++++++++++++++++++
 buildtools/meson.build        |  1 +
 4 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +29 -0
new file mode 100644
index 0000000000..135620578c
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+# some perf tests (eg: memcpy perf autotest)take very long
+# to complete, so timeout to 10 minutes
+timeout_seconds = 600
+
+# process source files to determine the different unit test suites
+# - fast_tests
+# - perf_tests
+# - driver_tests
+test_suites = run_command(get_test_suites_cmd, autotest_sources).stdout().strip().split()
+foreach suite:test_suites
+    suite = suite.split('=')
+    suite_name = suite[0]
+    suite_tests = suite[1].split(',')
+    if suite_name == 'fast-tests'
+    # special fast-test handling here
+
+    else
+        foreach t: suite_tests
+            test(t, dpdk_test,
+                    args: ['--', t],
+                    timeout: timeout_seconds,
+                    is_parallel: false,
+                    suite: suite_name)
+        endforeach
+    endif
+endforeach
buildtools/get-test-suites.py new file +24 -0
new file mode 100644
index 0000000000..43cde80970
@@ -0,0 +1,24 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/meson.build +1 -0
index e1c600e40f..12e4b36165 100644
@@ -18,6 +18,7 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#5 lore raw

RFC PATCH 5/5 app/test: add fast test suite to new build infrastructure

In reply to Bruce Richardson

The fast-tests are special in that they have additional parameters associated with them. This requires script changes and meson.build changes to take account of these parameters.

---
 app/test/suites/meson.build                   | 56 +++++++++++++++++--
 buildtools/get-test-suites.py                 |  9 +++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  1 +
 4 files changed, 61 insertions(+), 5 deletions(-)
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/test/suites/meson.build +51 -5
index 135620578c..720b43eb62 100644
@@ -4,20 +4,24 @@
 # some perf tests (eg: memcpy perf autotest)take very long
 # to complete, so timeout to 10 minutes
 timeout_seconds = 600
+timeout_seconds_fast = 10
+
+test_no_huge_args = ['--no-huge', '-m', '2048']
+has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
+message('hugepage availability: @0@'.format(has_hugepage))
 
 # process source files to determine the different unit test suites
 # - fast_tests
 # - perf_tests
 # - driver_tests
-test_suites = run_command(get_test_suites_cmd, autotest_sources).stdout().strip().split()
+test_suites = run_command(get_test_suites_cmd, autotest_sources,
+         check: true).stdout().strip().split()
 foreach suite:test_suites
     suite = suite.split('=')
     suite_name = suite[0]
     suite_tests = suite[1].split(',')
-    if suite_name == 'fast-tests'
-    # special fast-test handling here
-
-    else
+    if suite_name != 'fast-tests'
+        # simple cases - tests without parameters or special handling
         foreach t: suite_tests
             test(t, dpdk_test,
                     args: ['--', t],
@@ -25,5 +29,47 @@ foreach suite:test_suites
                     is_parallel: false,
                     suite: suite_name)
         endforeach
+    else
+    # special fast-test handling here
+        foreach t: suite_tests
+            params = t.split(':')
+            test_name = params[0]
+            nohuge = params[1] == 'true'
+            asan = params[2] == 'true'
+
+            test_args = []
+            if nohuge
+                test_args += test_no_huge_args
+            elif not has_hugepage
+                continue  #skip this tests
+            endif
+            if not asan and (get_option('b_sanitize') == 'address'
+                    or get_option('b_sanitize') == 'address,undefined')
+                continue  # skip this test
+            endif
+
+            if (get_option('default_library') == 'shared' 
+                    and test_name == 'event_eth_tx_adapter_autotest')
+                test_args += ['-d', dpdk_drivers_build_dir]
+            endif
+            if is_linux
+                test_args += ['--file-prefix=@0@'.format(arg[0])]
+            endif
+
+            test(test_name, dpdk_test,
+                args : test_args + ['--', test_name],
+                timeout : timeout_seconds_fast,
+                is_parallel : false,
+                suite : 'fast-tests')
+            if not is_windows and test_name == 'trace_autotest'
+                test_args += ['--trace=.*']
+                test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]
+                test(test_name + '_with_traces', dpdk_test,
+                    args : test_args + ['--', test_name],
+                    timeout : timeout_seconds_fast,
+                    is_parallel : false,
+                    suite : 'fast-tests')
+            endif
+        endforeach
     endif
 endforeach
buildtools/get-test-suites.py +9 -0
index 43cde80970..95a9cad4c8 100644
@@ -9,6 +9,13 @@
 test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
 test_suites = {}
 
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
 for fname in input_list:
     with open(fname) as f:
         contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
@@ -19,6 +26,8 @@
             test_suites[suite_name].append(test_name)
         else:
             test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
 
 for suite in test_suites.keys():
     print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py
buildtools/meson.build +1 -0
index 12e4b36165..ac5e4dcf08 100644
@@ -19,6 +19,7 @@ sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
 get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#6 lore raw
In reply to Bruce Richardson

Hello Bruce,

Quoted 15 lines · Bruce Richardson

While working on series such as [1] to make DPDK builds more configurable, the majority of the complexity involved centered on the unit tests, and ensuring that the individual files were added/removed from the build as the components were enabled/disabled.

This complexity was exacerbated by:
* C files having multiple dependencies, specifically,
* Some libraries having one set of independent tests, while other library tests requiring additional components
* Having to maintain lists of tests in various suites which also needed to be updated, depending on component availability.
* Everything having to be checked via if-else clauses, since this was not data-driven

Quoted 6 lines

This RFC attempts to address these issues by doing the following:
* Creating a per-file dependency list for the autotests, allowing easy checks of when a file could be built
* Tagging the various fast-tests/perf-tests/drivers-tests suites via macros in the C code. Then scan the C-files we are building to construct the test suites based on what is available

I did not look into the implementation details too much but I like the idea.

Quoted 10 lines

This RFC is just an early prototype, and probably needs cleanup and validation of the dependency lists. Windows support is probably also broken, given the fact that our current build file maintains custom lists there. However, I would hope it should not be too big a job to enable the unit tests for the windows components that are already available. (Tests for any components not being build on windows are already removed via the dependency lists).

Quoted 4 lines

Another (hopefully less-impactful) side-effect of this change is that the "test" binary has moved in the build folder. It is now put along-side the other binaries in "build/app" rather than being in the subdirectory "build/app/test".

Cc ci people.

It may break some CI scripts but it is hard to tell which one. As far as testsuites we run in GHA or UNH are concerned, it is done through meson test so we are good on this side.

Quoted 138 lines

Future work could also be done to scan the C files that are not being build for tests. Those tests could then be stubbed out in an auto-genereated file to always return "SKIPPED", meaning that all test commands are always valid, irrespective of what components are present or not.

[1] http://patches.dpdk.org/project/dpdk/list/?series=28628&state=10

Bruce Richardson (5):
app/test: add new macros for various test types app/test: tag tests with the test type
app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros app/test: add fast test suite to new build infrastructure

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 796 +++++-------------
 app/test/suites/meson.build                   |  75 ++
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kni.c                           |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 114 files changed, 478 insertions(+), 754 deletions(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

Signature · 1 line
David Marchand
#7 lore raw

It will break our 32 bit arm testing because we are unable to use meson test after building for that SoC, so we run through unit tests with a custom list using just dpdk test. It's not a problem, I just need to know when this is going to reach main so I can make the corresponding change to the 32 bit unit testing script beforehand.

#8 lore raw
Quoted 5 lines · Patrick Robb

It will break our 32 bit arm testing because we are unable to use meson test after building for that SoC, so we run through unit tests with a custom list using just dpdk test. It's not a problem, I just need to know when this is going to reach main so I can make the corresponding change to the 32 bit unit testing script beforehand.

The change is necessary because the test binary has moved? Just want to check there are no other issues. I might see if I can provide a symlink or something for compatibility if it helps.

#9 lore raw
Quoted 12 lines · Bruce Richardson
Quoted 1 line · Patrick Robb

It will break our 32 bit arm testing because we are unable to use

meson

Quoted 4 lines

test after building for that SoC, so we run through unit tests with a custom list using just dpdk test. It's not a problem, I just need to know when this is going to reach main so I can make the corresponding change to the 32 bit unit testing script beforehand.

The change is necessary because the test binary has moved? Just want to check there are no other issues. I might see if I can provide a symlink or something for compatibility if it helps.

That's correct, there are no other issues, so it really is simple to correct the patch in our script. A symlink should work, but I guess it becomes clutter.

#10 lore raw

v2 cover expand list of optional libraries

In reply to Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.

V2:
- Changes since RFC:
- merged two previous sets - reworking test build, and disabling libs - into one, since they depend on each other
- Reworked the list of dependencies for each file in the tests, so that files that depend on other files have those deps called out.
- Added list of external dependencies to the test builds
- For disabling libs, merged patches disabling individual libs together into one patch, since all unit test build changes were unnecessary. This made each patch a single-line addition to the optional list in lib/meson.build.

Bruce Richardson (8):
app/test: add new macros for various test types app/test: tag tests with the test type app/test: make telemetry data test buildable on windows app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros examples/l3fwd: make eventdev an optional dependency
build: make most device classes optional
build: expand list of optional libraries

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 818 +++++-------------
 app/test/suites/meson.build                   |  76 ++
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_telemetry_data.c                |  14 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 examples/l3fwd/l3fwd_em.c                     |   2 +
 examples/l3fwd/l3fwd_em_hlm.h                 |   2 +
 examples/l3fwd/l3fwd_event.c                  |   2 +
 examples/l3fwd/l3fwd_event.h                  |   7 +-
 examples/l3fwd/l3fwd_event_generic.c          |   2 +
 examples/l3fwd/l3fwd_event_internal_port.c    |   2 +
 examples/l3fwd/l3fwd_fib.c                    |   2 +
 examples/l3fwd/l3fwd_lpm.c                    |   2 +
 examples/l3fwd/main.c                         |  65 +-
 examples/l3fwd/meson.build                    |   5 +-
 lib/meson.build                               |  15 +
 125 files changed, 607 insertions(+), 766 deletions(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

#11 lore raw

PATCH v2 1/8 app/test: add new macros for various test types

Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type.

---
 app/test/test.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test.h +8 -1
index 85f57efbc6..a91ded76af 100644
@@ -190,7 +190,7 @@ struct test_command {
 
 void add_test_command(struct test_command *t);
 
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
 #define REGISTER_TEST_COMMAND(cmd, func) \
 	static struct test_command test_struct_##cmd = { \
 		.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
 		add_test_command(&test_struct_##cmd); \
 	}
 
+/* 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
+
 #endif
Signature · 1 line
2.39.2
#12 lore raw

PATCH v2 2/8 app/test: tag tests with the test type

In reply to Bruce Richardson

Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.

---
 app/test/test_acl.c                      |  2 +-
 app/test/test_atomic.c                   |  2 +-
 app/test/test_barrier.c                  |  2 +-
 app/test/test_bitmap.c                   |  2 +-
 app/test/test_bitops.c                   |  2 +-
 app/test/test_bpf.c                      |  4 +--
 app/test/test_byteorder.c                |  2 +-
 app/test/test_cksum.c                    |  2 +-
 app/test/test_cmdline.c                  |  2 +-
 app/test/test_common.c                   |  2 +-
 app/test/test_cpuflags.c                 |  2 +-
 app/test/test_crc.c                      |  2 +-
 app/test/test_cryptodev.c                | 38 ++++++++++++------------
 app/test/test_cryptodev_asym.c           |  2 +-
 app/test/test_cycles.c                   |  2 +-
 app/test/test_debug.c                    |  2 +-
 app/test/test_devargs.c                  |  2 +-
 app/test/test_distributor.c              |  2 +-
 app/test/test_distributor_perf.c         |  2 +-
 app/test/test_dmadev.c                   |  2 +-
 app/test/test_eal_flags.c                | 24 +++++++--------
 app/test/test_eal_fs.c                   |  2 +-
 app/test/test_efd.c                      |  2 +-
 app/test/test_efd_perf.c                 |  2 +-
 app/test/test_errno.c                    |  2 +-
 app/test/test_ethdev_link.c              |  2 +-
 app/test/test_event_ring.c               |  2 +-
 app/test/test_eventdev.c                 |  2 +-
 app/test/test_fbarray.c                  |  2 +-
 app/test/test_fib.c                      |  4 +--
 app/test/test_fib6.c                     |  4 +--
 app/test/test_fib6_perf.c                |  2 +-
 app/test/test_fib_perf.c                 |  2 +-
 app/test/test_func_reentrancy.c          |  2 +-
 app/test/test_hash.c                     |  2 +-
 app/test/test_hash_functions.c           |  2 +-
 app/test/test_hash_multiwriter.c         |  2 +-
 app/test/test_hash_perf.c                |  2 +-
 app/test/test_hash_readwrite.c           |  4 +--
 app/test/test_hash_readwrite_lf_perf.c   |  2 +-
 app/test/test_interrupts.c               |  2 +-
 app/test/test_ipfrag.c                   |  2 +-
 app/test/test_ipsec.c                    |  2 +-
 app/test/test_ipsec_perf.c               |  2 +-
 app/test/test_kvargs.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_lpm6_perf.c                |  2 +-
 app/test/test_lpm_perf.c                 |  2 +-
 app/test/test_malloc.c                   |  2 +-
 app/test/test_malloc_perf.c              |  2 +-
 app/test/test_mbuf.c                     |  2 +-
 app/test/test_mcslock.c                  |  2 +-
 app/test/test_member.c                   |  2 +-
 app/test/test_member_perf.c              |  2 +-
 app/test/test_memcpy.c                   |  2 +-
 app/test/test_memcpy_perf.c              |  2 +-
 app/test/test_memory.c                   |  2 +-
 app/test/test_mempool.c                  |  2 +-
 app/test/test_mempool_perf.c             |  2 +-
 app/test/test_memzone.c                  |  2 +-
 app/test/test_meter.c                    |  2 +-
 app/test/test_mp_secondary.c             |  2 +-
 app/test/test_per_lcore.c                |  2 +-
 app/test/test_pflock.c                   |  2 +-
 app/test/test_pie.c                      |  6 ++--
 app/test/test_pmd_perf.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_rand_perf.c                |  2 +-
 app/test/test_rcu_qsbr.c                 |  2 +-
 app/test/test_rcu_qsbr_perf.c            |  2 +-
 app/test/test_reassembly_perf.c          |  2 +-
 app/test/test_reciprocal_division.c      |  2 +-
 app/test/test_reciprocal_division_perf.c |  2 +-
 app/test/test_red.c                      |  4 +--
 app/test/test_reorder.c                  |  2 +-
 app/test/test_rib.c                      |  4 +--
 app/test/test_rib6.c                     |  4 +--
 app/test/test_ring.c                     |  2 +-
 app/test/test_ring_perf.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            |  4 +--
 app/test/test_spinlock.c                 |  2 +-
 app/test/test_stack.c                    |  4 +--
 app/test/test_stack_perf.c               |  4 +--
 app/test/test_string_fns.c               |  2 +-
 app/test/test_tailq.c                    |  2 +-
 app/test/test_thash.c                    |  2 +-
 app/test/test_thash_perf.c               |  2 +-
 app/test/test_threads.c                  |  2 +-
 app/test/test_ticketlock.c               |  2 +-
 app/test/test_timer.c                    |  2 +-
 app/test/test_timer_perf.c               |  2 +-
 app/test/test_timer_racecond.c           |  2 +-
 app/test/test_trace.c                    |  2 +-
 app/test/test_trace_perf.c               |  2 +-
 app/test/test_version.c                  |  2 +-
 106 files changed, 150 insertions(+), 150 deletions(-)
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);
app/test/test_atomic.c +1 -1
index e4b997827e..b52420c10b 100644
@@ -631,4 +631,4 @@ test_atomic(void)
 
 	return 0;
 }
-REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
+REGISTER_FAST_TEST(atomic_autotest, False, True, test_atomic);
app/test/test_barrier.c +1 -1
index ec69af25bf..925a88b68a 100644
@@ -285,4 +285,4 @@ test_barrier(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(barrier_autotest, test_barrier);
+REGISTER_PERF_TEST(barrier_autotest, test_barrier);
app/test/test_bitmap.c +1 -1
index e9c61590ae..2014d2682c 100644
@@ -269,4 +269,4 @@ test_bitmap(void)
 	return test_bitmap_all_set();
 }
 
-REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap);
+REGISTER_FAST_TEST(bitmap_autotest, True, True, test_bitmap);
app/test/test_bitops.c +1 -1
index c21426bf2f..dac466602b 100644
@@ -135,4 +135,4 @@ test_bitops(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(bitops_autotest, test_bitops);
+REGISTER_FAST_TEST(bitops_autotest, True, True, test_bitops);
app/test/test_bpf.c +2 -2
index f5af5e8a3f..5fef17fbc2 100644
@@ -3262,7 +3262,7 @@ test_bpf(void)
 
 #endif /* !RTE_LIB_BPF */
 
-REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
+REGISTER_FAST_TEST(bpf_autotest, True, True, test_bpf);
 
 #ifndef RTE_HAS_LIBPCAP
 
@@ -3473,4 +3473,4 @@ test_bpf_convert(void)
 
 #endif /* RTE_HAS_LIBPCAP */
 
-REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
+REGISTER_FAST_TEST(bpf_convert_autotest, True, True, test_bpf_convert);
app/test/test_byteorder.c +1 -1
index de14ed539e..2189f94744 100644
@@ -63,4 +63,4 @@ test_byteorder(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
+REGISTER_FAST_TEST(byteorder_autotest, True, True, test_byteorder);
app/test/test_cksum.c +1 -1
index 6c15de9a93..c04fae800e 100644
@@ -267,4 +267,4 @@ test_cksum(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
+REGISTER_FAST_TEST(cksum_autotest, True, True, test_cksum);
app/test/test_cmdline.c +1 -1
index 115bee966d..c2a375ac1c 100644
@@ -60,4 +60,4 @@ test_cmdline(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
+REGISTER_FAST_TEST(cmdline_autotest, True, True, test_cmdline);
app/test/test_common.c +1 -1
index f89e1eb7ee..c7b41a3f0e 100644
@@ -350,4 +350,4 @@ test_common(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(common_autotest, test_common);
+REGISTER_FAST_TEST(common_autotest, True, True, test_common);
app/test/test_cpuflags.c +1 -1
index a0e342ae48..c3417dda24 100644
@@ -334,4 +334,4 @@ test_cpuflags(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
+REGISTER_FAST_TEST(cpuflags_autotest, True, True, test_cpuflags);
app/test/test_crc.c +1 -1
index 5edc8fb13b..b267bdde9f 100644
@@ -171,4 +171,4 @@ test_crc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(crc_autotest, test_crc);
+REGISTER_FAST_TEST(crc_autotest, True, True, test_crc);
app/test/test_cryptodev.c +19 -19
index fb2af40b99..956268bfcd 100644
@@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest,
 		test_cryptodev_dpaa_sec_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest,
 		test_cryptodev_qat_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest,
 	test_cryptodev_cpu_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest,
 	test_cryptodev_chacha_poly_mb);
-REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
+REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl);
+REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest,
 	test_cryptodev_cpu_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
-REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
-REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
-REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
-REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
+REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null);
+REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
+REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
+REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
+REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
+REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
+REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
+REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
 REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp);
-REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk);
+REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk);
 REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
 REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
 REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
 REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
-REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
-REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
+REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
app/test/test_cryptodev_asym.c +1 -1
index 0ef2642fdd..3d5a73bf89 100644
@@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void)
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
-REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
+REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
app/test/test_cycles.c +1 -1
index 66d11e6db8..08c91cef78 100644
@@ -53,4 +53,4 @@ test_user_delay_us(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us);
+REGISTER_FAST_TEST(user_delay_us, True, True, test_user_delay_us);
app/test/test_debug.c +1 -1
index 2704f5b927..acd9542257 100644
@@ -140,4 +140,4 @@ test_debug(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(debug_autotest, test_debug);
+REGISTER_FAST_TEST(debug_autotest, True, True, test_debug);
app/test/test_devargs.c +1 -1
index 0a4c34a1ad..59ec04957e 100644
@@ -213,4 +213,4 @@ test_devargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
+REGISTER_FAST_TEST(devargs_autotest, True, True, test_devargs);
app/test/test_distributor.c +1 -1
index 3efa4af104..ee263a7fee 100644
@@ -952,4 +952,4 @@ test_distributor(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
+REGISTER_FAST_TEST(distributor_autotest, False, True, test_distributor);
app/test/test_distributor_perf.c +1 -1
index ee4321486d..ca868451d7 100644
@@ -277,4 +277,4 @@ test_distributor_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
+REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf);
app/test/test_dmadev.c +1 -1
index 0736ff2a18..6ef875e545 100644
@@ -941,4 +941,4 @@ test_dma(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
+REGISTER_DRIVER_TEST(dmadev_autotest, test_dma);
app/test/test_eal_flags.c +12 -12
index 148e9098e8..3b7af7405d 100644
@@ -1644,15 +1644,15 @@ test_memory_flags(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
-REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
-REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
-REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
-REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag);
-REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);
-REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);
-REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);
-REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags);
-REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix);
-REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags);
+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);
app/test/test_eal_fs.c +1 -1
index b3686edcb4..a4bdc1236d 100644
@@ -185,4 +185,4 @@ test_eal_fs(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
+REGISTER_FAST_TEST(eal_fs_autotest, True, True, test_eal_fs);
app/test/test_efd.c +1 -1
index fa29e8f97a..1c0986b9bc 100644
@@ -473,4 +473,4 @@ test_efd(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_autotest, test_efd);
+REGISTER_PERF_TEST(efd_autotest, test_efd);
app/test/test_efd_perf.c +1 -1
index 4d04ed93e3..b212e96767 100644
@@ -393,4 +393,4 @@ test_efd_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
+REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf);
app/test/test_errno.c +1 -1
index 0db4fbc8b3..1082299665 100644
@@ -94,4 +94,4 @@ test_errno(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(errno_autotest, test_errno);
+REGISTER_FAST_TEST(errno_autotest, True, True, test_errno);
app/test/test_ethdev_link.c +1 -1
index ab52385a12..d73e18065d 100644
@@ -167,4 +167,4 @@ test_link_status(void)
 	return unit_test_suite_runner(&link_status_testsuite);
 }
 
-REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status);
+REGISTER_FAST_TEST(ethdev_link_status, True, True, test_link_status);
app/test/test_event_ring.c +1 -1
index bc4a6e73f5..d5c8499cfd 100644
@@ -256,4 +256,4 @@ test_event_ring(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
+REGISTER_FAST_TEST(event_ring_autotest, True, True, test_event_ring);
app/test/test_eventdev.c +1 -1
index 336529038e..e65d893781 100644
@@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+REGISTER_FAST_TEST(eventdev_common_autotest, True, True, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
app/test/test_fbarray.c +1 -1
index a691bf4458..03428a45fe 100644
@@ -733,4 +733,4 @@ test_fbarray(void)
 	return unit_test_suite_runner(&fbarray_test_suite);
 }
 
-REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray);
+REGISTER_FAST_TEST(fbarray_autotest, True, True, test_fbarray);
app/test/test_fib.c +2 -2
index eb69d6e2fd..2a8404db61 100644
@@ -415,5 +415,5 @@ test_slow_fib(void)
 	return unit_test_suite_runner(&fib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib_autotest, test_fib);
-REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
+REGISTER_FAST_TEST(fib_autotest, True, True, test_fib);
+REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +2 -2
index 15ad09178a..9b1c0ac8c7 100644
@@ -424,5 +424,5 @@ test_slow_fib6(void)
 	return unit_test_suite_runner(&fib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
-REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
+REGISTER_FAST_TEST(fib6_autotest, True, True, test_fib6);
+REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6);
app/test/test_fib6_perf.c +1 -1
index add20c2331..a7abc46af9 100644
@@ -156,4 +156,4 @@ test_fib6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
+REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf);
app/test/test_fib_perf.c +1 -1
index b56293e64f..a9119c1bb0 100644
@@ -409,4 +409,4 @@ test_fib_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
+REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf);
app/test/test_func_reentrancy.c +1 -1
index ae9de6f93d..63b00009b5 100644
@@ -507,4 +507,4 @@ test_func_reentrancy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
+REGISTER_FAST_TEST(func_reentrancy_autotest, False, True, test_func_reentrancy);
app/test/test_hash.c +1 -1
index 3e45afaa67..e160b27b4c 100644
@@ -2264,4 +2264,4 @@ test_hash(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_autotest, test_hash);
+REGISTER_FAST_TEST(hash_autotest, True, True, test_hash);
app/test/test_hash_functions.c +1 -1
index 76d51b6e71..70820d1f19 100644
@@ -290,4 +290,4 @@ test_hash_functions(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
+REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions);
app/test/test_hash_multiwriter.c +1 -1
index 0c5a8ca186..dd5ca677b9 100644
@@ -287,4 +287,4 @@ test_hash_multiwriter_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
+REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);
app/test/test_hash_perf.c +1 -1
index 14a1283aba..d66b96e5ce 100644
@@ -757,4 +757,4 @@ test_hash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
+REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf);
app/test/test_hash_readwrite.c +2 -2
index 6373e62d33..9c33b49878 100644
@@ -760,5 +760,5 @@ test_hash_rw_func_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
-REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
+REGISTER_FAST_TEST(hash_readwrite_func_autotest, False, True, test_hash_rw_func_main);
+REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_hash_readwrite_lf_perf.c +1 -1
index cf86046a2f..5d18850e19 100644
@@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest,
 	test_hash_readwrite_lf_perf_main);
app/test/test_interrupts.c +1 -1
index b59ab42699..cf6b5a6a8e 100644
@@ -594,4 +594,4 @@ test_interrupt(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
+REGISTER_FAST_TEST(interrupt_autotest, True, True, test_interrupt);
app/test/test_ipfrag.c +1 -1
index 402ce361c1..264825634d 100644
@@ -510,4 +510,4 @@ test_ipfrag(void)
 }
 
 
-REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
+REGISTER_FAST_TEST(ipfrag_autotest, False, True, test_ipfrag);
app/test/test_ipsec.c +1 -1
index c2a52ec305..629580bc21 100644
@@ -2532,4 +2532,4 @@ test_ipsec(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
+REGISTER_FAST_TEST(ipsec_autotest, True, True, test_ipsec);
app/test/test_ipsec_perf.c +1 -1
index b221b7fc32..a32a2086e9 100644
@@ -631,4 +631,4 @@ test_libipsec_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
+REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
app/test/test_kvargs.c +1 -1
index b7b97a0dd9..d0f05a55c7 100644
@@ -292,4 +292,4 @@ test_kvargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
+REGISTER_FAST_TEST(kvargs_autotest, True, True, test_kvargs);
app/test/test_lcores.c +1 -1
index 2c945b0136..b86629c0db 100644
@@ -412,4 +412,4 @@ test_lcores(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
+REGISTER_FAST_TEST(lcores_autotest, True, True, test_lcores);
app/test/test_logs.c +1 -1
index 8da8824bee..38052910e9 100644
@@ -158,4 +158,4 @@ test_logs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(logs_autotest, test_logs);
+REGISTER_FAST_TEST(logs_autotest, True, True, test_logs);
app/test/test_lpm.c +1 -1
index 37b460af3a..85a75ccec0 100644
@@ -1584,4 +1584,4 @@ test_lpm(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
+REGISTER_FAST_TEST(lpm_autotest, True, True, test_lpm);
app/test/test_lpm6.c +1 -1
index b6b6f8615e..4a9eddf276 100644
@@ -1793,4 +1793,4 @@ test_lpm6(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
+REGISTER_FAST_TEST(lpm6_autotest, True, True, test_lpm6);
app/test/test_lpm6_perf.c +1 -1
index 5b684686a6..8a49f74c84 100644
@@ -161,4 +161,4 @@ test_lpm6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
+REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf);
app/test/test_lpm_perf.c +1 -1
index e72437ba38..15ff396dd0 100644
@@ -760,4 +760,4 @@ test_lpm_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
+REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf);
app/test/test_malloc.c +1 -1
index ff081dd931..6057623473 100644
@@ -1091,4 +1091,4 @@ test_malloc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
+REGISTER_FAST_TEST(malloc_autotest, False, True, test_malloc);
app/test/test_malloc_perf.c +1 -1
index 9bd1662981..a99bfd8531 100644
@@ -171,4 +171,4 @@ test_malloc_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);
+REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf);
app/test/test_mbuf.c +1 -1
index efac01806b..2eeed268af 100644
@@ -2955,4 +2955,4 @@ test_mbuf(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
+REGISTER_FAST_TEST(mbuf_autotest, False, True, test_mbuf);
app/test/test_mcslock.c +1 -1
index 52e45e7e2a..a3753a4397 100644
@@ -241,4 +241,4 @@ test_mcslock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock);
+REGISTER_FAST_TEST(mcslock_autotest, False, True, test_mcslock);
app/test/test_member.c +1 -1
index 4a93f8bff4..e17a8f3190 100644
@@ -996,4 +996,4 @@ test_member(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_autotest, test_member);
+REGISTER_FAST_TEST(member_autotest, True, True, test_member);
app/test/test_member_perf.c +1 -1
index 2f79888fbd..db6b8a18ef 100644
@@ -780,4 +780,4 @@ test_member_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
+REGISTER_PERF_TEST(member_perf_autotest, test_member_perf);
app/test/test_memcpy.c +1 -1
index 1ab86f4967..c81efb85c2 100644
@@ -129,4 +129,4 @@ test_memcpy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
+REGISTER_FAST_TEST(memcpy_autotest, True, True, test_memcpy);
app/test/test_memcpy_perf.c +1 -1
index 3727c160e6..5c05a84619 100644
@@ -348,4 +348,4 @@ test_memcpy_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
+REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf);
app/test/test_memory.c +1 -1
index 440e5ef838..13ae9569c2 100644
@@ -110,4 +110,4 @@ test_memory(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memory_autotest, test_memory);
+REGISTER_FAST_TEST(memory_autotest, False, True, test_memory);
app/test/test_mempool.c +1 -1
index 8e493eda47..03047e5b14 100644
@@ -1043,4 +1043,4 @@ test_mempool(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
+REGISTER_FAST_TEST(mempool_autotest, False, True, test_mempool);
app/test/test_mempool_perf.c +1 -1
index ce7c6241ab..96de347f04 100644
@@ -437,4 +437,4 @@ test_mempool_perf(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
+REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf);
app/test/test_memzone.c +1 -1
index f10f4fd9cd..85b5839034 100644
@@ -1163,4 +1163,4 @@ test_memzone(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
+REGISTER_FAST_TEST(memzone_autotest, False, True, test_memzone);
app/test/test_meter.c +1 -1
index 15d5a4839b..3016681bbc 100644
@@ -713,4 +713,4 @@ test_meter(void)
 
 }
 
-REGISTER_TEST_COMMAND(meter_autotest, test_meter);
+REGISTER_FAST_TEST(meter_autotest, True, True, test_meter);
app/test/test_mp_secondary.c +1 -1
index ad47d578f2..502b0235a7 100644
@@ -223,4 +223,4 @@ test_mp_secondary(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
+REGISTER_FAST_TEST(multiprocess_autotest, False, False, test_mp_secondary);
app/test/test_per_lcore.c +1 -1
index 129578d1a3..50011366a7 100644
@@ -105,4 +105,4 @@ test_per_lcore(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
+REGISTER_FAST_TEST(per_lcore_autotest, True, True, test_per_lcore);
app/test/test_pflock.c +1 -1
index 38da6bce27..07e4a68c2c 100644
@@ -193,4 +193,4 @@ test_pflock(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);
+REGISTER_FAST_TEST(pflock_autotest, True, True, test_pflock);
app/test/test_pie.c +3 -3
index a3c0f97c9d..5674602b69 100644
@@ -1087,6 +1087,6 @@ test_pie_all(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(pie_autotest, test_pie);
-REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
-REGISTER_TEST_COMMAND(pie_all, test_pie_all);
+REGISTER_FAST_TEST(pie_autotest, True, True, test_pie);
+REGISTER_PERF_TEST(pie_perf, test_pie_perf);
+REGISTER_PERF_TEST(pie_all, test_pie_all);
app/test/test_pmd_perf.c +1 -1
index 3ef590cb51..f6d97f21c9 100644
@@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
+REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf);
app/test/test_power.c +1 -1
index b7b5561348..d4f622ff2f 100644
@@ -172,4 +172,4 @@ test_power(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_autotest, test_power);
+REGISTER_FAST_TEST(power_autotest, True, True, test_power);
app/test/test_power_cpufreq.c +1 -1
index 4d013cd7bb..f56053ac10 100644
@@ -703,5 +703,5 @@ test_power_caps(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq);
+REGISTER_FAST_TEST(power_cpufreq_autotest, False, True, test_power_cpufreq);
 REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
index 31163af84e..c8a8621e44 100644
@@ -298,4 +298,4 @@ test_power_intel_uncore(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore);
+REGISTER_FAST_TEST(power_intel_uncore_autotest, True, True, test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
index cc66b7a8a0..4919df8b62 100644
@@ -299,4 +299,4 @@ test_power_kvm_vm(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
+REGISTER_FAST_TEST(power_kvm_vm_autotest, False, True, test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
index 7b4a8e4144..a72ae80557 100644
@@ -35,4 +35,4 @@ test_prefetch(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
+REGISTER_FAST_TEST(prefetch_autotest, True, True, test_prefetch);
app/test/test_rand_perf.c +1 -1
index 26fb1d9a58..30204e12c0 100644
@@ -96,4 +96,4 @@ test_rand_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);
+REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf);
app/test/test_rcu_qsbr.c +1 -1
index 70404e89e6..16c24f58e7 100644
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main);
+REGISTER_FAST_TEST(rcu_qsbr_autotest, True, True, test_rcu_qsbr_main);
app/test/test_rcu_qsbr_perf.c +1 -1
index b15e5cef88..ce88a7333c 100644
@@ -690,4 +690,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
+REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
app/test/test_reassembly_perf.c +1 -1
index c11b65291f..4b4929d777 100644
@@ -1000,4 +1000,4 @@ test_reassembly_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf);
+REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf);
app/test/test_reciprocal_division.c +1 -1
index 8ea9b1d24d..fb52b2d5a1 100644
@@ -164,4 +164,4 @@ test_reciprocal(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
+REGISTER_PERF_TEST(reciprocal_division, test_reciprocal);
app/test/test_reciprocal_division_perf.c +1 -1
index 4f625873e5..cf96d46a22 100644
@@ -205,4 +205,4 @@ test_reciprocal_division_perf(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
+REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf);
app/test/test_red.c +2 -2
index 84c292f8d8..aa7538d51a 100644
@@ -1878,5 +1878,5 @@ test_red_all(void)
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
 REGISTER_TEST_COMMAND(red_autotest, test_red);
-REGISTER_TEST_COMMAND(red_perf, test_red_perf);
-REGISTER_TEST_COMMAND(red_all, test_red_all);
+REGISTER_PERF_TEST(red_perf, test_red_perf);
+REGISTER_PERF_TEST(red_all, test_red_all);
app/test/test_reorder.c +1 -1
index c188f6ce67..e66b4b05d4 100644
@@ -548,4 +548,4 @@ test_reorder(void)
 }
 
 
-REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
+REGISTER_FAST_TEST(reorder_autotest, True, True, test_reorder);
app/test/test_rib.c +2 -2
index 65b6856410..a8d60acc3a 100644
@@ -363,5 +363,5 @@ test_slow_rib(void)
 	return unit_test_suite_runner(&rib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib_autotest, test_rib);
-REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
+REGISTER_FAST_TEST(rib_autotest, True, True, test_rib);
+REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +2 -2
index 336b779d2e..9bbd0f406d 100644
@@ -367,5 +367,5 @@ test_slow_rib6(void)
 	return unit_test_suite_runner(&rib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
-REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
+REGISTER_FAST_TEST(rib6_autotest, True, True, test_rib6);
+REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
index bde33ab4a1..d2accbabfa 100644
@@ -1241,4 +1241,4 @@ test_ring(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(ring_autotest, test_ring);
+REGISTER_FAST_TEST(ring_autotest, True, True, test_ring);
app/test/test_ring_perf.c +1 -1
index 3972fd9db3..d7c5a4c30b 100644
@@ -579,4 +579,4 @@ test_ring_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
+REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf);
app/test/test_rwlock.c +4 -4
index 4ae0bf8deb..e8086888fe 100644
@@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void)
 	return process_try_lcore_stats();
 }
 
-REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1);
-REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda);
-REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm);
-REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);
+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);
app/test/test_sched.c +1 -1
index ddec572447..385ca45136 100644
@@ -215,4 +215,4 @@ test_sched(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(sched_autotest, test_sched);
+REGISTER_FAST_TEST(sched_autotest, True, True, test_sched);
app/test/test_security.c +1 -1
index 4783cd0663..a3b962750a 100644
@@ -2314,4 +2314,4 @@ test_security(void)
 	return unit_test_suite_runner(&security_testsuite);
 }
 
-REGISTER_TEST_COMMAND(security_autotest, test_security);
+REGISTER_FAST_TEST(security_autotest, False, True, test_security);
app/test/test_seqlock.c +1 -1
index d26d2c010e..325af38070 100644
@@ -187,4 +187,4 @@ test_seqlock(void)
 	return rc;
 }
 
-REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock);
+REGISTER_FAST_TEST(seqlock_autotest, True, True, test_seqlock);
app/test/test_service_cores.c +2 -2
index 422d2a83e8..6c000417d2 100644
@@ -1040,7 +1040,7 @@ test_service_common(void)
 	return unit_test_suite_runner(&service_tests);
 }
 
-REGISTER_TEST_COMMAND(service_autotest, test_service_common);
+REGISTER_FAST_TEST(service_autotest, True, True, test_service_common);
 
 static struct unit_test_suite service_perf_tests  = {
 	.suite_name = "service core performance test suite",
@@ -1062,4 +1062,4 @@ test_service_perf(void)
 	return unit_test_suite_runner(&service_perf_tests);
 }
 
-REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf);
+REGISTER_PERF_TEST(service_perf_autotest, test_service_perf);
app/test/test_spinlock.c +1 -1
index 3f59372300..d655b606f7 100644
@@ -302,4 +302,4 @@ test_spinlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
+REGISTER_FAST_TEST(spinlock_autotest, True, True, test_spinlock);
app/test/test_stack.c +2 -2
index bc38961433..93bba18469 100644
@@ -379,5 +379,5 @@ test_lf_stack(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_autotest, test_stack);
-REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack);
+REGISTER_FAST_TEST(stack_autotest, False, True, test_stack);
+REGISTER_FAST_TEST(stack_lf_autotest, False, True, test_lf_stack);
app/test/test_stack_perf.c +2 -2
index 1eae00a334..c5e1caa036 100644
@@ -354,5 +354,5 @@ test_lf_stack_perf(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
-REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf);
+REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf);
+REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf);
app/test/test_string_fns.c +1 -1
index 5e105d2bb9..07e72bf680 100644
@@ -182,4 +182,4 @@ test_string_fns(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
+REGISTER_FAST_TEST(string_autotest, True, True, test_string_fns);
app/test/test_tailq.c +1 -1
index 9520219b0a..5598bcd12d 100644
@@ -125,4 +125,4 @@ test_tailq(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
+REGISTER_FAST_TEST(tailq_autotest, True, True, test_tailq);
app/test/test_thash.c +1 -1
index 53d9611e18..dd6468eb56 100644
@@ -966,4 +966,4 @@ test_thash(void)
 	return unit_test_suite_runner(&thash_tests);
 }
 
-REGISTER_TEST_COMMAND(thash_autotest, test_thash);
+REGISTER_FAST_TEST(thash_autotest, True, True, test_thash);
app/test/test_thash_perf.c +1 -1
index 687582aa32..9dfd5d3c21 100644
@@ -135,4 +135,4 @@ test_thash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);
+REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf);
app/test/test_threads.c +1 -1
index a4c4f651a4..6ed6b168d4 100644
@@ -279,4 +279,4 @@ test_threads(void)
 	return unit_test_suite_runner(&threads_test_suite);
 }
 
-REGISTER_TEST_COMMAND(threads_autotest, test_threads);
+REGISTER_FAST_TEST(threads_autotest, True, True, test_threads);
app/test/test_ticketlock.c +1 -1
index 242c136478..25af697c0a 100644
@@ -314,4 +314,4 @@ test_ticketlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock);
+REGISTER_FAST_TEST(ticketlock_autotest, True, True, test_ticketlock);
app/test/test_timer.c +1 -1
index 0c36dc9010..09608a1845 100644
@@ -594,4 +594,4 @@ test_timer(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_autotest, test_timer);
+REGISTER_FAST_TEST(timer_autotest, False, True, test_timer);
app/test/test_timer_perf.c +1 -1
index 0ede4b3e40..d2d74ebbc6 100644
@@ -131,4 +131,4 @@ test_timer_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
+REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf);
app/test/test_timer_racecond.c +1 -1
index bb56ae8324..6f8b448ff8 100644
@@ -172,4 +172,4 @@ test_timer_racecond(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
+REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond);
app/test/test_trace.c +1 -1
index ad4a394a29..96829caed5 100644
@@ -250,4 +250,4 @@ test_trace(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_FAST_TEST(trace_autotest, True, True, test_trace);
app/test/test_trace_perf.c +1 -1
index 46ae7d8074..a6dd075722 100644
@@ -179,4 +179,4 @@ test_trace_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf);
+REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf);
app/test/test_version.c +1 -1
index 1e1ff18656..21016237bc 100644
@@ -25,4 +25,4 @@ test_version(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(version_autotest, test_version);
+REGISTER_FAST_TEST(version_autotest, True, True, test_version);
Signature · 1 line
2.39.2
#13 lore raw

PATCH v2 3/8 app/test: make telemetry data test buildable on windows

In reply to Bruce Richardson

To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built.

---
 app/test/test_telemetry_data.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
app/test/test_telemetry_data.c +12 -2
index a960f44c1b..b2dc1d75db 100644
@@ -2,11 +2,20 @@
  * Copyright 2020 Intel Corporation
  */
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include "test.h"
+
+static int
+telemetry_data_autotest(void)
+{
+	return TEST_SKIPPED;
+}
+
+#else
+
 #include <string.h>
 #include <sys/socket.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/un.h>
-#endif
 #include <unistd.h>
 #include <limits.h>
 
@@ -604,5 +613,6 @@ telemetry_data_autotest(void)
 	close(sock);
 	return 0;
 }
+#endif /* windows/non-windows */
 
 REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest);
Signature · 1 line
2.39.2
#14 lore raw

PATCH v2 4/8 app/test: build using per-file dependency matrix

In reply to Bruce Richardson

Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon.

Initial version of this table was generated via analysis of the header files included in each C file. The basic dependencies of the test binary [cmdline, ring, mempool and mbuf] were then removed from the per-file lists, as there is no point in checking them as the whole app will be disabled if they are not present.

With the file list, the dependencies for the "utility" C-files are kept separate, so that other tests which depend on the functions provided by those files can have that dependency recorded properly. The basic cryptodev tests also fall into this category as functions from the main cryptodev test file are used by other crypto tests.

As well as the main table for internal dependencies, some test files have separate external components too. A second, much smaller table lists these dependencies.

---
 app/meson.build      |   8 +-
 app/test/meson.build | 818 ++++++++++++-------------------------------
 2 files changed, 231 insertions(+), 595 deletions(-)
app/meson.build +5 -3
index 4fc1a83eba..0d8b618e7f 100644
@@ -32,6 +32,11 @@ apps = [
         'test-security-perf',
 ]
 
+if get_option('tests')
+# build the auto test app if enabled.
+    apps += 'test'
+endif
+
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -106,6 +111,3 @@ foreach app:apps
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
 endforeach
-
-# special case the autotests
-subdir('test')
app/test/meson.build +226 -592

826 lines not on this page · raw message

Signature · 1 line
2.39.2
#15 lore raw

PATCH v2 5/8 app/test: define unit tests suites based on test macros

In reply to Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 76 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 ++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 117 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +76 -0

76 lines not on this page · raw message

buildtools/get-test-suites.py new file +33 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py
buildtools/meson.build +2 -0
index e1c600e40f..ac5e4dcf08 100644
@@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#16 lore raw

PATCH v2 6/8 examples/l3fwd: make eventdev an optional dependency

In reply to Bruce Richardson

With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.

---
 examples/l3fwd/l3fwd_em.c                  |  2 +
 examples/l3fwd/l3fwd_em_hlm.h              |  2 +
 examples/l3fwd/l3fwd_event.c               |  2 +
 examples/l3fwd/l3fwd_event.h               |  7 ++-
 examples/l3fwd/l3fwd_event_generic.c       |  2 +
 examples/l3fwd/l3fwd_event_internal_port.c |  2 +
 examples/l3fwd/l3fwd_fib.c                 |  2 +
 examples/l3fwd/l3fwd_lpm.c                 |  2 +
 examples/l3fwd/main.c                      | 65 +++++++++++++++++-----
 examples/l3fwd/meson.build                 |  5 +-
 10 files changed, 74 insertions(+), 17 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
index 476ac0c54f..40e102b38a 100644
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline void
 em_event_loop_single(struct l3fwd_event_resources *evt_rsrc,
 		const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	em_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Initialize exact match (hash) parameters. 8< */
 void
examples/l3fwd/l3fwd_em_hlm.h +2 -0
index 2e11eefad7..31cda9ddc1 100644
@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 	send_packets_multi(qconf, pkts_burst, dst_port, nb_rx);
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /*
  * Buffer optimized handling of events, invoked
  * from main_loop.
@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,
 
 	process_event_vector(vec, dst_port);
 }
+#endif /* RTE_LIB_EVENTDEV */
 
 #endif /* __L3FWD_EM_HLM_H__ */
examples/l3fwd/l3fwd_event.c +2 -0
index 32906ab08d..d72a4138cc 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 #include <getopt.h>
 
@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 	rte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush,
 			       NULL);
 }
+#endif /* #ifdef RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event.h +5 -2
index e21817c36b..1fd6fe4a78 100644
@@ -6,11 +6,13 @@
 #define __L3FWD_EVENTDEV_H__
 
 #include <rte_common.h>
+#include <rte_service.h>
+#include <rte_spinlock.h>
+
+#ifdef RTE_LIB_EVENTDEV
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
-#include <rte_service.h>
-#include <rte_spinlock.h>
 
 #include "l3fwd.h"
 
@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 				struct rte_event events[], uint16_t nb_enq,
 				uint16_t nb_deq, uint8_t is_vector);
 
+#endif /* ifdef RTE_LIB_EVENTDEV */
 #endif /* __L3FWD_EVENTDEV_H__ */
examples/l3fwd/l3fwd_event_generic.c +2 -0
index c80573fc58..ddb6e5c38d 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_generic;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event_internal_port.c +2 -0
index 32cf657148..cb49a8b9fa 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_internal_port;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_fib.c +2 -0
index 18398492ae..6a21984415 100644
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /* One eventdev loop for single and burst using fib. */
 static __rte_always_inline void
 fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	fib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Function to setup fib. 8< */
 void
examples/l3fwd/l3fwd_lpm.c +2 -0
index 4ac1925c84..a484a33089 100644
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline uint16_t
 lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	lpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 void
 setup_lpm(const int socketid)
examples/l3fwd/main.c +51 -14

227 lines not on this page · raw message

examples/l3fwd/meson.build +4 -1
index b40244a941..c25de77bba 100644
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 allow_experimental_apis = true
-deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']
+deps += ['acl', 'hash', 'lpm', 'fib']
 sources = files(
         'l3fwd_acl.c',
         'l3fwd_em.c',
@@ -18,3 +18,6 @@ sources = files(
         'l3fwd_lpm.c',
         'main.c',
 )
+if dpdk_conf.has('RTE_LIB_EVENTDEV')
+    deps += 'eventdev'
+endif
Signature · 1 line
2.39.2
#17 lore raw

PATCH v2 7/8 build: make most device classes optional

In reply to Bruce Richardson

Apart from ethdev and cryptodev, which have lots of components and tests which depend on them, we can make the device class libraries optional without too much work.

This patch marks:
* bbdev,
* compressdev,
* dmadev,
* eventdev,
* mldev,
* rawdev,
* regexdev
optional, and ensures that DPDK - including tests - can be built with these components disabled.

---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)
lib/meson.build +7 -0
index 92cbd6bb66..1a78c8c984 100644
@@ -67,8 +67,12 @@ libraries = [
 ]
 
 optional_libs = [
+        'bbdev',
         'bitratestats',
         'cfgfile',
+        'compressdev',
+        'dmadev',
+        'eventdev',
         'gpudev',
         'graph',
         'gro',
@@ -76,11 +80,14 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'mldev',
         'node',
         'pdump',
         'pipeline',
         'port',
         'power',
+        'rawdev',
+        'regexdev',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#18 lore raw

PATCH v2 8/8 build: expand list of optional libraries

In reply to Bruce Richardson

With the unit test build now with individual per-file dependencies, we can more easily expand the list of optional libraries. Add 8 new libraries to the optional list.

---
 lib/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
lib/meson.build +8 -0
index 1a78c8c984..0c9dc8b3b6 100644
@@ -69,25 +69,33 @@ libraries = [
 optional_libs = [
         'bbdev',
         'bitratestats',
+        'bpf',
         'cfgfile',
         'compressdev',
+        'distributor',
         'dmadev',
+        'efd',
         'eventdev',
         'gpudev',
         'graph',
         'gro',
         'gso',
+        'ip_frag',
         'jobstats',
         'latencystats',
+        'member',
         'metrics',
         'mldev',
         'node',
+        'pcapng',
         'pdump',
         'pipeline',
         'port',
         'power',
         'rawdev',
         'regexdev',
+        'reorder',
+        'sched',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#19 lore raw

Re: [PATCH v2 0/8] expand list of optional libraries

In reply to Bruce Richardson
Quoted 17 lines · Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

Quoted 10 lines

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.

Apologies, some other things I neglected to mention in the notes above.

This patchset has revealed some issues with the building and running of unit tests:
* Some files/tests were not getting built, and look to have been missed years ago in the move from make to meson. Specifically those tests using external resources, e.g. the cfgfile tests, are not buildable and have not been for years.
* There are quite a number of tests defined that are not registered in a test suite in meson and which cannot be run through meson test. Since the test cases were automatically tagged via script when generating this patchset, the offending test cases can now be found by grepping the sources for use of the old "REGISTER_TEST_COMMAND" macro.

The fixing of these issues I consider outside the scope of this set, and won't be looking at in subsequent revisions. Hopefully #2 should be fairly easy to rectify in future, but #1 may be more complex.

/Bruce

#20 lore raw

v3 cover expand list of optional libraries

In reply to Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.
* A number of files in the test directory were not being built, and seem to have never been built with meson. This requires separate work, outside the scope of the patchset to fix.
* Similarly, some unit tests were never added to test suites. These can now be found by using grep to find the old REGISTER_TEST_COMMAND macro. Again, adding orphan tests to suites is outside the scope of this set.

V3:
- Create symlink to old path to test binary, to ensure all automated CI, and any other use of the test binary still works.

V2:
- Changes since RFC:
- merged two previous sets - reworking test build, and disabling libs - into one, since they depend on each other
- Reworked the list of dependencies for each file in the tests, so that files that depend on other files have those deps called out.
- Added list of external dependencies to the test builds
- For disabling libs, merged patches disabling individual libs together into one patch, since all unit test build changes were unnecessary. This made each patch a single-line addition to the optional list in lib/meson.build.

Bruce Richardson (8):
app/test: add new macros for various test types app/test: tag tests with the test type app/test: make telemetry data test buildable on windows app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros examples/l3fwd: make eventdev an optional dependency
build: make most device classes optional
build: expand list of optional libraries

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 823 +++++-------------
 app/test/suites/meson.build                   |  76 ++
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_telemetry_data.c                |  14 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 examples/l3fwd/l3fwd_em.c                     |   2 +
 examples/l3fwd/l3fwd_em_hlm.h                 |   2 +
 examples/l3fwd/l3fwd_event.c                  |   2 +
 examples/l3fwd/l3fwd_event.h                  |   7 +-
 examples/l3fwd/l3fwd_event_generic.c          |   2 +
 examples/l3fwd/l3fwd_event_internal_port.c    |   2 +
 examples/l3fwd/l3fwd_fib.c                    |   2 +
 examples/l3fwd/l3fwd_lpm.c                    |   2 +
 examples/l3fwd/main.c                         |  65 +-
 examples/l3fwd/meson.build                    |   5 +-
 lib/meson.build                               |  15 +
 125 files changed, 614 insertions(+), 764 deletions(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

#21 lore raw

PATCH v3 1/8 app/test: add new macros for various test types

Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type.

---
 app/test/test.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test.h +8 -1
index 85f57efbc6..a91ded76af 100644
@@ -190,7 +190,7 @@ struct test_command {
 
 void add_test_command(struct test_command *t);
 
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
 #define REGISTER_TEST_COMMAND(cmd, func) \
 	static struct test_command test_struct_##cmd = { \
 		.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
 		add_test_command(&test_struct_##cmd); \
 	}
 
+/* 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
+
 #endif
Signature · 1 line
2.39.2
#22 lore raw

PATCH v3 2/8 app/test: tag tests with the test type

In reply to Bruce Richardson

Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.

---
 app/test/test_acl.c                      |  2 +-
 app/test/test_atomic.c                   |  2 +-
 app/test/test_barrier.c                  |  2 +-
 app/test/test_bitmap.c                   |  2 +-
 app/test/test_bitops.c                   |  2 +-
 app/test/test_bpf.c                      |  4 +--
 app/test/test_byteorder.c                |  2 +-
 app/test/test_cksum.c                    |  2 +-
 app/test/test_cmdline.c                  |  2 +-
 app/test/test_common.c                   |  2 +-
 app/test/test_cpuflags.c                 |  2 +-
 app/test/test_crc.c                      |  2 +-
 app/test/test_cryptodev.c                | 38 ++++++++++++------------
 app/test/test_cryptodev_asym.c           |  2 +-
 app/test/test_cycles.c                   |  2 +-
 app/test/test_debug.c                    |  2 +-
 app/test/test_devargs.c                  |  2 +-
 app/test/test_distributor.c              |  2 +-
 app/test/test_distributor_perf.c         |  2 +-
 app/test/test_dmadev.c                   |  2 +-
 app/test/test_eal_flags.c                | 24 +++++++--------
 app/test/test_eal_fs.c                   |  2 +-
 app/test/test_efd.c                      |  2 +-
 app/test/test_efd_perf.c                 |  2 +-
 app/test/test_errno.c                    |  2 +-
 app/test/test_ethdev_link.c              |  2 +-
 app/test/test_event_ring.c               |  2 +-
 app/test/test_eventdev.c                 |  2 +-
 app/test/test_fbarray.c                  |  2 +-
 app/test/test_fib.c                      |  4 +--
 app/test/test_fib6.c                     |  4 +--
 app/test/test_fib6_perf.c                |  2 +-
 app/test/test_fib_perf.c                 |  2 +-
 app/test/test_func_reentrancy.c          |  2 +-
 app/test/test_hash.c                     |  2 +-
 app/test/test_hash_functions.c           |  2 +-
 app/test/test_hash_multiwriter.c         |  2 +-
 app/test/test_hash_perf.c                |  2 +-
 app/test/test_hash_readwrite.c           |  4 +--
 app/test/test_hash_readwrite_lf_perf.c   |  2 +-
 app/test/test_interrupts.c               |  2 +-
 app/test/test_ipfrag.c                   |  2 +-
 app/test/test_ipsec.c                    |  2 +-
 app/test/test_ipsec_perf.c               |  2 +-
 app/test/test_kvargs.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_lpm6_perf.c                |  2 +-
 app/test/test_lpm_perf.c                 |  2 +-
 app/test/test_malloc.c                   |  2 +-
 app/test/test_malloc_perf.c              |  2 +-
 app/test/test_mbuf.c                     |  2 +-
 app/test/test_mcslock.c                  |  2 +-
 app/test/test_member.c                   |  2 +-
 app/test/test_member_perf.c              |  2 +-
 app/test/test_memcpy.c                   |  2 +-
 app/test/test_memcpy_perf.c              |  2 +-
 app/test/test_memory.c                   |  2 +-
 app/test/test_mempool.c                  |  2 +-
 app/test/test_mempool_perf.c             |  2 +-
 app/test/test_memzone.c                  |  2 +-
 app/test/test_meter.c                    |  2 +-
 app/test/test_mp_secondary.c             |  2 +-
 app/test/test_per_lcore.c                |  2 +-
 app/test/test_pflock.c                   |  2 +-
 app/test/test_pie.c                      |  6 ++--
 app/test/test_pmd_perf.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_rand_perf.c                |  2 +-
 app/test/test_rcu_qsbr.c                 |  2 +-
 app/test/test_rcu_qsbr_perf.c            |  2 +-
 app/test/test_reassembly_perf.c          |  2 +-
 app/test/test_reciprocal_division.c      |  2 +-
 app/test/test_reciprocal_division_perf.c |  2 +-
 app/test/test_red.c                      |  4 +--
 app/test/test_reorder.c                  |  2 +-
 app/test/test_rib.c                      |  4 +--
 app/test/test_rib6.c                     |  4 +--
 app/test/test_ring.c                     |  2 +-
 app/test/test_ring_perf.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            |  4 +--
 app/test/test_spinlock.c                 |  2 +-
 app/test/test_stack.c                    |  4 +--
 app/test/test_stack_perf.c               |  4 +--
 app/test/test_string_fns.c               |  2 +-
 app/test/test_tailq.c                    |  2 +-
 app/test/test_thash.c                    |  2 +-
 app/test/test_thash_perf.c               |  2 +-
 app/test/test_threads.c                  |  2 +-
 app/test/test_ticketlock.c               |  2 +-
 app/test/test_timer.c                    |  2 +-
 app/test/test_timer_perf.c               |  2 +-
 app/test/test_timer_racecond.c           |  2 +-
 app/test/test_trace.c                    |  2 +-
 app/test/test_trace_perf.c               |  2 +-
 app/test/test_version.c                  |  2 +-
 106 files changed, 150 insertions(+), 150 deletions(-)
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);
app/test/test_atomic.c +1 -1
index e4b997827e..b52420c10b 100644
@@ -631,4 +631,4 @@ test_atomic(void)
 
 	return 0;
 }
-REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
+REGISTER_FAST_TEST(atomic_autotest, False, True, test_atomic);
app/test/test_barrier.c +1 -1
index ec69af25bf..925a88b68a 100644
@@ -285,4 +285,4 @@ test_barrier(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(barrier_autotest, test_barrier);
+REGISTER_PERF_TEST(barrier_autotest, test_barrier);
app/test/test_bitmap.c +1 -1
index e9c61590ae..2014d2682c 100644
@@ -269,4 +269,4 @@ test_bitmap(void)
 	return test_bitmap_all_set();
 }
 
-REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap);
+REGISTER_FAST_TEST(bitmap_autotest, True, True, test_bitmap);
app/test/test_bitops.c +1 -1
index c21426bf2f..dac466602b 100644
@@ -135,4 +135,4 @@ test_bitops(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(bitops_autotest, test_bitops);
+REGISTER_FAST_TEST(bitops_autotest, True, True, test_bitops);
app/test/test_bpf.c +2 -2
index f5af5e8a3f..5fef17fbc2 100644
@@ -3262,7 +3262,7 @@ test_bpf(void)
 
 #endif /* !RTE_LIB_BPF */
 
-REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
+REGISTER_FAST_TEST(bpf_autotest, True, True, test_bpf);
 
 #ifndef RTE_HAS_LIBPCAP
 
@@ -3473,4 +3473,4 @@ test_bpf_convert(void)
 
 #endif /* RTE_HAS_LIBPCAP */
 
-REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
+REGISTER_FAST_TEST(bpf_convert_autotest, True, True, test_bpf_convert);
app/test/test_byteorder.c +1 -1
index de14ed539e..2189f94744 100644
@@ -63,4 +63,4 @@ test_byteorder(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
+REGISTER_FAST_TEST(byteorder_autotest, True, True, test_byteorder);
app/test/test_cksum.c +1 -1
index 6c15de9a93..c04fae800e 100644
@@ -267,4 +267,4 @@ test_cksum(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
+REGISTER_FAST_TEST(cksum_autotest, True, True, test_cksum);
app/test/test_cmdline.c +1 -1
index 115bee966d..c2a375ac1c 100644
@@ -60,4 +60,4 @@ test_cmdline(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
+REGISTER_FAST_TEST(cmdline_autotest, True, True, test_cmdline);
app/test/test_common.c +1 -1
index f89e1eb7ee..c7b41a3f0e 100644
@@ -350,4 +350,4 @@ test_common(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(common_autotest, test_common);
+REGISTER_FAST_TEST(common_autotest, True, True, test_common);
app/test/test_cpuflags.c +1 -1
index a0e342ae48..c3417dda24 100644
@@ -334,4 +334,4 @@ test_cpuflags(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
+REGISTER_FAST_TEST(cpuflags_autotest, True, True, test_cpuflags);
app/test/test_crc.c +1 -1
index 5edc8fb13b..b267bdde9f 100644
@@ -171,4 +171,4 @@ test_crc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(crc_autotest, test_crc);
+REGISTER_FAST_TEST(crc_autotest, True, True, test_crc);
app/test/test_cryptodev.c +19 -19
index fb2af40b99..956268bfcd 100644
@@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest,
 		test_cryptodev_dpaa_sec_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest,
 		test_cryptodev_qat_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest,
 	test_cryptodev_cpu_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest,
 	test_cryptodev_chacha_poly_mb);
-REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
+REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl);
+REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest,
 	test_cryptodev_cpu_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
-REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
-REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
-REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
-REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
+REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null);
+REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
+REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
+REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
+REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
+REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
+REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
+REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
 REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp);
-REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk);
+REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk);
 REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
 REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
 REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
 REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
-REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
-REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
+REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
app/test/test_cryptodev_asym.c +1 -1
index 0ef2642fdd..3d5a73bf89 100644
@@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void)
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
-REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
+REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
app/test/test_cycles.c +1 -1
index 66d11e6db8..08c91cef78 100644
@@ -53,4 +53,4 @@ test_user_delay_us(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us);
+REGISTER_FAST_TEST(user_delay_us, True, True, test_user_delay_us);
app/test/test_debug.c +1 -1
index 2704f5b927..acd9542257 100644
@@ -140,4 +140,4 @@ test_debug(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(debug_autotest, test_debug);
+REGISTER_FAST_TEST(debug_autotest, True, True, test_debug);
app/test/test_devargs.c +1 -1
index 0a4c34a1ad..59ec04957e 100644
@@ -213,4 +213,4 @@ test_devargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
+REGISTER_FAST_TEST(devargs_autotest, True, True, test_devargs);
app/test/test_distributor.c +1 -1
index 3efa4af104..ee263a7fee 100644
@@ -952,4 +952,4 @@ test_distributor(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
+REGISTER_FAST_TEST(distributor_autotest, False, True, test_distributor);
app/test/test_distributor_perf.c +1 -1
index ee4321486d..ca868451d7 100644
@@ -277,4 +277,4 @@ test_distributor_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
+REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf);
app/test/test_dmadev.c +1 -1
index 0736ff2a18..6ef875e545 100644
@@ -941,4 +941,4 @@ test_dma(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
+REGISTER_DRIVER_TEST(dmadev_autotest, test_dma);
app/test/test_eal_flags.c +12 -12
index 148e9098e8..3b7af7405d 100644
@@ -1644,15 +1644,15 @@ test_memory_flags(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
-REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
-REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
-REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
-REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag);
-REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);
-REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);
-REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);
-REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags);
-REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix);
-REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags);
+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);
app/test/test_eal_fs.c +1 -1
index b3686edcb4..a4bdc1236d 100644
@@ -185,4 +185,4 @@ test_eal_fs(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
+REGISTER_FAST_TEST(eal_fs_autotest, True, True, test_eal_fs);
app/test/test_efd.c +1 -1
index fa29e8f97a..1c0986b9bc 100644
@@ -473,4 +473,4 @@ test_efd(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_autotest, test_efd);
+REGISTER_PERF_TEST(efd_autotest, test_efd);
app/test/test_efd_perf.c +1 -1
index 4d04ed93e3..b212e96767 100644
@@ -393,4 +393,4 @@ test_efd_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
+REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf);
app/test/test_errno.c +1 -1
index 0db4fbc8b3..1082299665 100644
@@ -94,4 +94,4 @@ test_errno(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(errno_autotest, test_errno);
+REGISTER_FAST_TEST(errno_autotest, True, True, test_errno);
app/test/test_ethdev_link.c +1 -1
index ab52385a12..d73e18065d 100644
@@ -167,4 +167,4 @@ test_link_status(void)
 	return unit_test_suite_runner(&link_status_testsuite);
 }
 
-REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status);
+REGISTER_FAST_TEST(ethdev_link_status, True, True, test_link_status);
app/test/test_event_ring.c +1 -1
index bc4a6e73f5..d5c8499cfd 100644
@@ -256,4 +256,4 @@ test_event_ring(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
+REGISTER_FAST_TEST(event_ring_autotest, True, True, test_event_ring);
app/test/test_eventdev.c +1 -1
index 336529038e..e65d893781 100644
@@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+REGISTER_FAST_TEST(eventdev_common_autotest, True, True, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
app/test/test_fbarray.c +1 -1
index a691bf4458..03428a45fe 100644
@@ -733,4 +733,4 @@ test_fbarray(void)
 	return unit_test_suite_runner(&fbarray_test_suite);
 }
 
-REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray);
+REGISTER_FAST_TEST(fbarray_autotest, True, True, test_fbarray);
app/test/test_fib.c +2 -2
index eb69d6e2fd..2a8404db61 100644
@@ -415,5 +415,5 @@ test_slow_fib(void)
 	return unit_test_suite_runner(&fib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib_autotest, test_fib);
-REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
+REGISTER_FAST_TEST(fib_autotest, True, True, test_fib);
+REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +2 -2
index 15ad09178a..9b1c0ac8c7 100644
@@ -424,5 +424,5 @@ test_slow_fib6(void)
 	return unit_test_suite_runner(&fib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
-REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
+REGISTER_FAST_TEST(fib6_autotest, True, True, test_fib6);
+REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6);
app/test/test_fib6_perf.c +1 -1
index add20c2331..a7abc46af9 100644
@@ -156,4 +156,4 @@ test_fib6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
+REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf);
app/test/test_fib_perf.c +1 -1
index b56293e64f..a9119c1bb0 100644
@@ -409,4 +409,4 @@ test_fib_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
+REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf);
app/test/test_func_reentrancy.c +1 -1
index ae9de6f93d..63b00009b5 100644
@@ -507,4 +507,4 @@ test_func_reentrancy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
+REGISTER_FAST_TEST(func_reentrancy_autotest, False, True, test_func_reentrancy);
app/test/test_hash.c +1 -1
index 3e45afaa67..e160b27b4c 100644
@@ -2264,4 +2264,4 @@ test_hash(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_autotest, test_hash);
+REGISTER_FAST_TEST(hash_autotest, True, True, test_hash);
app/test/test_hash_functions.c +1 -1
index 76d51b6e71..70820d1f19 100644
@@ -290,4 +290,4 @@ test_hash_functions(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
+REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions);
app/test/test_hash_multiwriter.c +1 -1
index 0c5a8ca186..dd5ca677b9 100644
@@ -287,4 +287,4 @@ test_hash_multiwriter_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
+REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);
app/test/test_hash_perf.c +1 -1
index 14a1283aba..d66b96e5ce 100644
@@ -757,4 +757,4 @@ test_hash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
+REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf);
app/test/test_hash_readwrite.c +2 -2
index 6373e62d33..9c33b49878 100644
@@ -760,5 +760,5 @@ test_hash_rw_func_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
-REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
+REGISTER_FAST_TEST(hash_readwrite_func_autotest, False, True, test_hash_rw_func_main);
+REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_hash_readwrite_lf_perf.c +1 -1
index cf86046a2f..5d18850e19 100644
@@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest,
 	test_hash_readwrite_lf_perf_main);
app/test/test_interrupts.c +1 -1
index b59ab42699..cf6b5a6a8e 100644
@@ -594,4 +594,4 @@ test_interrupt(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
+REGISTER_FAST_TEST(interrupt_autotest, True, True, test_interrupt);
app/test/test_ipfrag.c +1 -1
index 402ce361c1..264825634d 100644
@@ -510,4 +510,4 @@ test_ipfrag(void)
 }
 
 
-REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
+REGISTER_FAST_TEST(ipfrag_autotest, False, True, test_ipfrag);
app/test/test_ipsec.c +1 -1
index c2a52ec305..629580bc21 100644
@@ -2532,4 +2532,4 @@ test_ipsec(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
+REGISTER_FAST_TEST(ipsec_autotest, True, True, test_ipsec);
app/test/test_ipsec_perf.c +1 -1
index b221b7fc32..a32a2086e9 100644
@@ -631,4 +631,4 @@ test_libipsec_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
+REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
app/test/test_kvargs.c +1 -1
index b7b97a0dd9..d0f05a55c7 100644
@@ -292,4 +292,4 @@ test_kvargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
+REGISTER_FAST_TEST(kvargs_autotest, True, True, test_kvargs);
app/test/test_lcores.c +1 -1
index 2c945b0136..b86629c0db 100644
@@ -412,4 +412,4 @@ test_lcores(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
+REGISTER_FAST_TEST(lcores_autotest, True, True, test_lcores);
app/test/test_logs.c +1 -1
index 8da8824bee..38052910e9 100644
@@ -158,4 +158,4 @@ test_logs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(logs_autotest, test_logs);
+REGISTER_FAST_TEST(logs_autotest, True, True, test_logs);
app/test/test_lpm.c +1 -1
index 37b460af3a..85a75ccec0 100644
@@ -1584,4 +1584,4 @@ test_lpm(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
+REGISTER_FAST_TEST(lpm_autotest, True, True, test_lpm);
app/test/test_lpm6.c +1 -1
index b6b6f8615e..4a9eddf276 100644
@@ -1793,4 +1793,4 @@ test_lpm6(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
+REGISTER_FAST_TEST(lpm6_autotest, True, True, test_lpm6);
app/test/test_lpm6_perf.c +1 -1
index 5b684686a6..8a49f74c84 100644
@@ -161,4 +161,4 @@ test_lpm6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
+REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf);
app/test/test_lpm_perf.c +1 -1
index e72437ba38..15ff396dd0 100644
@@ -760,4 +760,4 @@ test_lpm_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
+REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf);
app/test/test_malloc.c +1 -1
index ff081dd931..6057623473 100644
@@ -1091,4 +1091,4 @@ test_malloc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
+REGISTER_FAST_TEST(malloc_autotest, False, True, test_malloc);
app/test/test_malloc_perf.c +1 -1
index 9bd1662981..a99bfd8531 100644
@@ -171,4 +171,4 @@ test_malloc_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);
+REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf);
app/test/test_mbuf.c +1 -1
index efac01806b..2eeed268af 100644
@@ -2955,4 +2955,4 @@ test_mbuf(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
+REGISTER_FAST_TEST(mbuf_autotest, False, True, test_mbuf);
app/test/test_mcslock.c +1 -1
index 52e45e7e2a..a3753a4397 100644
@@ -241,4 +241,4 @@ test_mcslock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock);
+REGISTER_FAST_TEST(mcslock_autotest, False, True, test_mcslock);
app/test/test_member.c +1 -1
index 4a93f8bff4..e17a8f3190 100644
@@ -996,4 +996,4 @@ test_member(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_autotest, test_member);
+REGISTER_FAST_TEST(member_autotest, True, True, test_member);
app/test/test_member_perf.c +1 -1
index 2f79888fbd..db6b8a18ef 100644
@@ -780,4 +780,4 @@ test_member_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
+REGISTER_PERF_TEST(member_perf_autotest, test_member_perf);
app/test/test_memcpy.c +1 -1
index 1ab86f4967..c81efb85c2 100644
@@ -129,4 +129,4 @@ test_memcpy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
+REGISTER_FAST_TEST(memcpy_autotest, True, True, test_memcpy);
app/test/test_memcpy_perf.c +1 -1
index 3727c160e6..5c05a84619 100644
@@ -348,4 +348,4 @@ test_memcpy_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
+REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf);
app/test/test_memory.c +1 -1
index 440e5ef838..13ae9569c2 100644
@@ -110,4 +110,4 @@ test_memory(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memory_autotest, test_memory);
+REGISTER_FAST_TEST(memory_autotest, False, True, test_memory);
app/test/test_mempool.c +1 -1
index 8e493eda47..03047e5b14 100644
@@ -1043,4 +1043,4 @@ test_mempool(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
+REGISTER_FAST_TEST(mempool_autotest, False, True, test_mempool);
app/test/test_mempool_perf.c +1 -1
index ce7c6241ab..96de347f04 100644
@@ -437,4 +437,4 @@ test_mempool_perf(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
+REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf);
app/test/test_memzone.c +1 -1
index f10f4fd9cd..85b5839034 100644
@@ -1163,4 +1163,4 @@ test_memzone(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
+REGISTER_FAST_TEST(memzone_autotest, False, True, test_memzone);
app/test/test_meter.c +1 -1
index 15d5a4839b..3016681bbc 100644
@@ -713,4 +713,4 @@ test_meter(void)
 
 }
 
-REGISTER_TEST_COMMAND(meter_autotest, test_meter);
+REGISTER_FAST_TEST(meter_autotest, True, True, test_meter);
app/test/test_mp_secondary.c +1 -1
index ad47d578f2..502b0235a7 100644
@@ -223,4 +223,4 @@ test_mp_secondary(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
+REGISTER_FAST_TEST(multiprocess_autotest, False, False, test_mp_secondary);
app/test/test_per_lcore.c +1 -1
index 129578d1a3..50011366a7 100644
@@ -105,4 +105,4 @@ test_per_lcore(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
+REGISTER_FAST_TEST(per_lcore_autotest, True, True, test_per_lcore);
app/test/test_pflock.c +1 -1
index 38da6bce27..07e4a68c2c 100644
@@ -193,4 +193,4 @@ test_pflock(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);
+REGISTER_FAST_TEST(pflock_autotest, True, True, test_pflock);
app/test/test_pie.c +3 -3
index a3c0f97c9d..5674602b69 100644
@@ -1087,6 +1087,6 @@ test_pie_all(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(pie_autotest, test_pie);
-REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
-REGISTER_TEST_COMMAND(pie_all, test_pie_all);
+REGISTER_FAST_TEST(pie_autotest, True, True, test_pie);
+REGISTER_PERF_TEST(pie_perf, test_pie_perf);
+REGISTER_PERF_TEST(pie_all, test_pie_all);
app/test/test_pmd_perf.c +1 -1
index 3ef590cb51..f6d97f21c9 100644
@@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
+REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf);
app/test/test_power.c +1 -1
index b7b5561348..d4f622ff2f 100644
@@ -172,4 +172,4 @@ test_power(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_autotest, test_power);
+REGISTER_FAST_TEST(power_autotest, True, True, test_power);
app/test/test_power_cpufreq.c +1 -1
index 4d013cd7bb..f56053ac10 100644
@@ -703,5 +703,5 @@ test_power_caps(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq);
+REGISTER_FAST_TEST(power_cpufreq_autotest, False, True, test_power_cpufreq);
 REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
index 31163af84e..c8a8621e44 100644
@@ -298,4 +298,4 @@ test_power_intel_uncore(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore);
+REGISTER_FAST_TEST(power_intel_uncore_autotest, True, True, test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
index cc66b7a8a0..4919df8b62 100644
@@ -299,4 +299,4 @@ test_power_kvm_vm(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
+REGISTER_FAST_TEST(power_kvm_vm_autotest, False, True, test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
index 7b4a8e4144..a72ae80557 100644
@@ -35,4 +35,4 @@ test_prefetch(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
+REGISTER_FAST_TEST(prefetch_autotest, True, True, test_prefetch);
app/test/test_rand_perf.c +1 -1
index 26fb1d9a58..30204e12c0 100644
@@ -96,4 +96,4 @@ test_rand_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);
+REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf);
app/test/test_rcu_qsbr.c +1 -1
index 70404e89e6..16c24f58e7 100644
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main);
+REGISTER_FAST_TEST(rcu_qsbr_autotest, True, True, test_rcu_qsbr_main);
app/test/test_rcu_qsbr_perf.c +1 -1
index b15e5cef88..ce88a7333c 100644
@@ -690,4 +690,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
+REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
app/test/test_reassembly_perf.c +1 -1
index c11b65291f..4b4929d777 100644
@@ -1000,4 +1000,4 @@ test_reassembly_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf);
+REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf);
app/test/test_reciprocal_division.c +1 -1
index 8ea9b1d24d..fb52b2d5a1 100644
@@ -164,4 +164,4 @@ test_reciprocal(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
+REGISTER_PERF_TEST(reciprocal_division, test_reciprocal);
app/test/test_reciprocal_division_perf.c +1 -1
index 4f625873e5..cf96d46a22 100644
@@ -205,4 +205,4 @@ test_reciprocal_division_perf(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
+REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf);
app/test/test_red.c +2 -2
index 84c292f8d8..aa7538d51a 100644
@@ -1878,5 +1878,5 @@ test_red_all(void)
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
 REGISTER_TEST_COMMAND(red_autotest, test_red);
-REGISTER_TEST_COMMAND(red_perf, test_red_perf);
-REGISTER_TEST_COMMAND(red_all, test_red_all);
+REGISTER_PERF_TEST(red_perf, test_red_perf);
+REGISTER_PERF_TEST(red_all, test_red_all);
app/test/test_reorder.c +1 -1
index c188f6ce67..e66b4b05d4 100644
@@ -548,4 +548,4 @@ test_reorder(void)
 }
 
 
-REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
+REGISTER_FAST_TEST(reorder_autotest, True, True, test_reorder);
app/test/test_rib.c +2 -2
index 65b6856410..a8d60acc3a 100644
@@ -363,5 +363,5 @@ test_slow_rib(void)
 	return unit_test_suite_runner(&rib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib_autotest, test_rib);
-REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
+REGISTER_FAST_TEST(rib_autotest, True, True, test_rib);
+REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +2 -2
index 336b779d2e..9bbd0f406d 100644
@@ -367,5 +367,5 @@ test_slow_rib6(void)
 	return unit_test_suite_runner(&rib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
-REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
+REGISTER_FAST_TEST(rib6_autotest, True, True, test_rib6);
+REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
index bde33ab4a1..d2accbabfa 100644
@@ -1241,4 +1241,4 @@ test_ring(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(ring_autotest, test_ring);
+REGISTER_FAST_TEST(ring_autotest, True, True, test_ring);
app/test/test_ring_perf.c +1 -1
index 3972fd9db3..d7c5a4c30b 100644
@@ -579,4 +579,4 @@ test_ring_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
+REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf);
app/test/test_rwlock.c +4 -4
index 4ae0bf8deb..e8086888fe 100644
@@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void)
 	return process_try_lcore_stats();
 }
 
-REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1);
-REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda);
-REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm);
-REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);
+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);
app/test/test_sched.c +1 -1
index ddec572447..385ca45136 100644
@@ -215,4 +215,4 @@ test_sched(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(sched_autotest, test_sched);
+REGISTER_FAST_TEST(sched_autotest, True, True, test_sched);
app/test/test_security.c +1 -1
index 4783cd0663..a3b962750a 100644
@@ -2314,4 +2314,4 @@ test_security(void)
 	return unit_test_suite_runner(&security_testsuite);
 }
 
-REGISTER_TEST_COMMAND(security_autotest, test_security);
+REGISTER_FAST_TEST(security_autotest, False, True, test_security);
app/test/test_seqlock.c +1 -1
index d26d2c010e..325af38070 100644
@@ -187,4 +187,4 @@ test_seqlock(void)
 	return rc;
 }
 
-REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock);
+REGISTER_FAST_TEST(seqlock_autotest, True, True, test_seqlock);
app/test/test_service_cores.c +2 -2
index 422d2a83e8..6c000417d2 100644
@@ -1040,7 +1040,7 @@ test_service_common(void)
 	return unit_test_suite_runner(&service_tests);
 }
 
-REGISTER_TEST_COMMAND(service_autotest, test_service_common);
+REGISTER_FAST_TEST(service_autotest, True, True, test_service_common);
 
 static struct unit_test_suite service_perf_tests  = {
 	.suite_name = "service core performance test suite",
@@ -1062,4 +1062,4 @@ test_service_perf(void)
 	return unit_test_suite_runner(&service_perf_tests);
 }
 
-REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf);
+REGISTER_PERF_TEST(service_perf_autotest, test_service_perf);
app/test/test_spinlock.c +1 -1
index 3f59372300..d655b606f7 100644
@@ -302,4 +302,4 @@ test_spinlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
+REGISTER_FAST_TEST(spinlock_autotest, True, True, test_spinlock);
app/test/test_stack.c +2 -2
index bc38961433..93bba18469 100644
@@ -379,5 +379,5 @@ test_lf_stack(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_autotest, test_stack);
-REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack);
+REGISTER_FAST_TEST(stack_autotest, False, True, test_stack);
+REGISTER_FAST_TEST(stack_lf_autotest, False, True, test_lf_stack);
app/test/test_stack_perf.c +2 -2
index 1eae00a334..c5e1caa036 100644
@@ -354,5 +354,5 @@ test_lf_stack_perf(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
-REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf);
+REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf);
+REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf);
app/test/test_string_fns.c +1 -1
index 5e105d2bb9..07e72bf680 100644
@@ -182,4 +182,4 @@ test_string_fns(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
+REGISTER_FAST_TEST(string_autotest, True, True, test_string_fns);
app/test/test_tailq.c +1 -1
index 9520219b0a..5598bcd12d 100644
@@ -125,4 +125,4 @@ test_tailq(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
+REGISTER_FAST_TEST(tailq_autotest, True, True, test_tailq);
app/test/test_thash.c +1 -1
index 53d9611e18..dd6468eb56 100644
@@ -966,4 +966,4 @@ test_thash(void)
 	return unit_test_suite_runner(&thash_tests);
 }
 
-REGISTER_TEST_COMMAND(thash_autotest, test_thash);
+REGISTER_FAST_TEST(thash_autotest, True, True, test_thash);
app/test/test_thash_perf.c +1 -1
index 687582aa32..9dfd5d3c21 100644
@@ -135,4 +135,4 @@ test_thash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);
+REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf);
app/test/test_threads.c +1 -1
index a4c4f651a4..6ed6b168d4 100644
@@ -279,4 +279,4 @@ test_threads(void)
 	return unit_test_suite_runner(&threads_test_suite);
 }
 
-REGISTER_TEST_COMMAND(threads_autotest, test_threads);
+REGISTER_FAST_TEST(threads_autotest, True, True, test_threads);
app/test/test_ticketlock.c +1 -1
index 242c136478..25af697c0a 100644
@@ -314,4 +314,4 @@ test_ticketlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock);
+REGISTER_FAST_TEST(ticketlock_autotest, True, True, test_ticketlock);
app/test/test_timer.c +1 -1
index 0c36dc9010..09608a1845 100644
@@ -594,4 +594,4 @@ test_timer(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_autotest, test_timer);
+REGISTER_FAST_TEST(timer_autotest, False, True, test_timer);
app/test/test_timer_perf.c +1 -1
index 0ede4b3e40..d2d74ebbc6 100644
@@ -131,4 +131,4 @@ test_timer_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
+REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf);
app/test/test_timer_racecond.c +1 -1
index bb56ae8324..6f8b448ff8 100644
@@ -172,4 +172,4 @@ test_timer_racecond(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
+REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond);
app/test/test_trace.c +1 -1
index ad4a394a29..96829caed5 100644
@@ -250,4 +250,4 @@ test_trace(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_FAST_TEST(trace_autotest, True, True, test_trace);
app/test/test_trace_perf.c +1 -1
index 46ae7d8074..a6dd075722 100644
@@ -179,4 +179,4 @@ test_trace_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf);
+REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf);
app/test/test_version.c +1 -1
index 1e1ff18656..21016237bc 100644
@@ -25,4 +25,4 @@ test_version(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(version_autotest, test_version);
+REGISTER_FAST_TEST(version_autotest, True, True, test_version);
Signature · 1 line
2.39.2
#23 lore raw

PATCH v3 3/8 app/test: make telemetry data test buildable on windows

In reply to Bruce Richardson

To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built.

---
 app/test/test_telemetry_data.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
app/test/test_telemetry_data.c +12 -2
index a960f44c1b..b2dc1d75db 100644
@@ -2,11 +2,20 @@
  * Copyright 2020 Intel Corporation
  */
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include "test.h"
+
+static int
+telemetry_data_autotest(void)
+{
+	return TEST_SKIPPED;
+}
+
+#else
+
 #include <string.h>
 #include <sys/socket.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/un.h>
-#endif
 #include <unistd.h>
 #include <limits.h>
 
@@ -604,5 +613,6 @@ telemetry_data_autotest(void)
 	close(sock);
 	return 0;
 }
+#endif /* windows/non-windows */
 
 REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest);
Signature · 1 line
2.39.2
#24 lore raw

PATCH v3 4/8 app/test: build using per-file dependency matrix

In reply to Bruce Richardson

Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon.

Initial version of this table was generated via analysis of the header files included in each C file. The basic dependencies of the test binary [cmdline, ring, mempool and mbuf] were then removed from the per-file lists, as there is no point in checking them as the whole app will be disabled if they are not present.

With the file list, the dependencies for the "utility" C-files are kept separate, so that other tests which depend on the functions provided by those files can have that dependency recorded properly. The basic cryptodev tests also fall into this category as functions from the main cryptodev test file are used by other crypto tests.

As well as the main table for internal dependencies, some test files have separate external components too. A second, much smaller table lists these dependencies.

---
 app/meson.build      |   8 +-
 app/test/meson.build | 823 ++++++++++++-------------------------------
 2 files changed, 238 insertions(+), 593 deletions(-)
app/meson.build +5 -3
index 4fc1a83eba..0d8b618e7f 100644
@@ -32,6 +32,11 @@ apps = [
         'test-security-perf',
 ]
 
+if get_option('tests')
+# build the auto test app if enabled.
+    apps += 'test'
+endif
+
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -106,6 +111,3 @@ foreach app:apps
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
 endforeach
-
-# special case the autotests
-subdir('test')
app/test/meson.build +233 -590

833 lines not on this page · raw message

Signature · 1 line
2.39.2
#25 lore raw

PATCH v3 5/8 app/test: define unit tests suites based on test macros

In reply to Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 76 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 ++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 117 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +76 -0

76 lines not on this page · raw message

buildtools/get-test-suites.py new file +33 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py
buildtools/meson.build +2 -0
index e1c600e40f..ac5e4dcf08 100644
@@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#26 lore raw

PATCH v3 6/8 examples/l3fwd: make eventdev an optional dependency

In reply to Bruce Richardson

With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.

---
 examples/l3fwd/l3fwd_em.c                  |  2 +
 examples/l3fwd/l3fwd_em_hlm.h              |  2 +
 examples/l3fwd/l3fwd_event.c               |  2 +
 examples/l3fwd/l3fwd_event.h               |  7 ++-
 examples/l3fwd/l3fwd_event_generic.c       |  2 +
 examples/l3fwd/l3fwd_event_internal_port.c |  2 +
 examples/l3fwd/l3fwd_fib.c                 |  2 +
 examples/l3fwd/l3fwd_lpm.c                 |  2 +
 examples/l3fwd/main.c                      | 65 +++++++++++++++++-----
 examples/l3fwd/meson.build                 |  5 +-
 10 files changed, 74 insertions(+), 17 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
index 476ac0c54f..40e102b38a 100644
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline void
 em_event_loop_single(struct l3fwd_event_resources *evt_rsrc,
 		const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	em_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Initialize exact match (hash) parameters. 8< */
 void
examples/l3fwd/l3fwd_em_hlm.h +2 -0
index 2e11eefad7..31cda9ddc1 100644
@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 	send_packets_multi(qconf, pkts_burst, dst_port, nb_rx);
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /*
  * Buffer optimized handling of events, invoked
  * from main_loop.
@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,
 
 	process_event_vector(vec, dst_port);
 }
+#endif /* RTE_LIB_EVENTDEV */
 
 #endif /* __L3FWD_EM_HLM_H__ */
examples/l3fwd/l3fwd_event.c +2 -0
index 32906ab08d..d72a4138cc 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 #include <getopt.h>
 
@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 	rte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush,
 			       NULL);
 }
+#endif /* #ifdef RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event.h +5 -2
index e21817c36b..1fd6fe4a78 100644
@@ -6,11 +6,13 @@
 #define __L3FWD_EVENTDEV_H__
 
 #include <rte_common.h>
+#include <rte_service.h>
+#include <rte_spinlock.h>
+
+#ifdef RTE_LIB_EVENTDEV
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
-#include <rte_service.h>
-#include <rte_spinlock.h>
 
 #include "l3fwd.h"
 
@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 				struct rte_event events[], uint16_t nb_enq,
 				uint16_t nb_deq, uint8_t is_vector);
 
+#endif /* ifdef RTE_LIB_EVENTDEV */
 #endif /* __L3FWD_EVENTDEV_H__ */
examples/l3fwd/l3fwd_event_generic.c +2 -0
index c80573fc58..ddb6e5c38d 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_generic;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event_internal_port.c +2 -0
index 32cf657148..cb49a8b9fa 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_internal_port;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_fib.c +2 -0
index 18398492ae..6a21984415 100644
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /* One eventdev loop for single and burst using fib. */
 static __rte_always_inline void
 fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	fib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Function to setup fib. 8< */
 void
examples/l3fwd/l3fwd_lpm.c +2 -0
index 4ac1925c84..a484a33089 100644
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline uint16_t
 lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	lpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 void
 setup_lpm(const int socketid)
examples/l3fwd/main.c +51 -14

227 lines not on this page · raw message

examples/l3fwd/meson.build +4 -1
index b40244a941..c25de77bba 100644
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 allow_experimental_apis = true
-deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']
+deps += ['acl', 'hash', 'lpm', 'fib']
 sources = files(
         'l3fwd_acl.c',
         'l3fwd_em.c',
@@ -18,3 +18,6 @@ sources = files(
         'l3fwd_lpm.c',
         'main.c',
 )
+if dpdk_conf.has('RTE_LIB_EVENTDEV')
+    deps += 'eventdev'
+endif
Signature · 1 line
2.39.2
#27 lore raw

PATCH v3 7/8 build: make most device classes optional

In reply to Bruce Richardson

Apart from ethdev and cryptodev, which have lots of components and tests which depend on them, we can make the device class libraries optional without too much work.

This patch marks:
* bbdev,
* compressdev,
* dmadev,
* eventdev,
* mldev,
* rawdev,
* regexdev
optional, and ensures that DPDK - including tests - can be built with these components disabled.

---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)
lib/meson.build +7 -0
index 92cbd6bb66..1a78c8c984 100644
@@ -67,8 +67,12 @@ libraries = [
 ]
 
 optional_libs = [
+        'bbdev',
         'bitratestats',
         'cfgfile',
+        'compressdev',
+        'dmadev',
+        'eventdev',
         'gpudev',
         'graph',
         'gro',
@@ -76,11 +80,14 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'mldev',
         'node',
         'pdump',
         'pipeline',
         'port',
         'power',
+        'rawdev',
+        'regexdev',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#28 lore raw

PATCH v3 8/8 build: expand list of optional libraries

In reply to Bruce Richardson

With the unit test build now with individual per-file dependencies, we can more easily expand the list of optional libraries. Add 8 new libraries to the optional list.

---
 lib/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
lib/meson.build +8 -0
index 1a78c8c984..0c9dc8b3b6 100644
@@ -69,25 +69,33 @@ libraries = [
 optional_libs = [
         'bbdev',
         'bitratestats',
+        'bpf',
         'cfgfile',
         'compressdev',
+        'distributor',
         'dmadev',
+        'efd',
         'eventdev',
         'gpudev',
         'graph',
         'gro',
         'gso',
+        'ip_frag',
         'jobstats',
         'latencystats',
+        'member',
         'metrics',
         'mldev',
         'node',
+        'pcapng',
         'pdump',
         'pipeline',
         'port',
         'power',
         'rawdev',
         'regexdev',
+        'reorder',
+        'sched',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#29 lore raw

RE: [PATCH v3 0/8] expand list of optional libraries

In reply to Bruce Richardson
Quoted 44 lines

From: Bruce Richardson [mailto:[email protected]]
Sent: Monday, 14 August 2023 20.21

This patchset contains changes to DPDK to make the build more configurable
overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in
its
own right.
* A number of files in the test directory were not being built, and seem to have never been built with meson. This requires separate work,
outside
the scope of the patchset to fix.
* Similarly, some unit tests were never added to test suites. These can now be found by using grep to find the old REGISTER_TEST_COMMAND
macro.
Again, adding orphan tests to suites is outside the scope of this set.

V3:
- Create symlink to old path to test binary, to ensure all automated CI, and any other use of the test binary still works.

Quoted 12 lines

V2:
- Changes since RFC:
- merged two previous sets - reworking test build, and disabling libs - into one, since they depend on each other
- Reworked the list of dependencies for each file in the tests, so that files that depend on other files have those deps called out.
- Added list of external dependencies to the test builds
- For disabling libs, merged patches disabling individual libs together into one patch, since all unit test build changes were unnecessary. This made each patch a single-line addition to the optional list in lib/meson.build.

#30 lore raw

v4 cover expand list of optional libraries

In reply to Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.
* A number of files in the test directory were not being built, and seem to have never been built with meson. This requires separate work, outside the scope of the patchset to fix.
* Similarly, some unit tests were never added to test suites. These can now be found by using grep to find the old REGISTER_TEST_COMMAND macro. Again, adding orphan tests to suites is outside the scope of this set.

V4:
- improve test suite definition, hopefully improving test pass rate:
- drop unnecessary file-prefix for fast tests, since tests are not parallel
- always pass driver path flag in "meson test" for shared builds.

V3:
- Create symlink to old path to test binary, to ensure all automated CI, and any other use of the test binary still works.

V2:
- Changes since RFC:
- merged two previous sets - reworking test build, and disabling libs - into one, since they depend on each other
- Reworked the list of dependencies for each file in the tests, so that files that depend on other files have those deps called out.
- Added list of external dependencies to the test builds
- For disabling libs, merged patches disabling individual libs together into one patch, since all unit test build changes were unnecessary. This made each patch a single-line addition to the optional list in lib/meson.build.

Bruce Richardson (8):
app/test: add new macros for various test types app/test: tag tests with the test type app/test: make telemetry data test buildable on windows app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros examples/l3fwd: make eventdev an optional dependency
build: make most device classes optional
build: expand list of optional libraries

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 823 +++++-------------
 app/test/suites/meson.build                   |  72 ++
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_telemetry_data.c                |  14 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 examples/l3fwd/l3fwd_em.c                     |   2 +
 examples/l3fwd/l3fwd_em_hlm.h                 |   2 +
 examples/l3fwd/l3fwd_event.c                  |   2 +
 examples/l3fwd/l3fwd_event.h                  |   7 +-
 examples/l3fwd/l3fwd_event_generic.c          |   2 +
 examples/l3fwd/l3fwd_event_internal_port.c    |   2 +
 examples/l3fwd/l3fwd_fib.c                    |   2 +
 examples/l3fwd/l3fwd_lpm.c                    |   2 +
 examples/l3fwd/main.c                         |  65 +-
 examples/l3fwd/meson.build                    |   5 +-
 lib/meson.build                               |  15 +
 125 files changed, 610 insertions(+), 764 deletions(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

#31 lore raw

PATCH v4 1/8 app/test: add new macros for various test types

Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type.

---
 app/test/test.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test.h +8 -1
index 85f57efbc6..a91ded76af 100644
@@ -190,7 +190,7 @@ struct test_command {
 
 void add_test_command(struct test_command *t);
 
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
 #define REGISTER_TEST_COMMAND(cmd, func) \
 	static struct test_command test_struct_##cmd = { \
 		.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
 		add_test_command(&test_struct_##cmd); \
 	}
 
+/* 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
+
 #endif
Signature · 1 line
2.39.2
#32 lore raw

PATCH v4 2/8 app/test: tag tests with the test type

In reply to Bruce Richardson

Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.

---
 app/test/test_acl.c                      |  2 +-
 app/test/test_atomic.c                   |  2 +-
 app/test/test_barrier.c                  |  2 +-
 app/test/test_bitmap.c                   |  2 +-
 app/test/test_bitops.c                   |  2 +-
 app/test/test_bpf.c                      |  4 +--
 app/test/test_byteorder.c                |  2 +-
 app/test/test_cksum.c                    |  2 +-
 app/test/test_cmdline.c                  |  2 +-
 app/test/test_common.c                   |  2 +-
 app/test/test_cpuflags.c                 |  2 +-
 app/test/test_crc.c                      |  2 +-
 app/test/test_cryptodev.c                | 38 ++++++++++++------------
 app/test/test_cryptodev_asym.c           |  2 +-
 app/test/test_cycles.c                   |  2 +-
 app/test/test_debug.c                    |  2 +-
 app/test/test_devargs.c                  |  2 +-
 app/test/test_distributor.c              |  2 +-
 app/test/test_distributor_perf.c         |  2 +-
 app/test/test_dmadev.c                   |  2 +-
 app/test/test_eal_flags.c                | 24 +++++++--------
 app/test/test_eal_fs.c                   |  2 +-
 app/test/test_efd.c                      |  2 +-
 app/test/test_efd_perf.c                 |  2 +-
 app/test/test_errno.c                    |  2 +-
 app/test/test_ethdev_link.c              |  2 +-
 app/test/test_event_ring.c               |  2 +-
 app/test/test_eventdev.c                 |  2 +-
 app/test/test_fbarray.c                  |  2 +-
 app/test/test_fib.c                      |  4 +--
 app/test/test_fib6.c                     |  4 +--
 app/test/test_fib6_perf.c                |  2 +-
 app/test/test_fib_perf.c                 |  2 +-
 app/test/test_func_reentrancy.c          |  2 +-
 app/test/test_hash.c                     |  2 +-
 app/test/test_hash_functions.c           |  2 +-
 app/test/test_hash_multiwriter.c         |  2 +-
 app/test/test_hash_perf.c                |  2 +-
 app/test/test_hash_readwrite.c           |  4 +--
 app/test/test_hash_readwrite_lf_perf.c   |  2 +-
 app/test/test_interrupts.c               |  2 +-
 app/test/test_ipfrag.c                   |  2 +-
 app/test/test_ipsec.c                    |  2 +-
 app/test/test_ipsec_perf.c               |  2 +-
 app/test/test_kvargs.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_lpm6_perf.c                |  2 +-
 app/test/test_lpm_perf.c                 |  2 +-
 app/test/test_malloc.c                   |  2 +-
 app/test/test_malloc_perf.c              |  2 +-
 app/test/test_mbuf.c                     |  2 +-
 app/test/test_mcslock.c                  |  2 +-
 app/test/test_member.c                   |  2 +-
 app/test/test_member_perf.c              |  2 +-
 app/test/test_memcpy.c                   |  2 +-
 app/test/test_memcpy_perf.c              |  2 +-
 app/test/test_memory.c                   |  2 +-
 app/test/test_mempool.c                  |  2 +-
 app/test/test_mempool_perf.c             |  2 +-
 app/test/test_memzone.c                  |  2 +-
 app/test/test_meter.c                    |  2 +-
 app/test/test_mp_secondary.c             |  2 +-
 app/test/test_per_lcore.c                |  2 +-
 app/test/test_pflock.c                   |  2 +-
 app/test/test_pie.c                      |  6 ++--
 app/test/test_pmd_perf.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_rand_perf.c                |  2 +-
 app/test/test_rcu_qsbr.c                 |  2 +-
 app/test/test_rcu_qsbr_perf.c            |  2 +-
 app/test/test_reassembly_perf.c          |  2 +-
 app/test/test_reciprocal_division.c      |  2 +-
 app/test/test_reciprocal_division_perf.c |  2 +-
 app/test/test_red.c                      |  4 +--
 app/test/test_reorder.c                  |  2 +-
 app/test/test_rib.c                      |  4 +--
 app/test/test_rib6.c                     |  4 +--
 app/test/test_ring.c                     |  2 +-
 app/test/test_ring_perf.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            |  4 +--
 app/test/test_spinlock.c                 |  2 +-
 app/test/test_stack.c                    |  4 +--
 app/test/test_stack_perf.c               |  4 +--
 app/test/test_string_fns.c               |  2 +-
 app/test/test_tailq.c                    |  2 +-
 app/test/test_thash.c                    |  2 +-
 app/test/test_thash_perf.c               |  2 +-
 app/test/test_threads.c                  |  2 +-
 app/test/test_ticketlock.c               |  2 +-
 app/test/test_timer.c                    |  2 +-
 app/test/test_timer_perf.c               |  2 +-
 app/test/test_timer_racecond.c           |  2 +-
 app/test/test_trace.c                    |  2 +-
 app/test/test_trace_perf.c               |  2 +-
 app/test/test_version.c                  |  2 +-
 106 files changed, 150 insertions(+), 150 deletions(-)
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);
app/test/test_atomic.c +1 -1
index e4b997827e..b52420c10b 100644
@@ -631,4 +631,4 @@ test_atomic(void)
 
 	return 0;
 }
-REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
+REGISTER_FAST_TEST(atomic_autotest, False, True, test_atomic);
app/test/test_barrier.c +1 -1
index ec69af25bf..925a88b68a 100644
@@ -285,4 +285,4 @@ test_barrier(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(barrier_autotest, test_barrier);
+REGISTER_PERF_TEST(barrier_autotest, test_barrier);
app/test/test_bitmap.c +1 -1
index e9c61590ae..2014d2682c 100644
@@ -269,4 +269,4 @@ test_bitmap(void)
 	return test_bitmap_all_set();
 }
 
-REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap);
+REGISTER_FAST_TEST(bitmap_autotest, True, True, test_bitmap);
app/test/test_bitops.c +1 -1
index c21426bf2f..dac466602b 100644
@@ -135,4 +135,4 @@ test_bitops(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(bitops_autotest, test_bitops);
+REGISTER_FAST_TEST(bitops_autotest, True, True, test_bitops);
app/test/test_bpf.c +2 -2
index f5af5e8a3f..5fef17fbc2 100644
@@ -3262,7 +3262,7 @@ test_bpf(void)
 
 #endif /* !RTE_LIB_BPF */
 
-REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
+REGISTER_FAST_TEST(bpf_autotest, True, True, test_bpf);
 
 #ifndef RTE_HAS_LIBPCAP
 
@@ -3473,4 +3473,4 @@ test_bpf_convert(void)
 
 #endif /* RTE_HAS_LIBPCAP */
 
-REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
+REGISTER_FAST_TEST(bpf_convert_autotest, True, True, test_bpf_convert);
app/test/test_byteorder.c +1 -1
index de14ed539e..2189f94744 100644
@@ -63,4 +63,4 @@ test_byteorder(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
+REGISTER_FAST_TEST(byteorder_autotest, True, True, test_byteorder);
app/test/test_cksum.c +1 -1
index 6c15de9a93..c04fae800e 100644
@@ -267,4 +267,4 @@ test_cksum(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
+REGISTER_FAST_TEST(cksum_autotest, True, True, test_cksum);
app/test/test_cmdline.c +1 -1
index 115bee966d..c2a375ac1c 100644
@@ -60,4 +60,4 @@ test_cmdline(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
+REGISTER_FAST_TEST(cmdline_autotest, True, True, test_cmdline);
app/test/test_common.c +1 -1
index f89e1eb7ee..c7b41a3f0e 100644
@@ -350,4 +350,4 @@ test_common(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(common_autotest, test_common);
+REGISTER_FAST_TEST(common_autotest, True, True, test_common);
app/test/test_cpuflags.c +1 -1
index a0e342ae48..c3417dda24 100644
@@ -334,4 +334,4 @@ test_cpuflags(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
+REGISTER_FAST_TEST(cpuflags_autotest, True, True, test_cpuflags);
app/test/test_crc.c +1 -1
index 5edc8fb13b..b267bdde9f 100644
@@ -171,4 +171,4 @@ test_crc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(crc_autotest, test_crc);
+REGISTER_FAST_TEST(crc_autotest, True, True, test_crc);
app/test/test_cryptodev.c +19 -19
index fb2af40b99..956268bfcd 100644
@@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest,
 		test_cryptodev_dpaa_sec_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest,
 		test_cryptodev_qat_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest,
 	test_cryptodev_cpu_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest,
 	test_cryptodev_chacha_poly_mb);
-REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
+REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl);
+REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest,
 	test_cryptodev_cpu_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
-REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
-REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
-REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
-REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
+REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null);
+REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
+REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
+REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
+REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
+REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
+REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
+REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
 REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp);
-REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk);
+REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk);
 REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
 REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
 REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
 REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
-REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
-REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
+REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
app/test/test_cryptodev_asym.c +1 -1
index 0ef2642fdd..3d5a73bf89 100644
@@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void)
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
-REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
+REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
app/test/test_cycles.c +1 -1
index 66d11e6db8..08c91cef78 100644
@@ -53,4 +53,4 @@ test_user_delay_us(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us);
+REGISTER_FAST_TEST(user_delay_us, True, True, test_user_delay_us);
app/test/test_debug.c +1 -1
index 2704f5b927..acd9542257 100644
@@ -140,4 +140,4 @@ test_debug(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(debug_autotest, test_debug);
+REGISTER_FAST_TEST(debug_autotest, True, True, test_debug);
app/test/test_devargs.c +1 -1
index 0a4c34a1ad..59ec04957e 100644
@@ -213,4 +213,4 @@ test_devargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
+REGISTER_FAST_TEST(devargs_autotest, True, True, test_devargs);
app/test/test_distributor.c +1 -1
index 3efa4af104..ee263a7fee 100644
@@ -952,4 +952,4 @@ test_distributor(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
+REGISTER_FAST_TEST(distributor_autotest, False, True, test_distributor);
app/test/test_distributor_perf.c +1 -1
index ee4321486d..ca868451d7 100644
@@ -277,4 +277,4 @@ test_distributor_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
+REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf);
app/test/test_dmadev.c +1 -1
index 0736ff2a18..6ef875e545 100644
@@ -941,4 +941,4 @@ test_dma(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
+REGISTER_DRIVER_TEST(dmadev_autotest, test_dma);
app/test/test_eal_flags.c +12 -12
index 148e9098e8..3b7af7405d 100644
@@ -1644,15 +1644,15 @@ test_memory_flags(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
-REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
-REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
-REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
-REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag);
-REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);
-REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);
-REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);
-REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags);
-REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix);
-REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags);
+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);
app/test/test_eal_fs.c +1 -1
index b3686edcb4..a4bdc1236d 100644
@@ -185,4 +185,4 @@ test_eal_fs(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
+REGISTER_FAST_TEST(eal_fs_autotest, True, True, test_eal_fs);
app/test/test_efd.c +1 -1
index fa29e8f97a..1c0986b9bc 100644
@@ -473,4 +473,4 @@ test_efd(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_autotest, test_efd);
+REGISTER_PERF_TEST(efd_autotest, test_efd);
app/test/test_efd_perf.c +1 -1
index 4d04ed93e3..b212e96767 100644
@@ -393,4 +393,4 @@ test_efd_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
+REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf);
app/test/test_errno.c +1 -1
index 0db4fbc8b3..1082299665 100644
@@ -94,4 +94,4 @@ test_errno(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(errno_autotest, test_errno);
+REGISTER_FAST_TEST(errno_autotest, True, True, test_errno);
app/test/test_ethdev_link.c +1 -1
index ab52385a12..d73e18065d 100644
@@ -167,4 +167,4 @@ test_link_status(void)
 	return unit_test_suite_runner(&link_status_testsuite);
 }
 
-REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status);
+REGISTER_FAST_TEST(ethdev_link_status, True, True, test_link_status);
app/test/test_event_ring.c +1 -1
index bc4a6e73f5..d5c8499cfd 100644
@@ -256,4 +256,4 @@ test_event_ring(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
+REGISTER_FAST_TEST(event_ring_autotest, True, True, test_event_ring);
app/test/test_eventdev.c +1 -1
index 336529038e..e65d893781 100644
@@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+REGISTER_FAST_TEST(eventdev_common_autotest, True, True, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
app/test/test_fbarray.c +1 -1
index a691bf4458..03428a45fe 100644
@@ -733,4 +733,4 @@ test_fbarray(void)
 	return unit_test_suite_runner(&fbarray_test_suite);
 }
 
-REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray);
+REGISTER_FAST_TEST(fbarray_autotest, True, True, test_fbarray);
app/test/test_fib.c +2 -2
index eb69d6e2fd..2a8404db61 100644
@@ -415,5 +415,5 @@ test_slow_fib(void)
 	return unit_test_suite_runner(&fib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib_autotest, test_fib);
-REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
+REGISTER_FAST_TEST(fib_autotest, True, True, test_fib);
+REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +2 -2
index 15ad09178a..9b1c0ac8c7 100644
@@ -424,5 +424,5 @@ test_slow_fib6(void)
 	return unit_test_suite_runner(&fib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
-REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
+REGISTER_FAST_TEST(fib6_autotest, True, True, test_fib6);
+REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6);
app/test/test_fib6_perf.c +1 -1
index add20c2331..a7abc46af9 100644
@@ -156,4 +156,4 @@ test_fib6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
+REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf);
app/test/test_fib_perf.c +1 -1
index b56293e64f..a9119c1bb0 100644
@@ -409,4 +409,4 @@ test_fib_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
+REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf);
app/test/test_func_reentrancy.c +1 -1
index ae9de6f93d..63b00009b5 100644
@@ -507,4 +507,4 @@ test_func_reentrancy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
+REGISTER_FAST_TEST(func_reentrancy_autotest, False, True, test_func_reentrancy);
app/test/test_hash.c +1 -1
index 3e45afaa67..e160b27b4c 100644
@@ -2264,4 +2264,4 @@ test_hash(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_autotest, test_hash);
+REGISTER_FAST_TEST(hash_autotest, True, True, test_hash);
app/test/test_hash_functions.c +1 -1
index 76d51b6e71..70820d1f19 100644
@@ -290,4 +290,4 @@ test_hash_functions(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
+REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions);
app/test/test_hash_multiwriter.c +1 -1
index 0c5a8ca186..dd5ca677b9 100644
@@ -287,4 +287,4 @@ test_hash_multiwriter_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
+REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);
app/test/test_hash_perf.c +1 -1
index 14a1283aba..d66b96e5ce 100644
@@ -757,4 +757,4 @@ test_hash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
+REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf);
app/test/test_hash_readwrite.c +2 -2
index 6373e62d33..9c33b49878 100644
@@ -760,5 +760,5 @@ test_hash_rw_func_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
-REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
+REGISTER_FAST_TEST(hash_readwrite_func_autotest, False, True, test_hash_rw_func_main);
+REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_hash_readwrite_lf_perf.c +1 -1
index cf86046a2f..5d18850e19 100644
@@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest,
 	test_hash_readwrite_lf_perf_main);
app/test/test_interrupts.c +1 -1
index b59ab42699..cf6b5a6a8e 100644
@@ -594,4 +594,4 @@ test_interrupt(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
+REGISTER_FAST_TEST(interrupt_autotest, True, True, test_interrupt);
app/test/test_ipfrag.c +1 -1
index 402ce361c1..264825634d 100644
@@ -510,4 +510,4 @@ test_ipfrag(void)
 }
 
 
-REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
+REGISTER_FAST_TEST(ipfrag_autotest, False, True, test_ipfrag);
app/test/test_ipsec.c +1 -1
index c2a52ec305..629580bc21 100644
@@ -2532,4 +2532,4 @@ test_ipsec(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
+REGISTER_FAST_TEST(ipsec_autotest, True, True, test_ipsec);
app/test/test_ipsec_perf.c +1 -1
index b221b7fc32..a32a2086e9 100644
@@ -631,4 +631,4 @@ test_libipsec_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
+REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
app/test/test_kvargs.c +1 -1
index b7b97a0dd9..d0f05a55c7 100644
@@ -292,4 +292,4 @@ test_kvargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
+REGISTER_FAST_TEST(kvargs_autotest, True, True, test_kvargs);
app/test/test_lcores.c +1 -1
index 2c945b0136..b86629c0db 100644
@@ -412,4 +412,4 @@ test_lcores(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
+REGISTER_FAST_TEST(lcores_autotest, True, True, test_lcores);
app/test/test_logs.c +1 -1
index 8da8824bee..38052910e9 100644
@@ -158,4 +158,4 @@ test_logs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(logs_autotest, test_logs);
+REGISTER_FAST_TEST(logs_autotest, True, True, test_logs);
app/test/test_lpm.c +1 -1
index 37b460af3a..85a75ccec0 100644
@@ -1584,4 +1584,4 @@ test_lpm(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
+REGISTER_FAST_TEST(lpm_autotest, True, True, test_lpm);
app/test/test_lpm6.c +1 -1
index b6b6f8615e..4a9eddf276 100644
@@ -1793,4 +1793,4 @@ test_lpm6(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
+REGISTER_FAST_TEST(lpm6_autotest, True, True, test_lpm6);
app/test/test_lpm6_perf.c +1 -1
index 5b684686a6..8a49f74c84 100644
@@ -161,4 +161,4 @@ test_lpm6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
+REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf);
app/test/test_lpm_perf.c +1 -1
index e72437ba38..15ff396dd0 100644
@@ -760,4 +760,4 @@ test_lpm_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
+REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf);
app/test/test_malloc.c +1 -1
index ff081dd931..6057623473 100644
@@ -1091,4 +1091,4 @@ test_malloc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
+REGISTER_FAST_TEST(malloc_autotest, False, True, test_malloc);
app/test/test_malloc_perf.c +1 -1
index 9bd1662981..a99bfd8531 100644
@@ -171,4 +171,4 @@ test_malloc_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);
+REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf);
app/test/test_mbuf.c +1 -1
index efac01806b..2eeed268af 100644
@@ -2955,4 +2955,4 @@ test_mbuf(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
+REGISTER_FAST_TEST(mbuf_autotest, False, True, test_mbuf);
app/test/test_mcslock.c +1 -1
index 52e45e7e2a..a3753a4397 100644
@@ -241,4 +241,4 @@ test_mcslock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock);
+REGISTER_FAST_TEST(mcslock_autotest, False, True, test_mcslock);
app/test/test_member.c +1 -1
index 4a93f8bff4..e17a8f3190 100644
@@ -996,4 +996,4 @@ test_member(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_autotest, test_member);
+REGISTER_FAST_TEST(member_autotest, True, True, test_member);
app/test/test_member_perf.c +1 -1
index 2f79888fbd..db6b8a18ef 100644
@@ -780,4 +780,4 @@ test_member_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
+REGISTER_PERF_TEST(member_perf_autotest, test_member_perf);
app/test/test_memcpy.c +1 -1
index 1ab86f4967..c81efb85c2 100644
@@ -129,4 +129,4 @@ test_memcpy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
+REGISTER_FAST_TEST(memcpy_autotest, True, True, test_memcpy);
app/test/test_memcpy_perf.c +1 -1
index 3727c160e6..5c05a84619 100644
@@ -348,4 +348,4 @@ test_memcpy_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
+REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf);
app/test/test_memory.c +1 -1
index 440e5ef838..13ae9569c2 100644
@@ -110,4 +110,4 @@ test_memory(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memory_autotest, test_memory);
+REGISTER_FAST_TEST(memory_autotest, False, True, test_memory);
app/test/test_mempool.c +1 -1
index 8e493eda47..03047e5b14 100644
@@ -1043,4 +1043,4 @@ test_mempool(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
+REGISTER_FAST_TEST(mempool_autotest, False, True, test_mempool);
app/test/test_mempool_perf.c +1 -1
index ce7c6241ab..96de347f04 100644
@@ -437,4 +437,4 @@ test_mempool_perf(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
+REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf);
app/test/test_memzone.c +1 -1
index f10f4fd9cd..85b5839034 100644
@@ -1163,4 +1163,4 @@ test_memzone(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
+REGISTER_FAST_TEST(memzone_autotest, False, True, test_memzone);
app/test/test_meter.c +1 -1
index 15d5a4839b..3016681bbc 100644
@@ -713,4 +713,4 @@ test_meter(void)
 
 }
 
-REGISTER_TEST_COMMAND(meter_autotest, test_meter);
+REGISTER_FAST_TEST(meter_autotest, True, True, test_meter);
app/test/test_mp_secondary.c +1 -1
index ad47d578f2..502b0235a7 100644
@@ -223,4 +223,4 @@ test_mp_secondary(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
+REGISTER_FAST_TEST(multiprocess_autotest, False, False, test_mp_secondary);
app/test/test_per_lcore.c +1 -1
index 129578d1a3..50011366a7 100644
@@ -105,4 +105,4 @@ test_per_lcore(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
+REGISTER_FAST_TEST(per_lcore_autotest, True, True, test_per_lcore);
app/test/test_pflock.c +1 -1
index 38da6bce27..07e4a68c2c 100644
@@ -193,4 +193,4 @@ test_pflock(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);
+REGISTER_FAST_TEST(pflock_autotest, True, True, test_pflock);
app/test/test_pie.c +3 -3
index a3c0f97c9d..5674602b69 100644
@@ -1087,6 +1087,6 @@ test_pie_all(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(pie_autotest, test_pie);
-REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
-REGISTER_TEST_COMMAND(pie_all, test_pie_all);
+REGISTER_FAST_TEST(pie_autotest, True, True, test_pie);
+REGISTER_PERF_TEST(pie_perf, test_pie_perf);
+REGISTER_PERF_TEST(pie_all, test_pie_all);
app/test/test_pmd_perf.c +1 -1
index 3ef590cb51..f6d97f21c9 100644
@@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
+REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf);
app/test/test_power.c +1 -1
index b7b5561348..d4f622ff2f 100644
@@ -172,4 +172,4 @@ test_power(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_autotest, test_power);
+REGISTER_FAST_TEST(power_autotest, True, True, test_power);
app/test/test_power_cpufreq.c +1 -1
index 4d013cd7bb..f56053ac10 100644
@@ -703,5 +703,5 @@ test_power_caps(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq);
+REGISTER_FAST_TEST(power_cpufreq_autotest, False, True, test_power_cpufreq);
 REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
index 31163af84e..c8a8621e44 100644
@@ -298,4 +298,4 @@ test_power_intel_uncore(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore);
+REGISTER_FAST_TEST(power_intel_uncore_autotest, True, True, test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
index cc66b7a8a0..4919df8b62 100644
@@ -299,4 +299,4 @@ test_power_kvm_vm(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
+REGISTER_FAST_TEST(power_kvm_vm_autotest, False, True, test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
index 7b4a8e4144..a72ae80557 100644
@@ -35,4 +35,4 @@ test_prefetch(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
+REGISTER_FAST_TEST(prefetch_autotest, True, True, test_prefetch);
app/test/test_rand_perf.c +1 -1
index 26fb1d9a58..30204e12c0 100644
@@ -96,4 +96,4 @@ test_rand_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);
+REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf);
app/test/test_rcu_qsbr.c +1 -1
index 70404e89e6..16c24f58e7 100644
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main);
+REGISTER_FAST_TEST(rcu_qsbr_autotest, True, True, test_rcu_qsbr_main);
app/test/test_rcu_qsbr_perf.c +1 -1
index b15e5cef88..ce88a7333c 100644
@@ -690,4 +690,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
+REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
app/test/test_reassembly_perf.c +1 -1
index c11b65291f..4b4929d777 100644
@@ -1000,4 +1000,4 @@ test_reassembly_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf);
+REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf);
app/test/test_reciprocal_division.c +1 -1
index 8ea9b1d24d..fb52b2d5a1 100644
@@ -164,4 +164,4 @@ test_reciprocal(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
+REGISTER_PERF_TEST(reciprocal_division, test_reciprocal);
app/test/test_reciprocal_division_perf.c +1 -1
index 4f625873e5..cf96d46a22 100644
@@ -205,4 +205,4 @@ test_reciprocal_division_perf(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
+REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf);
app/test/test_red.c +2 -2
index 84c292f8d8..aa7538d51a 100644
@@ -1878,5 +1878,5 @@ test_red_all(void)
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
 REGISTER_TEST_COMMAND(red_autotest, test_red);
-REGISTER_TEST_COMMAND(red_perf, test_red_perf);
-REGISTER_TEST_COMMAND(red_all, test_red_all);
+REGISTER_PERF_TEST(red_perf, test_red_perf);
+REGISTER_PERF_TEST(red_all, test_red_all);
app/test/test_reorder.c +1 -1
index c188f6ce67..e66b4b05d4 100644
@@ -548,4 +548,4 @@ test_reorder(void)
 }
 
 
-REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
+REGISTER_FAST_TEST(reorder_autotest, True, True, test_reorder);
app/test/test_rib.c +2 -2
index 65b6856410..a8d60acc3a 100644
@@ -363,5 +363,5 @@ test_slow_rib(void)
 	return unit_test_suite_runner(&rib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib_autotest, test_rib);
-REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
+REGISTER_FAST_TEST(rib_autotest, True, True, test_rib);
+REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +2 -2
index 336b779d2e..9bbd0f406d 100644
@@ -367,5 +367,5 @@ test_slow_rib6(void)
 	return unit_test_suite_runner(&rib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
-REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
+REGISTER_FAST_TEST(rib6_autotest, True, True, test_rib6);
+REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
index bde33ab4a1..d2accbabfa 100644
@@ -1241,4 +1241,4 @@ test_ring(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(ring_autotest, test_ring);
+REGISTER_FAST_TEST(ring_autotest, True, True, test_ring);
app/test/test_ring_perf.c +1 -1
index 3972fd9db3..d7c5a4c30b 100644
@@ -579,4 +579,4 @@ test_ring_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
+REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf);
app/test/test_rwlock.c +4 -4
index 4ae0bf8deb..e8086888fe 100644
@@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void)
 	return process_try_lcore_stats();
 }
 
-REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1);
-REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda);
-REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm);
-REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);
+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);
app/test/test_sched.c +1 -1
index ddec572447..385ca45136 100644
@@ -215,4 +215,4 @@ test_sched(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(sched_autotest, test_sched);
+REGISTER_FAST_TEST(sched_autotest, True, True, test_sched);
app/test/test_security.c +1 -1
index 4783cd0663..a3b962750a 100644
@@ -2314,4 +2314,4 @@ test_security(void)
 	return unit_test_suite_runner(&security_testsuite);
 }
 
-REGISTER_TEST_COMMAND(security_autotest, test_security);
+REGISTER_FAST_TEST(security_autotest, False, True, test_security);
app/test/test_seqlock.c +1 -1
index d26d2c010e..325af38070 100644
@@ -187,4 +187,4 @@ test_seqlock(void)
 	return rc;
 }
 
-REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock);
+REGISTER_FAST_TEST(seqlock_autotest, True, True, test_seqlock);
app/test/test_service_cores.c +2 -2
index 422d2a83e8..6c000417d2 100644
@@ -1040,7 +1040,7 @@ test_service_common(void)
 	return unit_test_suite_runner(&service_tests);
 }
 
-REGISTER_TEST_COMMAND(service_autotest, test_service_common);
+REGISTER_FAST_TEST(service_autotest, True, True, test_service_common);
 
 static struct unit_test_suite service_perf_tests  = {
 	.suite_name = "service core performance test suite",
@@ -1062,4 +1062,4 @@ test_service_perf(void)
 	return unit_test_suite_runner(&service_perf_tests);
 }
 
-REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf);
+REGISTER_PERF_TEST(service_perf_autotest, test_service_perf);
app/test/test_spinlock.c +1 -1
index 3f59372300..d655b606f7 100644
@@ -302,4 +302,4 @@ test_spinlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
+REGISTER_FAST_TEST(spinlock_autotest, True, True, test_spinlock);
app/test/test_stack.c +2 -2
index bc38961433..93bba18469 100644
@@ -379,5 +379,5 @@ test_lf_stack(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_autotest, test_stack);
-REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack);
+REGISTER_FAST_TEST(stack_autotest, False, True, test_stack);
+REGISTER_FAST_TEST(stack_lf_autotest, False, True, test_lf_stack);
app/test/test_stack_perf.c +2 -2
index 1eae00a334..c5e1caa036 100644
@@ -354,5 +354,5 @@ test_lf_stack_perf(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
-REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf);
+REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf);
+REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf);
app/test/test_string_fns.c +1 -1
index 5e105d2bb9..07e72bf680 100644
@@ -182,4 +182,4 @@ test_string_fns(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
+REGISTER_FAST_TEST(string_autotest, True, True, test_string_fns);
app/test/test_tailq.c +1 -1
index 9520219b0a..5598bcd12d 100644
@@ -125,4 +125,4 @@ test_tailq(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
+REGISTER_FAST_TEST(tailq_autotest, True, True, test_tailq);
app/test/test_thash.c +1 -1
index 53d9611e18..dd6468eb56 100644
@@ -966,4 +966,4 @@ test_thash(void)
 	return unit_test_suite_runner(&thash_tests);
 }
 
-REGISTER_TEST_COMMAND(thash_autotest, test_thash);
+REGISTER_FAST_TEST(thash_autotest, True, True, test_thash);
app/test/test_thash_perf.c +1 -1
index 687582aa32..9dfd5d3c21 100644
@@ -135,4 +135,4 @@ test_thash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);
+REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf);
app/test/test_threads.c +1 -1
index a4c4f651a4..6ed6b168d4 100644
@@ -279,4 +279,4 @@ test_threads(void)
 	return unit_test_suite_runner(&threads_test_suite);
 }
 
-REGISTER_TEST_COMMAND(threads_autotest, test_threads);
+REGISTER_FAST_TEST(threads_autotest, True, True, test_threads);
app/test/test_ticketlock.c +1 -1
index 242c136478..25af697c0a 100644
@@ -314,4 +314,4 @@ test_ticketlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock);
+REGISTER_FAST_TEST(ticketlock_autotest, True, True, test_ticketlock);
app/test/test_timer.c +1 -1
index 0c36dc9010..09608a1845 100644
@@ -594,4 +594,4 @@ test_timer(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_autotest, test_timer);
+REGISTER_FAST_TEST(timer_autotest, False, True, test_timer);
app/test/test_timer_perf.c +1 -1
index 0ede4b3e40..d2d74ebbc6 100644
@@ -131,4 +131,4 @@ test_timer_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
+REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf);
app/test/test_timer_racecond.c +1 -1
index bb56ae8324..6f8b448ff8 100644
@@ -172,4 +172,4 @@ test_timer_racecond(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
+REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond);
app/test/test_trace.c +1 -1
index ad4a394a29..96829caed5 100644
@@ -250,4 +250,4 @@ test_trace(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_FAST_TEST(trace_autotest, True, True, test_trace);
app/test/test_trace_perf.c +1 -1
index 46ae7d8074..a6dd075722 100644
@@ -179,4 +179,4 @@ test_trace_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf);
+REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf);
app/test/test_version.c +1 -1
index 1e1ff18656..21016237bc 100644
@@ -25,4 +25,4 @@ test_version(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(version_autotest, test_version);
+REGISTER_FAST_TEST(version_autotest, True, True, test_version);
Signature · 1 line
2.39.2
#33 lore raw

PATCH v4 3/8 app/test: make telemetry data test buildable on windows

In reply to Bruce Richardson

To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built.

---
 app/test/test_telemetry_data.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
app/test/test_telemetry_data.c +12 -2
index a960f44c1b..b2dc1d75db 100644
@@ -2,11 +2,20 @@
  * Copyright 2020 Intel Corporation
  */
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include "test.h"
+
+static int
+telemetry_data_autotest(void)
+{
+	return TEST_SKIPPED;
+}
+
+#else
+
 #include <string.h>
 #include <sys/socket.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/un.h>
-#endif
 #include <unistd.h>
 #include <limits.h>
 
@@ -604,5 +613,6 @@ telemetry_data_autotest(void)
 	close(sock);
 	return 0;
 }
+#endif /* windows/non-windows */
 
 REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest);
Signature · 1 line
2.39.2
#34 lore raw

PATCH v4 4/8 app/test: build using per-file dependency matrix

In reply to Bruce Richardson

Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon.

Initial version of this table was generated via analysis of the header files included in each C file. The basic dependencies of the test binary [cmdline, ring, mempool and mbuf] were then removed from the per-file lists, as there is no point in checking them as the whole app will be disabled if they are not present.

With the file list, the dependencies for the "utility" C-files are kept separate, so that other tests which depend on the functions provided by those files can have that dependency recorded properly. The basic cryptodev tests also fall into this category as functions from the main cryptodev test file are used by other crypto tests.

As well as the main table for internal dependencies, some test files have separate external components too. A second, much smaller table lists these dependencies.

---
 app/meson.build      |   8 +-
 app/test/meson.build | 823 ++++++++++++-------------------------------
 2 files changed, 238 insertions(+), 593 deletions(-)
app/meson.build +5 -3
index 4fc1a83eba..0d8b618e7f 100644
@@ -32,6 +32,11 @@ apps = [
         'test-security-perf',
 ]
 
+if get_option('tests')
+# build the auto test app if enabled.
+    apps += 'test'
+endif
+
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -106,6 +111,3 @@ foreach app:apps
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
 endforeach
-
-# special case the autotests
-subdir('test')
app/test/meson.build +233 -590

833 lines not on this page · raw message

Signature · 1 line
2.39.2
#35 lore raw

PATCH v4 5/8 app/test: define unit tests suites based on test macros

In reply to Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 72 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 +++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 113 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +72 -0

72 lines not on this page · raw message

buildtools/get-test-suites.py new file +33 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py
buildtools/meson.build +2 -0
index e1c600e40f..ac5e4dcf08 100644
@@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#36 lore raw

PATCH v4 6/8 examples/l3fwd: make eventdev an optional dependency

In reply to Bruce Richardson

With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.

---
 examples/l3fwd/l3fwd_em.c                  |  2 +
 examples/l3fwd/l3fwd_em_hlm.h              |  2 +
 examples/l3fwd/l3fwd_event.c               |  2 +
 examples/l3fwd/l3fwd_event.h               |  7 ++-
 examples/l3fwd/l3fwd_event_generic.c       |  2 +
 examples/l3fwd/l3fwd_event_internal_port.c |  2 +
 examples/l3fwd/l3fwd_fib.c                 |  2 +
 examples/l3fwd/l3fwd_lpm.c                 |  2 +
 examples/l3fwd/main.c                      | 65 +++++++++++++++++-----
 examples/l3fwd/meson.build                 |  5 +-
 10 files changed, 74 insertions(+), 17 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
index 476ac0c54f..40e102b38a 100644
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline void
 em_event_loop_single(struct l3fwd_event_resources *evt_rsrc,
 		const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	em_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Initialize exact match (hash) parameters. 8< */
 void
examples/l3fwd/l3fwd_em_hlm.h +2 -0
index 2e11eefad7..31cda9ddc1 100644
@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 	send_packets_multi(qconf, pkts_burst, dst_port, nb_rx);
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /*
  * Buffer optimized handling of events, invoked
  * from main_loop.
@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,
 
 	process_event_vector(vec, dst_port);
 }
+#endif /* RTE_LIB_EVENTDEV */
 
 #endif /* __L3FWD_EM_HLM_H__ */
examples/l3fwd/l3fwd_event.c +2 -0
index 32906ab08d..d72a4138cc 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 #include <getopt.h>
 
@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 	rte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush,
 			       NULL);
 }
+#endif /* #ifdef RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event.h +5 -2
index e21817c36b..1fd6fe4a78 100644
@@ -6,11 +6,13 @@
 #define __L3FWD_EVENTDEV_H__
 
 #include <rte_common.h>
+#include <rte_service.h>
+#include <rte_spinlock.h>
+
+#ifdef RTE_LIB_EVENTDEV
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
-#include <rte_service.h>
-#include <rte_spinlock.h>
 
 #include "l3fwd.h"
 
@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 				struct rte_event events[], uint16_t nb_enq,
 				uint16_t nb_deq, uint8_t is_vector);
 
+#endif /* ifdef RTE_LIB_EVENTDEV */
 #endif /* __L3FWD_EVENTDEV_H__ */
examples/l3fwd/l3fwd_event_generic.c +2 -0
index c80573fc58..ddb6e5c38d 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_generic;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event_internal_port.c +2 -0
index 32cf657148..cb49a8b9fa 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_internal_port;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_fib.c +2 -0
index 18398492ae..6a21984415 100644
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /* One eventdev loop for single and burst using fib. */
 static __rte_always_inline void
 fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	fib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Function to setup fib. 8< */
 void
examples/l3fwd/l3fwd_lpm.c +2 -0
index 4ac1925c84..a484a33089 100644
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline uint16_t
 lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	lpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 void
 setup_lpm(const int socketid)
examples/l3fwd/main.c +51 -14

227 lines not on this page · raw message

examples/l3fwd/meson.build +4 -1
index b40244a941..c25de77bba 100644
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 allow_experimental_apis = true
-deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']
+deps += ['acl', 'hash', 'lpm', 'fib']
 sources = files(
         'l3fwd_acl.c',
         'l3fwd_em.c',
@@ -18,3 +18,6 @@ sources = files(
         'l3fwd_lpm.c',
         'main.c',
 )
+if dpdk_conf.has('RTE_LIB_EVENTDEV')
+    deps += 'eventdev'
+endif
Signature · 1 line
2.39.2
#37 lore raw

PATCH v4 7/8 build: make most device classes optional

In reply to Bruce Richardson

Apart from ethdev and cryptodev, which have lots of components and tests which depend on them, we can make the device class libraries optional without too much work.

This patch marks:
* bbdev,
* compressdev,
* dmadev,
* eventdev,
* mldev,
* rawdev,
* regexdev
optional, and ensures that DPDK - including tests - can be built with these components disabled.

---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)
lib/meson.build +7 -0
index 92cbd6bb66..1a78c8c984 100644
@@ -67,8 +67,12 @@ libraries = [
 ]
 
 optional_libs = [
+        'bbdev',
         'bitratestats',
         'cfgfile',
+        'compressdev',
+        'dmadev',
+        'eventdev',
         'gpudev',
         'graph',
         'gro',
@@ -76,11 +80,14 @@ optional_libs = [
         'jobstats',
         'latencystats',
         'metrics',
+        'mldev',
         'node',
         'pdump',
         'pipeline',
         'port',
         'power',
+        'rawdev',
+        'regexdev',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#38 lore raw

PATCH v4 8/8 build: expand list of optional libraries

In reply to Bruce Richardson

With the unit test build now with individual per-file dependencies, we can more easily expand the list of optional libraries. Add 8 new libraries to the optional list.

---
 lib/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
lib/meson.build +8 -0
index 1a78c8c984..0c9dc8b3b6 100644
@@ -69,25 +69,33 @@ libraries = [
 optional_libs = [
         'bbdev',
         'bitratestats',
+        'bpf',
         'cfgfile',
         'compressdev',
+        'distributor',
         'dmadev',
+        'efd',
         'eventdev',
         'gpudev',
         'graph',
         'gro',
         'gso',
+        'ip_frag',
         'jobstats',
         'latencystats',
+        'member',
         'metrics',
         'mldev',
         'node',
+        'pcapng',
         'pdump',
         'pipeline',
         'port',
         'power',
         'rawdev',
         'regexdev',
+        'reorder',
+        'sched',
         'table',
         'vhost',
 ]
Signature · 1 line
2.39.2
#39 lore raw

Re: [PATCH v4 0/8] expand list of optional libraries

In reply to Bruce Richardson
Quoted 33 lines · Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 5 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5 is applied. If this is an issue, the two patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.
* A number of files in the test directory were not being built, and seem to have never been built with meson. This requires separate work, outside the scope of the patchset to fix.
* Similarly, some unit tests were never added to test suites. These can now be found by using grep to find the old REGISTER_TEST_COMMAND macro. Again, adding orphan tests to suites is outside the scope of this set.

Quoted 5 lines

V4:
- improve test suite definition, hopefully improving test pass rate:
- drop unnecessary file-prefix for fast tests, since tests are not parallel
- always pass driver path flag in "meson test" for shared builds.

Missed applying Morten's ack to the series in V4. Adding it here.

#40 lore raw

v5 cover expand list of optional libraries

In reply to Bruce Richardson

This patchset contains changes to DPDK to make the build more configurable overall. The changes can be grouped into two areas:

* Firstly, there are changes to make the build of the unit tests more flexible and maintainable. These 7 patches switch the unit tests from having separate hard-coded lists of files and tests, with lots of conditional logic to add/remove items from the list, to instead being a single list of files and dependencies per-file. The actual lists of test-suites are built up dynamically from the list of files whose dependencies are met and therefore will be part of the build. This rework enables...
* The second set of patches which expands the list of libraries which can be disabled at build-time, while still giving a successful build of DPDK. Overall, after this set is applied, the list of optional libraries in DPDK is approx doubled in size. [15 additions giving 31 optional libs]

NOTES:
* as stated in the RFC, the test binary moves in the build as a result of this set - from app/test/dpdk-test to app/dpdk-test.
* running the suites of tests no longer works after patch 4 until patch 5-7 is applied. If this is an issue, the patches can be merged on apply. However, the individual tests are still runnable through the test binary - it's only through "meson test" that there are issues, so I'm keeping the patches separate since each is relatively complex in its own right.
* A number of files in the test directory were not being built, and seem to have never been built with meson. This requires separate work, outside the scope of the patchset to fix.
* Similarly, some unit tests were never added to test suites. These can now be found by using grep to find the old REGISTER_TEST_COMMAND macro. Again, adding orphan tests to suites is outside the scope of this set.

V5:
- revert back to using the environment to pass the test names rather than the commandline. This allows use of "--test-args" with meson test to pass additional EAL parameters, such as coremasks, to the test run.
- add back in support for the script for checking telemetry commands
- add support for the dump-* tests in the "debug-tests" suite. Sadly, even though these are hardcoded in commands.c, they aren't easily discoverable at build-time, so we have to use a hard-coded list.

V4:
- improve test suite definition, hopefully improving test pass rate:
- drop unnecessary file-prefix for fast tests, since tests are not parallel
- always pass driver path flag in "meson test" for shared builds.

V3:
- Create symlink to old path to test binary, to ensure all automated CI, and any other use of the test binary still works.

V2:
- Changes since RFC:
- merged two previous sets - reworking test build, and disabling libs - into one, since they depend on each other
- Reworked the list of dependencies for each file in the tests, so that files that depend on other files have those deps called out.
- Added list of external dependencies to the test builds
- For disabling libs, merged patches disabling individual libs together into one patch, since all unit test build changes were unnecessary. This made each patch a single-line addition to the optional list in lib/meson.build.

Bruce Richardson (10):
app/test: add new macros for various test types app/test: tag tests with the test type app/test: make telemetry data test buildable on windows app/test: build using per-file dependency matrix app/test: define unit tests suites based on test macros app/test: add test case for scripted telemetry commands app/test: add debug test suite
examples/l3fwd: make eventdev an optional dependency
build: make most device classes optional
build: expand list of optional libraries

 app/meson.build                               |  15 +-
 app/test/meson.build                          | 823 +++++-------------
 app/test/suites/meson.build                   | 124 +++
 app/test/{ => suites}/test_telemetry.sh       |   0
 app/test/test.h                               |   9 +-
 app/test/test_acl.c                           |   2 +-
 app/test/test_atomic.c                        |   2 +-
 app/test/test_barrier.c                       |   2 +-
 app/test/test_bitmap.c                        |   2 +-
 app/test/test_bitops.c                        |   2 +-
 app/test/test_bpf.c                           |   4 +-
 app/test/test_byteorder.c                     |   2 +-
 app/test/test_cksum.c                         |   2 +-
 app/test/test_cmdline.c                       |   2 +-
 app/test/test_common.c                        |   2 +-
 app/test/test_cpuflags.c                      |   2 +-
 app/test/test_crc.c                           |   2 +-
 app/test/test_cryptodev.c                     |  38 +-
 app/test/test_cryptodev_asym.c                |   2 +-
 app/test/test_cycles.c                        |   2 +-
 app/test/test_debug.c                         |   2 +-
 app/test/test_devargs.c                       |   2 +-
 app/test/test_distributor.c                   |   2 +-
 app/test/test_distributor_perf.c              |   2 +-
 app/test/test_dmadev.c                        |   2 +-
 app/test/test_eal_flags.c                     |  24 +-
 app/test/test_eal_fs.c                        |   2 +-
 app/test/test_efd.c                           |   2 +-
 app/test/test_efd_perf.c                      |   2 +-
 app/test/test_errno.c                         |   2 +-
 app/test/test_ethdev_link.c                   |   2 +-
 app/test/test_event_ring.c                    |   2 +-
 app/test/test_eventdev.c                      |   2 +-
 app/test/test_fbarray.c                       |   2 +-
 app/test/test_fib.c                           |   4 +-
 app/test/test_fib6.c                          |   4 +-
 app/test/test_fib6_perf.c                     |   2 +-
 app/test/test_fib_perf.c                      |   2 +-
 app/test/test_func_reentrancy.c               |   2 +-
 app/test/test_hash.c                          |   2 +-
 app/test/test_hash_functions.c                |   2 +-
 app/test/test_hash_multiwriter.c              |   2 +-
 app/test/test_hash_perf.c                     |   2 +-
 app/test/test_hash_readwrite.c                |   4 +-
 app/test/test_hash_readwrite_lf_perf.c        |   2 +-
 app/test/test_interrupts.c                    |   2 +-
 app/test/test_ipfrag.c                        |   2 +-
 app/test/test_ipsec.c                         |   2 +-
 app/test/test_ipsec_perf.c                    |   2 +-
 app/test/test_kvargs.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_lpm6_perf.c                     |   2 +-
 app/test/test_lpm_perf.c                      |   2 +-
 app/test/test_malloc.c                        |   2 +-
 app/test/test_malloc_perf.c                   |   2 +-
 app/test/test_mbuf.c                          |   2 +-
 app/test/test_mcslock.c                       |   2 +-
 app/test/test_member.c                        |   2 +-
 app/test/test_member_perf.c                   |   2 +-
 app/test/test_memcpy.c                        |   2 +-
 app/test/test_memcpy_perf.c                   |   2 +-
 app/test/test_memory.c                        |   2 +-
 app/test/test_mempool.c                       |   2 +-
 app/test/test_mempool_perf.c                  |   2 +-
 app/test/test_memzone.c                       |   2 +-
 app/test/test_meter.c                         |   2 +-
 app/test/test_mp_secondary.c                  |   2 +-
 app/test/test_per_lcore.c                     |   2 +-
 app/test/test_pflock.c                        |   2 +-
 app/test/test_pie.c                           |   6 +-
 app/test/test_pmd_perf.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_rand_perf.c                     |   2 +-
 app/test/test_rcu_qsbr.c                      |   2 +-
 app/test/test_rcu_qsbr_perf.c                 |   2 +-
 app/test/test_reassembly_perf.c               |   2 +-
 app/test/test_reciprocal_division.c           |   2 +-
 app/test/test_reciprocal_division_perf.c      |   2 +-
 app/test/test_red.c                           |   4 +-
 app/test/test_reorder.c                       |   2 +-
 app/test/test_rib.c                           |   4 +-
 app/test/test_rib6.c                          |   4 +-
 app/test/test_ring.c                          |   2 +-
 app/test/test_ring_perf.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                 |   4 +-
 app/test/test_spinlock.c                      |   2 +-
 app/test/test_stack.c                         |   4 +-
 app/test/test_stack_perf.c                    |   4 +-
 app/test/test_string_fns.c                    |   2 +-
 app/test/test_tailq.c                         |   2 +-
 app/test/test_telemetry_data.c                |  14 +-
 app/test/test_thash.c                         |   2 +-
 app/test/test_thash_perf.c                    |   2 +-
 app/test/test_threads.c                       |   2 +-
 app/test/test_ticketlock.c                    |   2 +-
 app/test/test_timer.c                         |   2 +-
 app/test/test_timer_perf.c                    |   2 +-
 app/test/test_timer_racecond.c                |   2 +-
 app/test/test_trace.c                         |   2 +-
 app/test/test_trace_perf.c                    |   2 +-
 app/test/test_version.c                       |   2 +-
 buildtools/get-test-suites.py                 |  33 +
 .../has-hugepages.py                          |   0
 buildtools/meson.build                        |   2 +
 examples/l3fwd/l3fwd_em.c                     |   2 +
 examples/l3fwd/l3fwd_em_hlm.h                 |   2 +
 examples/l3fwd/l3fwd_event.c                  |   2 +
 examples/l3fwd/l3fwd_event.h                  |   7 +-
 examples/l3fwd/l3fwd_event_generic.c          |   2 +
 examples/l3fwd/l3fwd_event_internal_port.c    |   2 +
 examples/l3fwd/l3fwd_fib.c                    |   2 +
 examples/l3fwd/l3fwd_lpm.c                    |   2 +
 examples/l3fwd/main.c                         |  65 +-
 examples/l3fwd/meson.build                    |   5 +-
 lib/meson.build                               |  15 +
 126 files changed, 662 insertions(+), 764 deletions(-)
 create mode 100644 app/test/suites/meson.build
 rename app/test/{ => suites}/test_telemetry.sh (100%)
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)

--
2.39.2

#41 lore raw

PATCH v5 1/10 app/test: add new macros for various test types

Rather than just registering all tests using a single generic macro, add macros which identify the test as being of a particular type.

---
 app/test/test.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
app/test/test.h +8 -1
index 85f57efbc6..a91ded76af 100644
@@ -190,7 +190,7 @@ struct test_command {
 
 void add_test_command(struct test_command *t);
 
-/* Register a test function with its command string */
+/* Register a test function with its command string. Should not be used directly */
 #define REGISTER_TEST_COMMAND(cmd, func) \
 	static struct test_command test_struct_##cmd = { \
 		.command = RTE_STR(cmd), \
@@ -201,4 +201,11 @@ void add_test_command(struct test_command *t);
 		add_test_command(&test_struct_##cmd); \
 	}
 
+/* 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
+
 #endif
Signature · 1 line
2.39.2
#42 lore raw

PATCH v5 2/10 app/test: tag tests with the test type

In reply to Bruce Richardson

Rather than having the test types called out in the meson.build file, we can use macros to identify the test type in the C file itself and then dynamically build up the tests lists at config time.

---
 app/test/test_acl.c                      |  2 +-
 app/test/test_atomic.c                   |  2 +-
 app/test/test_barrier.c                  |  2 +-
 app/test/test_bitmap.c                   |  2 +-
 app/test/test_bitops.c                   |  2 +-
 app/test/test_bpf.c                      |  4 +--
 app/test/test_byteorder.c                |  2 +-
 app/test/test_cksum.c                    |  2 +-
 app/test/test_cmdline.c                  |  2 +-
 app/test/test_common.c                   |  2 +-
 app/test/test_cpuflags.c                 |  2 +-
 app/test/test_crc.c                      |  2 +-
 app/test/test_cryptodev.c                | 38 ++++++++++++------------
 app/test/test_cryptodev_asym.c           |  2 +-
 app/test/test_cycles.c                   |  2 +-
 app/test/test_debug.c                    |  2 +-
 app/test/test_devargs.c                  |  2 +-
 app/test/test_distributor.c              |  2 +-
 app/test/test_distributor_perf.c         |  2 +-
 app/test/test_dmadev.c                   |  2 +-
 app/test/test_eal_flags.c                | 24 +++++++--------
 app/test/test_eal_fs.c                   |  2 +-
 app/test/test_efd.c                      |  2 +-
 app/test/test_efd_perf.c                 |  2 +-
 app/test/test_errno.c                    |  2 +-
 app/test/test_ethdev_link.c              |  2 +-
 app/test/test_event_ring.c               |  2 +-
 app/test/test_eventdev.c                 |  2 +-
 app/test/test_fbarray.c                  |  2 +-
 app/test/test_fib.c                      |  4 +--
 app/test/test_fib6.c                     |  4 +--
 app/test/test_fib6_perf.c                |  2 +-
 app/test/test_fib_perf.c                 |  2 +-
 app/test/test_func_reentrancy.c          |  2 +-
 app/test/test_hash.c                     |  2 +-
 app/test/test_hash_functions.c           |  2 +-
 app/test/test_hash_multiwriter.c         |  2 +-
 app/test/test_hash_perf.c                |  2 +-
 app/test/test_hash_readwrite.c           |  4 +--
 app/test/test_hash_readwrite_lf_perf.c   |  2 +-
 app/test/test_interrupts.c               |  2 +-
 app/test/test_ipfrag.c                   |  2 +-
 app/test/test_ipsec.c                    |  2 +-
 app/test/test_ipsec_perf.c               |  2 +-
 app/test/test_kvargs.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_lpm6_perf.c                |  2 +-
 app/test/test_lpm_perf.c                 |  2 +-
 app/test/test_malloc.c                   |  2 +-
 app/test/test_malloc_perf.c              |  2 +-
 app/test/test_mbuf.c                     |  2 +-
 app/test/test_mcslock.c                  |  2 +-
 app/test/test_member.c                   |  2 +-
 app/test/test_member_perf.c              |  2 +-
 app/test/test_memcpy.c                   |  2 +-
 app/test/test_memcpy_perf.c              |  2 +-
 app/test/test_memory.c                   |  2 +-
 app/test/test_mempool.c                  |  2 +-
 app/test/test_mempool_perf.c             |  2 +-
 app/test/test_memzone.c                  |  2 +-
 app/test/test_meter.c                    |  2 +-
 app/test/test_mp_secondary.c             |  2 +-
 app/test/test_per_lcore.c                |  2 +-
 app/test/test_pflock.c                   |  2 +-
 app/test/test_pie.c                      |  6 ++--
 app/test/test_pmd_perf.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_rand_perf.c                |  2 +-
 app/test/test_rcu_qsbr.c                 |  2 +-
 app/test/test_rcu_qsbr_perf.c            |  2 +-
 app/test/test_reassembly_perf.c          |  2 +-
 app/test/test_reciprocal_division.c      |  2 +-
 app/test/test_reciprocal_division_perf.c |  2 +-
 app/test/test_red.c                      |  4 +--
 app/test/test_reorder.c                  |  2 +-
 app/test/test_rib.c                      |  4 +--
 app/test/test_rib6.c                     |  4 +--
 app/test/test_ring.c                     |  2 +-
 app/test/test_ring_perf.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            |  4 +--
 app/test/test_spinlock.c                 |  2 +-
 app/test/test_stack.c                    |  4 +--
 app/test/test_stack_perf.c               |  4 +--
 app/test/test_string_fns.c               |  2 +-
 app/test/test_tailq.c                    |  2 +-
 app/test/test_thash.c                    |  2 +-
 app/test/test_thash_perf.c               |  2 +-
 app/test/test_threads.c                  |  2 +-
 app/test/test_ticketlock.c               |  2 +-
 app/test/test_timer.c                    |  2 +-
 app/test/test_timer_perf.c               |  2 +-
 app/test/test_timer_racecond.c           |  2 +-
 app/test/test_trace.c                    |  2 +-
 app/test/test_trace_perf.c               |  2 +-
 app/test/test_version.c                  |  2 +-
 106 files changed, 150 insertions(+), 150 deletions(-)
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);
app/test/test_atomic.c +1 -1
index e4b997827e..b52420c10b 100644
@@ -631,4 +631,4 @@ test_atomic(void)
 
 	return 0;
 }
-REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
+REGISTER_FAST_TEST(atomic_autotest, False, True, test_atomic);
app/test/test_barrier.c +1 -1
index ec69af25bf..925a88b68a 100644
@@ -285,4 +285,4 @@ test_barrier(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(barrier_autotest, test_barrier);
+REGISTER_PERF_TEST(barrier_autotest, test_barrier);
app/test/test_bitmap.c +1 -1
index e9c61590ae..2014d2682c 100644
@@ -269,4 +269,4 @@ test_bitmap(void)
 	return test_bitmap_all_set();
 }
 
-REGISTER_TEST_COMMAND(bitmap_autotest, test_bitmap);
+REGISTER_FAST_TEST(bitmap_autotest, True, True, test_bitmap);
app/test/test_bitops.c +1 -1
index c21426bf2f..dac466602b 100644
@@ -135,4 +135,4 @@ test_bitops(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(bitops_autotest, test_bitops);
+REGISTER_FAST_TEST(bitops_autotest, True, True, test_bitops);
app/test/test_bpf.c +2 -2
index f5af5e8a3f..5fef17fbc2 100644
@@ -3262,7 +3262,7 @@ test_bpf(void)
 
 #endif /* !RTE_LIB_BPF */
 
-REGISTER_TEST_COMMAND(bpf_autotest, test_bpf);
+REGISTER_FAST_TEST(bpf_autotest, True, True, test_bpf);
 
 #ifndef RTE_HAS_LIBPCAP
 
@@ -3473,4 +3473,4 @@ test_bpf_convert(void)
 
 #endif /* RTE_HAS_LIBPCAP */
 
-REGISTER_TEST_COMMAND(bpf_convert_autotest, test_bpf_convert);
+REGISTER_FAST_TEST(bpf_convert_autotest, True, True, test_bpf_convert);
app/test/test_byteorder.c +1 -1
index de14ed539e..2189f94744 100644
@@ -63,4 +63,4 @@ test_byteorder(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
+REGISTER_FAST_TEST(byteorder_autotest, True, True, test_byteorder);
app/test/test_cksum.c +1 -1
index 6c15de9a93..c04fae800e 100644
@@ -267,4 +267,4 @@ test_cksum(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(cksum_autotest, test_cksum);
+REGISTER_FAST_TEST(cksum_autotest, True, True, test_cksum);
app/test/test_cmdline.c +1 -1
index 115bee966d..c2a375ac1c 100644
@@ -60,4 +60,4 @@ test_cmdline(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
+REGISTER_FAST_TEST(cmdline_autotest, True, True, test_cmdline);
app/test/test_common.c +1 -1
index f89e1eb7ee..c7b41a3f0e 100644
@@ -350,4 +350,4 @@ test_common(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(common_autotest, test_common);
+REGISTER_FAST_TEST(common_autotest, True, True, test_common);
app/test/test_cpuflags.c +1 -1
index a0e342ae48..c3417dda24 100644
@@ -334,4 +334,4 @@ test_cpuflags(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
+REGISTER_FAST_TEST(cpuflags_autotest, True, True, test_cpuflags);
app/test/test_crc.c +1 -1
index 5edc8fb13b..b267bdde9f 100644
@@ -171,4 +171,4 @@ test_crc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(crc_autotest, test_crc);
+REGISTER_FAST_TEST(crc_autotest, True, True, test_crc);
app/test/test_cryptodev.c +19 -19
index fb2af40b99..956268bfcd 100644
@@ -17535,33 +17535,33 @@ REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_raw_api_autotest,
 		test_cryptodev_dpaa2_sec_raw_api);
 REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_raw_api_autotest,
 		test_cryptodev_dpaa_sec_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_raw_api_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_raw_api_autotest,
 		test_cryptodev_qat_raw_api);
-REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_DRIVER_TEST(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_mb_autotest,
 	test_cryptodev_cpu_aesni_mb);
-REGISTER_TEST_COMMAND(cryptodev_chacha_poly_mb_autotest,
+REGISTER_DRIVER_TEST(cryptodev_chacha_poly_mb_autotest,
 	test_cryptodev_chacha_poly_mb);
-REGISTER_TEST_COMMAND(cryptodev_openssl_autotest, test_cryptodev_openssl);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
-REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
+REGISTER_DRIVER_TEST(cryptodev_openssl_autotest, test_cryptodev_openssl);
+REGISTER_DRIVER_TEST(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+REGISTER_DRIVER_TEST(cryptodev_cpu_aesni_gcm_autotest,
 	test_cryptodev_cpu_aesni_gcm);
 REGISTER_TEST_COMMAND(cryptodev_mlx5_autotest, test_cryptodev_mlx5);
-REGISTER_TEST_COMMAND(cryptodev_null_autotest, test_cryptodev_null);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
-REGISTER_TEST_COMMAND(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
-REGISTER_TEST_COMMAND(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
-REGISTER_TEST_COMMAND(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
-REGISTER_TEST_COMMAND(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
-REGISTER_TEST_COMMAND(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
+REGISTER_DRIVER_TEST(cryptodev_null_autotest, test_cryptodev_null);
+REGISTER_DRIVER_TEST(cryptodev_sw_snow3g_autotest, test_cryptodev_sw_snow3g);
+REGISTER_DRIVER_TEST(cryptodev_sw_kasumi_autotest, test_cryptodev_sw_kasumi);
+REGISTER_DRIVER_TEST(cryptodev_sw_zuc_autotest, test_cryptodev_sw_zuc);
+REGISTER_DRIVER_TEST(cryptodev_sw_armv8_autotest, test_cryptodev_armv8);
+REGISTER_DRIVER_TEST(cryptodev_sw_mvsam_autotest, test_cryptodev_mrvl);
+REGISTER_DRIVER_TEST(cryptodev_dpaa2_sec_autotest, test_cryptodev_dpaa2_sec);
+REGISTER_DRIVER_TEST(cryptodev_dpaa_sec_autotest, test_cryptodev_dpaa_sec);
 REGISTER_TEST_COMMAND(cryptodev_ccp_autotest, test_cryptodev_ccp);
-REGISTER_TEST_COMMAND(cryptodev_uadk_autotest, test_cryptodev_uadk);
+REGISTER_DRIVER_TEST(cryptodev_uadk_autotest, test_cryptodev_uadk);
 REGISTER_TEST_COMMAND(cryptodev_virtio_autotest, test_cryptodev_virtio);
 REGISTER_TEST_COMMAND(cryptodev_octeontx_autotest, test_cryptodev_octeontx);
 REGISTER_TEST_COMMAND(cryptodev_caam_jr_autotest, test_cryptodev_caam_jr);
 REGISTER_TEST_COMMAND(cryptodev_nitrox_autotest, test_cryptodev_nitrox);
 REGISTER_TEST_COMMAND(cryptodev_bcmfs_autotest, test_cryptodev_bcmfs);
-REGISTER_TEST_COMMAND(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
-REGISTER_TEST_COMMAND(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
+REGISTER_DRIVER_TEST(cryptodev_cn9k_autotest, test_cryptodev_cn9k);
+REGISTER_DRIVER_TEST(cryptodev_cn10k_autotest, test_cryptodev_cn10k);
app/test/test_cryptodev_asym.c +1 -1
index 0ef2642fdd..3d5a73bf89 100644
@@ -2828,7 +2828,7 @@ test_cryptodev_cn10k_asym(void)
 REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
 					  test_cryptodev_openssl_asym);
 
-REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
+REGISTER_DRIVER_TEST(cryptodev_qat_asym_autotest, test_cryptodev_qat_asym);
 
 REGISTER_TEST_COMMAND(cryptodev_octeontx_asym_autotest,
 					  test_cryptodev_octeontx_asym);
app/test/test_cycles.c +1 -1
index 66d11e6db8..08c91cef78 100644
@@ -53,4 +53,4 @@ test_user_delay_us(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(user_delay_us, test_user_delay_us);
+REGISTER_FAST_TEST(user_delay_us, True, True, test_user_delay_us);
app/test/test_debug.c +1 -1
index 2704f5b927..acd9542257 100644
@@ -140,4 +140,4 @@ test_debug(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(debug_autotest, test_debug);
+REGISTER_FAST_TEST(debug_autotest, True, True, test_debug);
app/test/test_devargs.c +1 -1
index 0a4c34a1ad..59ec04957e 100644
@@ -213,4 +213,4 @@ test_devargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
+REGISTER_FAST_TEST(devargs_autotest, True, True, test_devargs);
app/test/test_distributor.c +1 -1
index 3efa4af104..ee263a7fee 100644
@@ -952,4 +952,4 @@ test_distributor(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
+REGISTER_FAST_TEST(distributor_autotest, False, True, test_distributor);
app/test/test_distributor_perf.c +1 -1
index ee4321486d..ca868451d7 100644
@@ -277,4 +277,4 @@ test_distributor_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
+REGISTER_PERF_TEST(distributor_perf_autotest, test_distributor_perf);
app/test/test_dmadev.c +1 -1
index 0736ff2a18..6ef875e545 100644
@@ -941,4 +941,4 @@ test_dma(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(dmadev_autotest, test_dma);
+REGISTER_DRIVER_TEST(dmadev_autotest, test_dma);
app/test/test_eal_flags.c +12 -12
index 148e9098e8..3b7af7405d 100644
@@ -1644,15 +1644,15 @@ test_memory_flags(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag);
-REGISTER_TEST_COMMAND(eal_flags_main_opt_autotest, test_main_lcore_flag);
-REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag);
-REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag);
-REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag);
-REGISTER_TEST_COMMAND(eal_flags_a_opt_autotest, test_allow_flag);
-REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag);
-REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag);
-REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag);
-REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags);
-REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix);
-REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags);
+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);
app/test/test_eal_fs.c +1 -1
index b3686edcb4..a4bdc1236d 100644
@@ -185,4 +185,4 @@ test_eal_fs(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
+REGISTER_FAST_TEST(eal_fs_autotest, True, True, test_eal_fs);
app/test/test_efd.c +1 -1
index fa29e8f97a..1c0986b9bc 100644
@@ -473,4 +473,4 @@ test_efd(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_autotest, test_efd);
+REGISTER_PERF_TEST(efd_autotest, test_efd);
app/test/test_efd_perf.c +1 -1
index 4d04ed93e3..b212e96767 100644
@@ -393,4 +393,4 @@ test_efd_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(efd_perf_autotest, test_efd_perf);
+REGISTER_PERF_TEST(efd_perf_autotest, test_efd_perf);
app/test/test_errno.c +1 -1
index 0db4fbc8b3..1082299665 100644
@@ -94,4 +94,4 @@ test_errno(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(errno_autotest, test_errno);
+REGISTER_FAST_TEST(errno_autotest, True, True, test_errno);
app/test/test_ethdev_link.c +1 -1
index ab52385a12..d73e18065d 100644
@@ -167,4 +167,4 @@ test_link_status(void)
 	return unit_test_suite_runner(&link_status_testsuite);
 }
 
-REGISTER_TEST_COMMAND(ethdev_link_status, test_link_status);
+REGISTER_FAST_TEST(ethdev_link_status, True, True, test_link_status);
app/test/test_event_ring.c +1 -1
index bc4a6e73f5..d5c8499cfd 100644
@@ -256,4 +256,4 @@ test_event_ring(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(event_ring_autotest, test_event_ring);
+REGISTER_FAST_TEST(event_ring_autotest, True, True, test_event_ring);
app/test/test_eventdev.c +1 -1
index 336529038e..e65d893781 100644
@@ -1256,7 +1256,7 @@ test_eventdev_selftest_cn10k(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common);
+REGISTER_FAST_TEST(eventdev_common_autotest, True, True, test_eventdev_common);
 
 #ifndef RTE_EXEC_ENV_WINDOWS
 REGISTER_TEST_COMMAND(eventdev_selftest_sw, test_eventdev_selftest_sw);
app/test/test_fbarray.c +1 -1
index a691bf4458..03428a45fe 100644
@@ -733,4 +733,4 @@ test_fbarray(void)
 	return unit_test_suite_runner(&fbarray_test_suite);
 }
 
-REGISTER_TEST_COMMAND(fbarray_autotest, test_fbarray);
+REGISTER_FAST_TEST(fbarray_autotest, True, True, test_fbarray);
app/test/test_fib.c +2 -2
index eb69d6e2fd..2a8404db61 100644
@@ -415,5 +415,5 @@ test_slow_fib(void)
 	return unit_test_suite_runner(&fib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib_autotest, test_fib);
-REGISTER_TEST_COMMAND(fib_slow_autotest, test_slow_fib);
+REGISTER_FAST_TEST(fib_autotest, True, True, test_fib);
+REGISTER_PERF_TEST(fib_slow_autotest, test_slow_fib);
app/test/test_fib6.c +2 -2
index 15ad09178a..9b1c0ac8c7 100644
@@ -424,5 +424,5 @@ test_slow_fib6(void)
 	return unit_test_suite_runner(&fib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(fib6_autotest, test_fib6);
-REGISTER_TEST_COMMAND(fib6_slow_autotest, test_slow_fib6);
+REGISTER_FAST_TEST(fib6_autotest, True, True, test_fib6);
+REGISTER_PERF_TEST(fib6_slow_autotest, test_slow_fib6);
app/test/test_fib6_perf.c +1 -1
index add20c2331..a7abc46af9 100644
@@ -156,4 +156,4 @@ test_fib6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib6_perf_autotest, test_fib6_perf);
+REGISTER_PERF_TEST(fib6_perf_autotest, test_fib6_perf);
app/test/test_fib_perf.c +1 -1
index b56293e64f..a9119c1bb0 100644
@@ -409,4 +409,4 @@ test_fib_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(fib_perf_autotest, test_fib_perf);
+REGISTER_PERF_TEST(fib_perf_autotest, test_fib_perf);
app/test/test_func_reentrancy.c +1 -1
index ae9de6f93d..63b00009b5 100644
@@ -507,4 +507,4 @@ test_func_reentrancy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
+REGISTER_FAST_TEST(func_reentrancy_autotest, False, True, test_func_reentrancy);
app/test/test_hash.c +1 -1
index 3e45afaa67..e160b27b4c 100644
@@ -2264,4 +2264,4 @@ test_hash(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_autotest, test_hash);
+REGISTER_FAST_TEST(hash_autotest, True, True, test_hash);
app/test/test_hash_functions.c +1 -1
index 76d51b6e71..70820d1f19 100644
@@ -290,4 +290,4 @@ test_hash_functions(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
+REGISTER_PERF_TEST(hash_functions_autotest, test_hash_functions);
app/test/test_hash_multiwriter.c +1 -1
index 0c5a8ca186..dd5ca677b9 100644
@@ -287,4 +287,4 @@ test_hash_multiwriter_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
+REGISTER_PERF_TEST(hash_multiwriter_autotest, test_hash_multiwriter_main);
app/test/test_hash_perf.c +1 -1
index 14a1283aba..d66b96e5ce 100644
@@ -757,4 +757,4 @@ test_hash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
+REGISTER_PERF_TEST(hash_perf_autotest, test_hash_perf);
app/test/test_hash_readwrite.c +2 -2
index 6373e62d33..9c33b49878 100644
@@ -760,5 +760,5 @@ test_hash_rw_func_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_func_autotest, test_hash_rw_func_main);
-REGISTER_TEST_COMMAND(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
+REGISTER_FAST_TEST(hash_readwrite_func_autotest, False, True, test_hash_rw_func_main);
+REGISTER_PERF_TEST(hash_readwrite_perf_autotest, test_hash_rw_perf_main);
app/test/test_hash_readwrite_lf_perf.c +1 -1
index cf86046a2f..5d18850e19 100644
@@ -1579,5 +1579,5 @@ test_hash_readwrite_lf_perf_main(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+REGISTER_PERF_TEST(hash_readwrite_lf_perf_autotest,
 	test_hash_readwrite_lf_perf_main);
app/test/test_interrupts.c +1 -1
index b59ab42699..cf6b5a6a8e 100644
@@ -594,4 +594,4 @@ test_interrupt(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
+REGISTER_FAST_TEST(interrupt_autotest, True, True, test_interrupt);
app/test/test_ipfrag.c +1 -1
index 402ce361c1..264825634d 100644
@@ -510,4 +510,4 @@ test_ipfrag(void)
 }
 
 
-REGISTER_TEST_COMMAND(ipfrag_autotest, test_ipfrag);
+REGISTER_FAST_TEST(ipfrag_autotest, False, True, test_ipfrag);
app/test/test_ipsec.c +1 -1
index c2a52ec305..629580bc21 100644
@@ -2532,4 +2532,4 @@ test_ipsec(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_autotest, test_ipsec);
+REGISTER_FAST_TEST(ipsec_autotest, True, True, test_ipsec);
app/test/test_ipsec_perf.c +1 -1
index b221b7fc32..a32a2086e9 100644
@@ -631,4 +631,4 @@ test_libipsec_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(ipsec_perf_autotest, test_libipsec_perf);
+REGISTER_PERF_TEST(ipsec_perf_autotest, test_libipsec_perf);
app/test/test_kvargs.c +1 -1
index b7b97a0dd9..d0f05a55c7 100644
@@ -292,4 +292,4 @@ test_kvargs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
+REGISTER_FAST_TEST(kvargs_autotest, True, True, test_kvargs);
app/test/test_lcores.c +1 -1
index 2c945b0136..b86629c0db 100644
@@ -412,4 +412,4 @@ test_lcores(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(lcores_autotest, test_lcores);
+REGISTER_FAST_TEST(lcores_autotest, True, True, test_lcores);
app/test/test_logs.c +1 -1
index 8da8824bee..38052910e9 100644
@@ -158,4 +158,4 @@ test_logs(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(logs_autotest, test_logs);
+REGISTER_FAST_TEST(logs_autotest, True, True, test_logs);
app/test/test_lpm.c +1 -1
index 37b460af3a..85a75ccec0 100644
@@ -1584,4 +1584,4 @@ test_lpm(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
+REGISTER_FAST_TEST(lpm_autotest, True, True, test_lpm);
app/test/test_lpm6.c +1 -1
index b6b6f8615e..4a9eddf276 100644
@@ -1793,4 +1793,4 @@ test_lpm6(void)
 	return global_status;
 }
 
-REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
+REGISTER_FAST_TEST(lpm6_autotest, True, True, test_lpm6);
app/test/test_lpm6_perf.c +1 -1
index 5b684686a6..8a49f74c84 100644
@@ -161,4 +161,4 @@ test_lpm6_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
+REGISTER_PERF_TEST(lpm6_perf_autotest, test_lpm6_perf);
app/test/test_lpm_perf.c +1 -1
index e72437ba38..15ff396dd0 100644
@@ -760,4 +760,4 @@ test_lpm_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
+REGISTER_PERF_TEST(lpm_perf_autotest, test_lpm_perf);
app/test/test_malloc.c +1 -1
index ff081dd931..6057623473 100644
@@ -1091,4 +1091,4 @@ test_malloc(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
+REGISTER_FAST_TEST(malloc_autotest, False, True, test_malloc);
app/test/test_malloc_perf.c +1 -1
index 9bd1662981..a99bfd8531 100644
@@ -171,4 +171,4 @@ test_malloc_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);
+REGISTER_PERF_TEST(malloc_perf_autotest, test_malloc_perf);
app/test/test_mbuf.c +1 -1
index efac01806b..2eeed268af 100644
@@ -2955,4 +2955,4 @@ test_mbuf(void)
 }
 #undef GOTO_FAIL
 
-REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
+REGISTER_FAST_TEST(mbuf_autotest, False, True, test_mbuf);
app/test/test_mcslock.c +1 -1
index 52e45e7e2a..a3753a4397 100644
@@ -241,4 +241,4 @@ test_mcslock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mcslock_autotest, test_mcslock);
+REGISTER_FAST_TEST(mcslock_autotest, False, True, test_mcslock);
app/test/test_member.c +1 -1
index 4a93f8bff4..e17a8f3190 100644
@@ -996,4 +996,4 @@ test_member(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_autotest, test_member);
+REGISTER_FAST_TEST(member_autotest, True, True, test_member);
app/test/test_member_perf.c +1 -1
index 2f79888fbd..db6b8a18ef 100644
@@ -780,4 +780,4 @@ test_member_perf(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(member_perf_autotest, test_member_perf);
+REGISTER_PERF_TEST(member_perf_autotest, test_member_perf);
app/test/test_memcpy.c +1 -1
index 1ab86f4967..c81efb85c2 100644
@@ -129,4 +129,4 @@ test_memcpy(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
+REGISTER_FAST_TEST(memcpy_autotest, True, True, test_memcpy);
app/test/test_memcpy_perf.c +1 -1
index 3727c160e6..5c05a84619 100644
@@ -348,4 +348,4 @@ test_memcpy_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
+REGISTER_PERF_TEST(memcpy_perf_autotest, test_memcpy_perf);
app/test/test_memory.c +1 -1
index 440e5ef838..13ae9569c2 100644
@@ -110,4 +110,4 @@ test_memory(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memory_autotest, test_memory);
+REGISTER_FAST_TEST(memory_autotest, False, True, test_memory);
app/test/test_mempool.c +1 -1
index 8e493eda47..03047e5b14 100644
@@ -1043,4 +1043,4 @@ test_mempool(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
+REGISTER_FAST_TEST(mempool_autotest, False, True, test_mempool);
app/test/test_mempool_perf.c +1 -1
index ce7c6241ab..96de347f04 100644
@@ -437,4 +437,4 @@ test_mempool_perf(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
+REGISTER_PERF_TEST(mempool_perf_autotest, test_mempool_perf);
app/test/test_memzone.c +1 -1
index f10f4fd9cd..85b5839034 100644
@@ -1163,4 +1163,4 @@ test_memzone(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
+REGISTER_FAST_TEST(memzone_autotest, False, True, test_memzone);
app/test/test_meter.c +1 -1
index 15d5a4839b..3016681bbc 100644
@@ -713,4 +713,4 @@ test_meter(void)
 
 }
 
-REGISTER_TEST_COMMAND(meter_autotest, test_meter);
+REGISTER_FAST_TEST(meter_autotest, True, True, test_meter);
app/test/test_mp_secondary.c +1 -1
index ad47d578f2..502b0235a7 100644
@@ -223,4 +223,4 @@ test_mp_secondary(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
+REGISTER_FAST_TEST(multiprocess_autotest, False, False, test_mp_secondary);
app/test/test_per_lcore.c +1 -1
index 129578d1a3..50011366a7 100644
@@ -105,4 +105,4 @@ test_per_lcore(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
+REGISTER_FAST_TEST(per_lcore_autotest, True, True, test_per_lcore);
app/test/test_pflock.c +1 -1
index 38da6bce27..07e4a68c2c 100644
@@ -193,4 +193,4 @@ test_pflock(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(pflock_autotest, test_pflock);
+REGISTER_FAST_TEST(pflock_autotest, True, True, test_pflock);
app/test/test_pie.c +3 -3
index a3c0f97c9d..5674602b69 100644
@@ -1087,6 +1087,6 @@ test_pie_all(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(pie_autotest, test_pie);
-REGISTER_TEST_COMMAND(pie_perf, test_pie_perf);
-REGISTER_TEST_COMMAND(pie_all, test_pie_all);
+REGISTER_FAST_TEST(pie_autotest, True, True, test_pie);
+REGISTER_PERF_TEST(pie_perf, test_pie_perf);
+REGISTER_PERF_TEST(pie_all, test_pie_all);
app/test/test_pmd_perf.c +1 -1
index 3ef590cb51..f6d97f21c9 100644
@@ -899,4 +899,4 @@ test_set_rxtx_sc(cmdline_fixed_string_t type)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
+REGISTER_PERF_TEST(pmd_perf_autotest, test_pmd_perf);
app/test/test_power.c +1 -1
index b7b5561348..d4f622ff2f 100644
@@ -172,4 +172,4 @@ test_power(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_autotest, test_power);
+REGISTER_FAST_TEST(power_autotest, True, True, test_power);
app/test/test_power_cpufreq.c +1 -1
index 4d013cd7bb..f56053ac10 100644
@@ -703,5 +703,5 @@ test_power_caps(void)
 
 #endif
 
-REGISTER_TEST_COMMAND(power_cpufreq_autotest, test_power_cpufreq);
+REGISTER_FAST_TEST(power_cpufreq_autotest, False, True, test_power_cpufreq);
 REGISTER_TEST_COMMAND(power_caps_autotest, test_power_caps);
app/test/test_power_intel_uncore.c +1 -1
index 31163af84e..c8a8621e44 100644
@@ -298,4 +298,4 @@ test_power_intel_uncore(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_intel_uncore_autotest, test_power_intel_uncore);
+REGISTER_FAST_TEST(power_intel_uncore_autotest, True, True, test_power_intel_uncore);
app/test/test_power_kvm_vm.c +1 -1
index cc66b7a8a0..4919df8b62 100644
@@ -299,4 +299,4 @@ test_power_kvm_vm(void)
 }
 #endif
 
-REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
+REGISTER_FAST_TEST(power_kvm_vm_autotest, False, True, test_power_kvm_vm);
app/test/test_prefetch.c +1 -1
index 7b4a8e4144..a72ae80557 100644
@@ -35,4 +35,4 @@ test_prefetch(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
+REGISTER_FAST_TEST(prefetch_autotest, True, True, test_prefetch);
app/test/test_rand_perf.c +1 -1
index 26fb1d9a58..30204e12c0 100644
@@ -96,4 +96,4 @@ test_rand_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(rand_perf_autotest, test_rand_perf);
+REGISTER_PERF_TEST(rand_perf_autotest, test_rand_perf);
app/test/test_rcu_qsbr.c +1 -1
index 70404e89e6..16c24f58e7 100644
@@ -1418,4 +1418,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_autotest, test_rcu_qsbr_main);
+REGISTER_FAST_TEST(rcu_qsbr_autotest, True, True, test_rcu_qsbr_main);
app/test/test_rcu_qsbr_perf.c +1 -1
index b15e5cef88..ce88a7333c 100644
@@ -690,4 +690,4 @@ test_rcu_qsbr_main(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
+REGISTER_PERF_TEST(rcu_qsbr_perf_autotest, test_rcu_qsbr_main);
app/test/test_reassembly_perf.c +1 -1
index c11b65291f..4b4929d777 100644
@@ -1000,4 +1000,4 @@ test_reassembly_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(reassembly_perf_autotest, test_reassembly_perf);
+REGISTER_PERF_TEST(reassembly_perf_autotest, test_reassembly_perf);
app/test/test_reciprocal_division.c +1 -1
index 8ea9b1d24d..fb52b2d5a1 100644
@@ -164,4 +164,4 @@ test_reciprocal(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division, test_reciprocal);
+REGISTER_PERF_TEST(reciprocal_division, test_reciprocal);
app/test/test_reciprocal_division_perf.c +1 -1
index 4f625873e5..cf96d46a22 100644
@@ -205,4 +205,4 @@ test_reciprocal_division_perf(void)
 	return result;
 }
 
-REGISTER_TEST_COMMAND(reciprocal_division_perf, test_reciprocal_division_perf);
+REGISTER_PERF_TEST(reciprocal_division_perf, test_reciprocal_division_perf);
app/test/test_red.c +2 -2
index 84c292f8d8..aa7538d51a 100644
@@ -1878,5 +1878,5 @@ test_red_all(void)
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
 REGISTER_TEST_COMMAND(red_autotest, test_red);
-REGISTER_TEST_COMMAND(red_perf, test_red_perf);
-REGISTER_TEST_COMMAND(red_all, test_red_all);
+REGISTER_PERF_TEST(red_perf, test_red_perf);
+REGISTER_PERF_TEST(red_all, test_red_all);
app/test/test_reorder.c +1 -1
index c188f6ce67..e66b4b05d4 100644
@@ -548,4 +548,4 @@ test_reorder(void)
 }
 
 
-REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
+REGISTER_FAST_TEST(reorder_autotest, True, True, test_reorder);
app/test/test_rib.c +2 -2
index 65b6856410..a8d60acc3a 100644
@@ -363,5 +363,5 @@ test_slow_rib(void)
 	return unit_test_suite_runner(&rib_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib_autotest, test_rib);
-REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);
+REGISTER_FAST_TEST(rib_autotest, True, True, test_rib);
+REGISTER_PERF_TEST(rib_slow_autotest, test_slow_rib);
app/test/test_rib6.c +2 -2
index 336b779d2e..9bbd0f406d 100644
@@ -367,5 +367,5 @@ test_slow_rib6(void)
 	return unit_test_suite_runner(&rib6_slow_tests);
 }
 
-REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
-REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);
+REGISTER_FAST_TEST(rib6_autotest, True, True, test_rib6);
+REGISTER_PERF_TEST(rib6_slow_autotest, test_slow_rib6);
app/test/test_ring.c +1 -1
index bde33ab4a1..d2accbabfa 100644
@@ -1241,4 +1241,4 @@ test_ring(void)
 	return -1;
 }
 
-REGISTER_TEST_COMMAND(ring_autotest, test_ring);
+REGISTER_FAST_TEST(ring_autotest, True, True, test_ring);
app/test/test_ring_perf.c +1 -1
index 3972fd9db3..d7c5a4c30b 100644
@@ -579,4 +579,4 @@ test_ring_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
+REGISTER_PERF_TEST(ring_perf_autotest, test_ring_perf);
app/test/test_rwlock.c +4 -4
index 4ae0bf8deb..e8086888fe 100644
@@ -506,7 +506,7 @@ try_rwlock_test_rde_wro(void)
 	return process_try_lcore_stats();
 }
 
-REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1);
-REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda);
-REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm);
-REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);
+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);
app/test/test_sched.c +1 -1
index ddec572447..385ca45136 100644
@@ -215,4 +215,4 @@ test_sched(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(sched_autotest, test_sched);
+REGISTER_FAST_TEST(sched_autotest, True, True, test_sched);
app/test/test_security.c +1 -1
index 4783cd0663..a3b962750a 100644
@@ -2314,4 +2314,4 @@ test_security(void)
 	return unit_test_suite_runner(&security_testsuite);
 }
 
-REGISTER_TEST_COMMAND(security_autotest, test_security);
+REGISTER_FAST_TEST(security_autotest, False, True, test_security);
app/test/test_seqlock.c +1 -1
index d26d2c010e..325af38070 100644
@@ -187,4 +187,4 @@ test_seqlock(void)
 	return rc;
 }
 
-REGISTER_TEST_COMMAND(seqlock_autotest, test_seqlock);
+REGISTER_FAST_TEST(seqlock_autotest, True, True, test_seqlock);
app/test/test_service_cores.c +2 -2
index 422d2a83e8..6c000417d2 100644
@@ -1040,7 +1040,7 @@ test_service_common(void)
 	return unit_test_suite_runner(&service_tests);
 }
 
-REGISTER_TEST_COMMAND(service_autotest, test_service_common);
+REGISTER_FAST_TEST(service_autotest, True, True, test_service_common);
 
 static struct unit_test_suite service_perf_tests  = {
 	.suite_name = "service core performance test suite",
@@ -1062,4 +1062,4 @@ test_service_perf(void)
 	return unit_test_suite_runner(&service_perf_tests);
 }
 
-REGISTER_TEST_COMMAND(service_perf_autotest, test_service_perf);
+REGISTER_PERF_TEST(service_perf_autotest, test_service_perf);
app/test/test_spinlock.c +1 -1
index 3f59372300..d655b606f7 100644
@@ -302,4 +302,4 @@ test_spinlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
+REGISTER_FAST_TEST(spinlock_autotest, True, True, test_spinlock);
app/test/test_stack.c +2 -2
index bc38961433..93bba18469 100644
@@ -379,5 +379,5 @@ test_lf_stack(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_autotest, test_stack);
-REGISTER_TEST_COMMAND(stack_lf_autotest, test_lf_stack);
+REGISTER_FAST_TEST(stack_autotest, False, True, test_stack);
+REGISTER_FAST_TEST(stack_lf_autotest, False, True, test_lf_stack);
app/test/test_stack_perf.c +2 -2
index 1eae00a334..c5e1caa036 100644
@@ -354,5 +354,5 @@ test_lf_stack_perf(void)
 #endif
 }
 
-REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
-REGISTER_TEST_COMMAND(stack_lf_perf_autotest, test_lf_stack_perf);
+REGISTER_PERF_TEST(stack_perf_autotest, test_stack_perf);
+REGISTER_PERF_TEST(stack_lf_perf_autotest, test_lf_stack_perf);
app/test/test_string_fns.c +1 -1
index 5e105d2bb9..07e72bf680 100644
@@ -182,4 +182,4 @@ test_string_fns(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
+REGISTER_FAST_TEST(string_autotest, True, True, test_string_fns);
app/test/test_tailq.c +1 -1
index 9520219b0a..5598bcd12d 100644
@@ -125,4 +125,4 @@ test_tailq(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
+REGISTER_FAST_TEST(tailq_autotest, True, True, test_tailq);
app/test/test_thash.c +1 -1
index 53d9611e18..dd6468eb56 100644
@@ -966,4 +966,4 @@ test_thash(void)
 	return unit_test_suite_runner(&thash_tests);
 }
 
-REGISTER_TEST_COMMAND(thash_autotest, test_thash);
+REGISTER_FAST_TEST(thash_autotest, True, True, test_thash);
app/test/test_thash_perf.c +1 -1
index 687582aa32..9dfd5d3c21 100644
@@ -135,4 +135,4 @@ test_thash_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(thash_perf_autotest, test_thash_perf);
+REGISTER_PERF_TEST(thash_perf_autotest, test_thash_perf);
app/test/test_threads.c +1 -1
index a4c4f651a4..6ed6b168d4 100644
@@ -279,4 +279,4 @@ test_threads(void)
 	return unit_test_suite_runner(&threads_test_suite);
 }
 
-REGISTER_TEST_COMMAND(threads_autotest, test_threads);
+REGISTER_FAST_TEST(threads_autotest, True, True, test_threads);
app/test/test_ticketlock.c +1 -1
index 242c136478..25af697c0a 100644
@@ -314,4 +314,4 @@ test_ticketlock(void)
 	return ret;
 }
 
-REGISTER_TEST_COMMAND(ticketlock_autotest, test_ticketlock);
+REGISTER_FAST_TEST(ticketlock_autotest, True, True, test_ticketlock);
app/test/test_timer.c +1 -1
index 0c36dc9010..09608a1845 100644
@@ -594,4 +594,4 @@ test_timer(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_autotest, test_timer);
+REGISTER_FAST_TEST(timer_autotest, False, True, test_timer);
app/test/test_timer_perf.c +1 -1
index 0ede4b3e40..d2d74ebbc6 100644
@@ -131,4 +131,4 @@ test_timer_perf(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
+REGISTER_PERF_TEST(timer_perf_autotest, test_timer_perf);
app/test/test_timer_racecond.c +1 -1
index bb56ae8324..6f8b448ff8 100644
@@ -172,4 +172,4 @@ test_timer_racecond(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
+REGISTER_PERF_TEST(timer_racecond_autotest, test_timer_racecond);
app/test/test_trace.c +1 -1
index ad4a394a29..96829caed5 100644
@@ -250,4 +250,4 @@ test_trace(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(trace_autotest, test_trace);
+REGISTER_FAST_TEST(trace_autotest, True, True, test_trace);
app/test/test_trace_perf.c +1 -1
index 46ae7d8074..a6dd075722 100644
@@ -179,4 +179,4 @@ test_trace_perf(void)
 	return TEST_SUCCESS;
 }
 
-REGISTER_TEST_COMMAND(trace_perf_autotest, test_trace_perf);
+REGISTER_PERF_TEST(trace_perf_autotest, test_trace_perf);
app/test/test_version.c +1 -1
index 1e1ff18656..21016237bc 100644
@@ -25,4 +25,4 @@ test_version(void)
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(version_autotest, test_version);
+REGISTER_FAST_TEST(version_autotest, True, True, test_version);
Signature · 1 line
2.39.2
#43 lore raw

Re: [PATCH v5 02/10] app/test: tag tests with the test type

app/test/test_acl.c test_acl(void) · line 1752

Quoted 10 lines · Bruce Richardson
app/test/test_acl.c +1 -1
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);

A bit surprising to read "True" and not "true" in some C code. I see meson supports both forms.
Do you have a reason to go with "True"?
Maybe you prefer to keep it like this so it is not confused with the C boolean keyword?

Signature · 1 line
David Marchand
#44 lore raw

Re: [PATCH v5 02/10] app/test: tag tests with the test type

Quoted 10 lines · David Marchand
Quoted 8 lines · Bruce Richardson
app/test/test_acl.c +0 -0
index 623f34682e..bf1466fe11 100644
@@ -1749,4 +1749,4 @@ test_acl(void)
 
 #endif /* !RTE_EXEC_ENV_WINDOWS */
 
Quoted 9 lines

app/test/test_acl.c test_acl(void) · line 1752

Quoted 2 lines
app/test/test_acl.c +1 -1
-REGISTER_TEST_COMMAND(acl_autotest, test_acl);
+REGISTER_FAST_TEST(acl_autotest, True, True, test_acl);

A bit surprising to read "True" and not "true" in some C code. I see meson supports both forms.
Do you have a reason to go with "True"?
Maybe you prefer to keep it like this so it is not confused with the C boolean keyword?

This info is pulled out by python script, so I believe it is capitalized so I can process them as boolean values there.
However, looking at the script, it doesn't actually ever convert to boolean right now, so this may be a holdover from earlier versions. When we pass the values to meson, they are all forced to lowercase.

/Bruce

#45 lore raw

PATCH v5 3/10 app/test: make telemetry data test buildable on windows

In reply to Bruce Richardson

To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built.

---
 app/test/test_telemetry_data.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
app/test/test_telemetry_data.c +12 -2
index a960f44c1b..b2dc1d75db 100644
@@ -2,11 +2,20 @@
  * Copyright 2020 Intel Corporation
  */
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include "test.h"
+
+static int
+telemetry_data_autotest(void)
+{
+	return TEST_SKIPPED;
+}
+
+#else
+
 #include <string.h>
 #include <sys/socket.h>
-#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/un.h>
-#endif
 #include <unistd.h>
 #include <limits.h>
 
@@ -604,5 +613,6 @@ telemetry_data_autotest(void)
 	close(sock);
 	return 0;
 }
+#endif /* windows/non-windows */
 
 REGISTER_TEST_COMMAND(telemetry_data_autotest, telemetry_data_autotest);
Signature · 1 line
2.39.2
Acked-by on v5 3/10
#46 lore raw

Re: [PATCH v5 03/10] app/test: make telemetry data test buildable on windows

Quoted 7 lines · Bruce Richardson

To enable the building of the telemetry data tests file when building on windows, we need to provide a stub implementation. That way, the test file is buildable any time the library itself is built.

---

#47 lore raw

PATCH v5 4/10 app/test: build using per-file dependency matrix

In reply to Bruce Richardson

Rather than using if-else constructs to selectively add or remove files from the UT build, switch to a table-based approach where each file lists out what libs or drivers it depends upon.

Initial version of this table was generated via analysis of the header files included in each C file. The basic dependencies of the test binary [cmdline, ring, mempool and mbuf] were then removed from the per-file lists, as there is no point in checking them as the whole app will be disabled if they are not present.

With the file list, the dependencies for the "utility" C-files are kept separate, so that other tests which depend on the functions provided by those files can have that dependency recorded properly. The basic cryptodev tests also fall into this category as functions from the main cryptodev test file are used by other crypto tests.

As well as the main table for internal dependencies, some test files have separate external components too. A second, much smaller table lists these dependencies.

---
 app/meson.build      |   8 +-
 app/test/meson.build | 823 ++++++++++++-------------------------------
 2 files changed, 238 insertions(+), 593 deletions(-)
app/meson.build +5 -3
index 4fc1a83eba..0d8b618e7f 100644
@@ -32,6 +32,11 @@ apps = [
         'test-security-perf',
 ]
 
+if get_option('tests')
+# build the auto test app if enabled.
+    apps += 'test'
+endif
+
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -106,6 +111,3 @@ foreach app:apps
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
 endforeach
-
-# special case the autotests
-subdir('test')
app/test/meson.build +233 -590

833 lines not on this page · raw message

Signature · 1 line
2.39.2
#48 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Adam from our team just raised something important about this patch and UNH CI which I missed during the RFC discussion.
Presently, eal_flags_file_prefix_autotest fails on arm tx2 systems (arm people are aware of this, they think it might be a memory leak from mlx5 driver), so at their request we are disabling this unit test (on arm only) for them for the time being. This failure was discovered when we were initially standing up arm unit testing on tx2 servers earlier this year - previously there was no coverage for this. We do this filtering by going through the /app/test/meson.build file and resetting
the eal_flags_file_prefix_autotest line to an empty string. This process is broken by your patch series. Again, I'm sorry I didn't catch this concern when discussing it during the RFC. This is why you are not getting unit test results for arm64, we can't run unit tests given the changes in this patch.

Your refactor likely means that going forward, we will no longer be able to tailor the fast test suite (or any suite) per vendor request. That might actually be a good thing. In any case, if this is merged now, it is going to put the tree in a state where our CI doesn't run any unit testing on ARM. I don't know how close this patch series is to possibly hitting mainline, but, if possible, can that be delayed, pending us figuring out how we will respond to this situation?

#49 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 6 lines · Patrick Robb

Adam from our team just raised something important about this patch and UNH CI which I missed during the RFC discussion.
Presently, eal_flags_file_prefix_autotest fails on arm tx2 systems (arm people are aware of this, they think it might be a memory leak from mlx5 driver), so at their request we are disabling this unit test (on arm only) for them for the time being. This failure was discovered when

Quoted 8 lines

we were initially standing up arm unit testing on tx2 servers earlier this year - previously there was no coverage for this. We do this filtering by going through the /app/test/meson.build file and resetting the eal_flags_file_prefix_autotest line to an empty string. This process is broken by your patch series. Again, I'm sorry I didn't catch this concern when discussing it during the RFC. This is why you are not getting unit test results for arm64, we can't run unit tests given the changes in this patch.

If this is a (semi)permanent issue, would it not be better to actually patch in the disabling of this test into the test sources, i.e. if ARM64 have the test return TEST_SKIPPED?

Quoted 7 lines

Your refactor likely means that going forward, we will no longer be able to tailor the fast test suite (or any suite) per vendor request. That might actually be a good thing. In any case, if this is merged now, it is going to put the tree in a state where our CI doesn't run any unit testing on ARM. I don't know how close this patch series is to possibly hitting mainline, but, if possible, can that be delayed, pending us figuring out how we will respond to this situation?

There is at least one more issue I am aware of with this set - the failing mempool tests - which needs to be fixed, so there will be at least one more version.

If this is likely a common occurrance where we need to disable one particular test for a particular platform, would it be worth designing such a feature into the rework. For example, it should be fairly easy to have the testname-extraction script read a blocklist from the environment, and omit informing meson of those test cases. Would that work?

/Bruce

#50 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

In reply to Patrick Robb
Quoted 6 lines · Patrick Robb

Adam from our team just raised something important about this patch and UNH CI which I missed during the RFC discussion.
Presently, eal_flags_file_prefix_autotest fails on arm tx2 systems (arm people are aware of this, they think it might be a memory leak from mlx5 driver), so at their request we are disabling this unit test (on arm only) for them for the time being.

Does the test suite pass if the mlx5 driver is disabled in the build? That could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly including support for disabling specific tests, as I suggested in my other email).

/Bruce

PS: Are there any other workarounds inside the test/DTS/CI systems that involve patching sources? If so, it would be good to get a list that we can work through removing by putting place proper fixes or workarounds, as changing sources for testing like this blocks future patch acceptance.

#51 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Patrick, Bruce,

Quoted 6 lines · Bruce Richardson
Quoted 4 lines · Patrick Robb

Adam from our team just raised something important about this patch and UNH CI which I missed during the RFC discussion.
Presently, eal_flags_file_prefix_autotest fails on arm tx2 systems (arm people are aware of this, they think it might be a memory leak from

That's sad to read.

Quoted 2 lines
Quoted 2 lines

mlx5 driver), so at their request we are disabling this unit test (on arm only) for them for the time being.

If it was reported, I either missed it or forgot about it, sorry. Can you (re)share the context?

There was a couple of mem leak fixes for mlx5 in v23.07. It may be worth running this test again and providing fresh traces.

Quoted 5 lines

Does the test suite pass if the mlx5 driver is disabled in the build? That could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly including support for disabling specific tests, as I suggested in my other email).

Or disabling the driver as Bruce proposes.

Quoted 7 lines

/Bruce

PS: Are there any other workarounds inside the test/DTS/CI systems that involve patching sources? If so, it would be good to get a list that we can work through removing by putting place proper fixes or workarounds, as changing sources for testing like this blocks future patch acceptance.

Patching sources from the test tool is a poor solution.
In general, developers won't be aware of source patching and will waste time trying to understand why they can't reproduce what the CI reports (it happened to me with DTS on the interrupt stuff with vhost, at least).

For this specific case of skipping a test, if nobody can fix the issue, I prefer if the CI can skip some "known broken in my lab" tests via some meson configuration.
And, such configuration should be easy to catch in the test report.

Signature · 1 line
David Marchand
#52 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 7 lines · David Marchand

Patrick, Bruce,

If it was reported, I either missed it or forgot about it, sorry. Can you (re)share the context?

Quoted 1 line
Quoted 9 lines
Quoted 1 line

Does the test suite pass if the mlx5 driver is disabled in the build?

That

Quoted 2 lines

could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly

including

Quoted 1 line

support for disabling specific tests, as I suggested in my other email).

Or disabling the driver as Bruce proposes.

Okay, we ran the test with the mlx5 driver disabled, and it still fails.
So, this might be more of an ARM architecture issue. Ruifeng, are you still seeing this on your test bed?

@David you didn't miss anything, we had a unicast with ARM when setting up the new arm container runners for unit testing a few months back. Ruifeng also noticed the same issue and speculated about mlx5 memory leaks. He raised the possibility of disabling the mlx5 driver too, but that option isn't great since we want to have a uniform build process (as much as possible) for our unit testing. Anyways, now we know that that isn't relevant. I'll forward the thread to you in any case - let me know if you have any ideas.

Quoted 17 lines
Quoted 6 lines

/Bruce

PS: Are there any other workarounds inside the test/DTS/CI systems that involve patching sources? If so, it would be good to get a list that we

can

Quoted 2 lines

work through removing by putting place proper fixes or workarounds, as changing sources for testing like this blocks future patch acceptance.

Patching sources from the test tool is a poor solution.
In general, developers won't be aware of source patching and will waste time trying to understand why they can't reproduce what the CI reports (it happened to me with DTS on the interrupt stuff with vhost, at least).

Quoted 6 lines

For this specific case of skipping a test, if nobody can fix the issue, I prefer if the CI can skip some "known broken in my lab" tests via some meson configuration.
And, such configuration should be easy to catch in the test report.

I strongly agree on all points, which is why I said it was probably a good

thing anyhow for us to lose this ability. In the case of the disabled fast-test for arm, that was a new discovery coming from adding new environments, not a regression introduced by a patch, and I don't think it made sense then to block the introduction of the entire unit test coverage for arm while they looked into this issue. If it's possible to introduce meson configure functionality to disable specific tests, that does give us more flexibility. And it's obviously a better process than us doing it at the CI end.

We don't currently patch source in any other way in our CI testing.

#53 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 14 lines · Patrick Robb
Quoted 13 lines · David Marchand

Patrick, Bruce,

If it was reported, I either missed it or forgot about it, sorry. Can you (re)share the context?

Quoted 5 lines

Does the test suite pass if the mlx5 driver is disabled in the build? That could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly including support for disabling specific tests, as I suggested in my other email).

Quoted 5 lines
Quoted 1 line

Or disabling the driver as Bruce proposes.

Okay, we ran the test with the mlx5 driver disabled, and it still fails. So, this might be more of an ARM architecture issue. Ruifeng, are you still seeing this on your test bed?

@David you didn't miss anything, we had a unicast with ARM when setting up the new arm container runners for unit testing a few months back. Ruifeng also noticed the same issue and speculated about mlx5 memory leaks. He raised the possibility of disabling the mlx5 driver too, but that option isn't great since we want to have a uniform build process (as much as possible) for our unit testing. Anyways, now we know that that isn't relevant. I'll forward the thread to you in any case - let me know if you have any ideas.

The mention of "memtest1" in the mails rings a bell.
I will need more detailed logs, or ideally an env where it is reproduced.

One thing bothers me.. why are we not seeing this failure with ARM for Bruce v6 series?
Just looking at patchwork, I would think that I can merge Bruce series as is.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

Signature · 1 line
David Marchand
#54 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 34 lines · David Marchand
Quoted 1 line · Patrick Robb

On Wed, Aug 16, 2023 at 10:40 AM David Marchand <

Quoted 9 lines · [email protected]> wrote:
Quoted 9 lines

Patrick, Bruce,

If it was reported, I either missed it or forgot about it, sorry. Can you (re)share the context?

Quoted 2 lines

Does the test suite pass if the mlx5 driver is disabled in the build?

That

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly

including

Quoted 1 line
Quoted 1 line
Quoted 1 line

support for disabling specific tests, as I suggested in my other

email).

Quoted 4 lines
Quoted 2 lines

Or disabling the driver as Bruce proposes.

Okay, we ran the test with the mlx5 driver disabled, and it still

fails. So, this might be more of an ARM architecture issue. Ruifeng, are you still seeing this on your test bed?

Quoted 2 lines

@David you didn't miss anything, we had a unicast with ARM when setting

up the new arm container runners for unit testing a few months back. Ruifeng also noticed the same issue and speculated about mlx5 memory leaks. He raised the possibility of disabling the mlx5 driver too, but that option isn't great since we want to have a uniform build process (as much as possible) for our unit testing. Anyways, now we know that that isn't relevant. I'll forward the thread to you in any case - let me know if you have any ideas.

Quoted 4 lines

The mention of "memtest1" in the mails rings a bell.
I will need more detailed logs, or ideally an env where it is reproduced.

meson-logs/ for the unit tests run with eal_flags_file_prefix_autotest

included shared with you via slack. I also shared the meson test summary, but of course it's the detailed testlog.txt you care about.

Quoted 9 lines

One thing bothers me.. why are we not seeing this failure with ARM for Bruce v6 series?
Just looking at patchwork, I would think that I can merge Bruce series as is.

https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

So, this is a niche edge case, but because we fail to apply the fast-test

filtering script in our jenkinsfile script, we exit without doing any unit testing and don't save or report any results. Almost always if we fail doing "unh jenkins scipt" stuff, it's an infra failure, not a problem with a patch, and we don't want to report a false positive failure result there. It does further exemplify the danger in our current process, of course. I'll be glad to not have to do this anymore. I did try to make this point above, but I don't think I explained it too well.

The only other thing I'll add is that we are going to change our reporting process soon, to begin our pipeline run on a test/environment combo by reporting a "pending" result on that test/environent. Then we will overwrite it with a PASS or FAIL at the end. This helps protect us from situations like this. For instance, the way this would have played out is your would have had a label (iol-unit-arm64-testing) which would have had the initial "PENDING" result reported to it, but it never would have been updated from pending. So, you would know the CI results were incomplete.

#55 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

In reply to David Marchand
Quoted 16 lines · David Marchand
Quoted 14 lines · Patrick Robb
Quoted 13 lines · David Marchand

Patrick, Bruce,

If it was reported, I either missed it or forgot about it, sorry. Can you (re)share the context?

Quoted 5 lines

Does the test suite pass if the mlx5 driver is disabled in the build? That could confirm or refute the suspicion of where the issue is, and also provide a temporary workaround while this set is merged (possibly including support for disabling specific tests, as I suggested in my other email).

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Or disabling the driver as Bruce proposes.

Okay, we ran the test with the mlx5 driver disabled, and it still fails. So, this might be more of an ARM architecture issue. Ruifeng, are you still seeing this on your test bed?

@David you didn't miss anything, we had a unicast with ARM when setting up the new arm container runners for unit testing a few months back. Ruifeng also noticed the same issue and speculated about mlx5 memory leaks. He raised the possibility of disabling the mlx5 driver too, but that option isn't great since we want to have a uniform build process (as much as possible) for our unit testing. Anyways, now we know that that isn't relevant. I'll forward the thread to you in any case - let me know if you have any ideas.

The mention of "memtest1" in the mails rings a bell.
I will need more detailed logs, or ideally an env where it is reproduced.

It is a "recurring" yet not so well known issue.
This unit test fails if any part of the DPDK did not release all (hugepage backed) memory and associated hugepages before exiting.

In your case here, there is a virtio-net device that the container tries to get its hands on because DPDK scans and probes all available resources by default (and fails to, in this case, but that's not important).
Triggering this virtio-net probing makes ethdev allocate its shared memzone for port data, but nothing in ethdev releases the memzone when exiting.
Fixing this could be tricky... as the current ethdev code is really vague around which locks protect what (if anything..).

I think we hit this issue in the past, and avoided it by running the tests with dynamically linked DPDK binaries (and by doing this, avoid the net drivers get loaded).

I can see that you are running the unit tests with a static binary in the report you sent.
I think the default is shared mode, so I wonder what could be the reason why UNH builds with static here.
In any case, could you have a try and switch to -Ddefault_library=shared (or remove forcing to static mode)?

Signature · 1 line
David Marchand
#56 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 18 lines · David Marchand

It is a "recurring" yet not so well known issue.
This unit test fails if any part of the DPDK did not release all (hugepage backed) memory and associated hugepages before exiting.

In your case here, there is a virtio-net device that the container tries to get its hands on because DPDK scans and probes all available resources by default (and fails to, in this case, but that's not important).
Triggering this virtio-net probing makes ethdev allocate its shared memzone for port data, but nothing in ethdev releases the memzone when exiting.
Fixing this could be tricky... as the current ethdev code is really vague around which locks protect what (if anything..).

I think we hit this issue in the past, and avoided it by running the tests with dynamically linked DPDK binaries (and by doing this, avoid the net drivers get loaded).

Quoted 8 lines

I can see that you are running the unit tests with a static binary in the report you sent.
I think the default is shared mode, so I wonder what could be the reason why UNH builds with static here.
In any case, could you have a try and switch to -Ddefault_library=shared (or remove forcing to static mode)?

Thanks for helping debug this David.

I think the default library actually is static, but let me know if I
misunderstand: https://git.dpdk.org/dpdk/tree/meson.build. If you meson configure on the output of 'meson setup build' it says static is the default.

```
        default_options: [
            'buildtype=release',
            'c_std=c11',
            'default_library=static',
            'warning_level=2',
        ],
```

I tried a build forcing default_library=shared, and all fast-tests unit tests failed. I can look further into this if you think shared mode might be the best way forward though. But I am assuming for now if static is indeed the default, that is the way we should build for testing.

For your patch, it looks like there are actually more eal flags test
failures: http://mails.dpdk.org/archives/test-report/2023-August/444170.html.
In any case, for debugging purposes, I will do a run with
the eal_flags_file_prefix_autotest also included and send you the meson test detail log on slack.

#57 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 9 lines · Patrick Robb

For your patch, it looks like there are actually more eal flags test failures:
http://mails.dpdk.org/archives/test-report/2023-August/444170.html. In any case, for debugging purposes, I will do a run with
the eal_flags_file_prefix_autotest also included and send you the meson test detail log on slack.

Quick follow up - I see with your patch it does pass on

eal_flags_file_prefix_autotest, but as stated fails some others now. The detailed slack logs are DM'ed to you on slack. Thanks!

#58 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 6 lines · Patrick Robb
Quoted 4 lines · Patrick Robb

For your patch, it looks like there are actually more eal flags test failures: http://mails.dpdk.org/archives/test-report/2023-August/444170.html. In any case, for debugging purposes, I will do a run with the eal_flags_file_prefix_autotest also included and send you the meson test detail log on slack.

Quick follow up - I see with your patch it does pass on eal_flags_file_prefix_autotest, but as stated fails some others now. The detailed slack logs are DM'ed to you on slack. Thanks!

Thanks for the report.
Interestingly those failures pointed out that I broke secondary processes when no port gets initialised in the primary process.

I'll send a v3.

Signature · 1 line
David Marchand
#59 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Hi David,

Responding to your Slack request about merging Bruce's patch ahead of yours here so there is more visibility.

That is fine, but as you point out it will mean a temporary loss of test coverage, as it will disable arm unit testing until either 1. your patch fixing the flags test hits mainline and we can re-enable testing without failing everyone's patchseries or 2. Bruce's RFC ([RFC PATCH] app/test: add support for skipping tests) is implemented and made a part of mainline. I agree with you this is the best thing to do so as to not hold up Bruce and his series.

Quoted 26 lines · David Marchand
Quoted 4 lines · Patrick Robb
Quoted 3 lines · Patrick Robb

For your patch, it looks like there are actually more eal flags test

failures:
http://mails.dpdk.org/archives/test-report/2023-August/444170.html. In any case, for debugging purposes, I will do a run with the eal_flags_file_prefix_autotest also included and send you the meson test detail log on slack.

Quoted 2 lines
Quoted 1 line

Quick follow up - I see with your patch it does pass on

eal_flags_file_prefix_autotest, but as stated fails some others now. The detailed slack logs are DM'ed to you on slack. Thanks!

Thanks for the report.
Interestingly those failures pointed out that I broke secondary processes when no port gets initialised in the primary process.

I'll send a v3.

--
David Marchand

Signature · 9 lines
Patrick Robb

Technical Service Manager

UNH InterOperability Laboratory

21 Madbury Rd, Suite 100, Durham, NH 03824

www.iol.unh.edu
#60 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

In reply to Patrick Robb
Quoted 6 lines · Patrick Robb
Quoted 6 lines

Patching sources from the test tool is a poor solution.
In general, developers won't be aware of source patching and will waste time trying to understand why they can't reproduce what the CI reports (it happened to me with DTS on the interrupt stuff with vhost, at least).

Quoted 8 lines
Quoted 5 lines

For this specific case of skipping a test, if nobody can fix the issue, I prefer if the CI can skip some "known broken in my lab" tests via some meson configuration.
And, such configuration should be easy to catch in the test report.

I strongly agree on all points, which is why I said it was probably a good thing anyhow for us to lose this ability. In the case of the disabled fast-test for arm, that was a new discovery coming from adding new environments, not a regression introduced by a patch, and I don't think it made sense then to block the introduction of the entire unit test coverage for arm while they looked into this issue. If it's possible to introduce meson configure functionality to disable specific tests, that does give us more flexibility. And it's obviously a better process than us doing it at the CI end.

We don't currently patch source in any other way in our CI testing.

It is possible to list tests from meson.
Why not simply list the existing tests and filter the non working one?

$ meson test -C <build_dir> --suite fast-tests --list
$ meson test -C <build_dir> <explicit list> --test-args ...

That requires no change in DPDK.

Signature · 1 line
David Marchand
#61 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

Quoted 16 lines · David Marchand
Quoted 6 lines · Patrick Robb
Quoted 6 lines

Patching sources from the test tool is a poor solution.
In general, developers won't be aware of source patching and will waste time trying to understand why they can't reproduce what the CI reports (it happened to me with DTS on the interrupt stuff with vhost, at least).

Quoted 8 lines
Quoted 5 lines

For this specific case of skipping a test, if nobody can fix the issue, I prefer if the CI can skip some "known broken in my lab" tests via some meson configuration.
And, such configuration should be easy to catch in the test report.

I strongly agree on all points, which is why I said it was probably a good thing anyhow for us to lose this ability. In the case of the disabled fast-test for arm, that was a new discovery coming from adding new environments, not a regression introduced by a patch, and I don't think it made sense then to block the introduction of the entire unit test coverage for arm while they looked into this issue. If it's possible to introduce meson configure functionality to disable specific tests, that does give us more flexibility. And it's obviously a better process than us doing it at the CI end.

We don't currently patch source in any other way in our CI testing.

Quoted 8 lines

It is possible to list tests from meson.
Why not simply list the existing tests and filter the non working one?

$ meson test -C <build_dir> --suite fast-tests --list
$ meson test -C <build_dir> <explicit list> --test-args ...

That requires no change in DPDK.

The small issue with that is that the broken test is hidden from reports. While it unblocks things here without having to change DPDK, I wonder if changing DPDK to support this scenario might be worthwhile. For example, one idea I'm now thinking of is to have the test binary itself look in the environment for a DPDK_TEST_SKIPPED variable, and - when processing test names passed on command-line or environment - report any on that list as SKIPPED. This at least flags in the reports that a test is not running, and the test log gives a reason.

Worth doing? Or is adding a new environment with broken tests rare enough we don't need this?

Of course, this also seems like a feature request for meson. When running all tests, meson allows you to skip a test suite, but doesn't allow skipping a test within a suite.

/Bruce

#62 lore raw

Re: [PATCH v5 04/10] app/test: build using per-file dependency matrix

In reply to David Marchand
Quoted 10 lines · David Marchand

It is possible to list tests from meson.
Why not simply list the existing tests and filter the non working one?

$ meson test -C <build_dir> --suite fast-tests --list
$ meson test -C <build_dir> <explicit list> --test-args ...

That requires no change in DPDK.

Thanks. I am seeing now that this is possible. So, we could easily solve

this problem using this approach. Thank you David.

At the same time, I do like Bruce's new RFC patch for excluding tests with env variables. It is a bit cleaner on the testing experience side (I don't have to list 100 tests in the command) and it makes clear in the logs what is being skipped which typically would be run. Making that info visible could be valuable in some cases.

Ultimately, we can proceed on the Community Lab side either way. I guess the maintainers must decide whether adding in the extra complexity to the test app is justified in this case.

Also, Bruce, I do see that the symlink you used is working for the case where we have to (for now) directly use the dpdk-test app. I'm sorry I didn't have that info on hand this morning during the ci meeting.

#63 lore raw

PATCH v5 5/10 app/test: define unit tests suites based on test macros

In reply to Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 74 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 +++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +74 -0

74 lines not on this page · raw message

buildtools/get-test-suites.py new file +33 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py
buildtools/meson.build +2 -0
index e1c600e40f..ac5e4dcf08 100644
@@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
Signature · 1 line
2.39.2
#64 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 97 lines · Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 74 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 +++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +44 -0
new file mode 100644
index 0000000000..ec74d8adf2
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+# some perf tests (eg: memcpy perf autotest)take very long
+# to complete, so timeout to 10 minutes
+timeout_seconds = 600
+timeout_seconds_fast = 10
+
+test_no_huge_args = ['--no-huge', '-m', '2048']
+has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
+message('hugepage availability: @0@'.format(has_hugepage))
+
+# process source files to determine the different unit test suites
+# - fast_tests
+# - perf_tests
+# - driver_tests
+test_suites = run_command(get_test_suites_cmd, autotest_sources,
+         check: true).stdout().strip().split()
+foreach suite:test_suites
+    # simple cases - tests without parameters or special handling
+    suite = suite.split('=')
+    suite_name = suite[0]
+    suite_tests = suite[1].split(',')
+    if suite_name != 'fast-tests'
+        # simple cases - tests without parameters or special handling
+        foreach t: suite_tests
+            test(t, dpdk_test,
+                    env: ['DPDK_TEST=' + t],
+                    timeout: timeout_seconds,
+                    is_parallel: false,
+                    suite: suite_name)
+        endforeach
+    else
+    # special fast-test handling here
+        foreach t: suite_tests
+            params = t.split(':')
+            test_name = params[0]
+            nohuge = params[1] == 'true'
+            asan = params[2] == 'true'
+
+            test_args = []
+            if nohuge
+                test_args += test_no_huge_args
+            elif not has_hugepage

app/test/suites/meson.build line 54

Quoted 10 lines
app/test/suites/meson.build new file +10 -0
+                continue  #skip this tests
+            endif
+            if not asan and (get_option('b_sanitize') == 'address'
+                    or get_option('b_sanitize') == 'address,undefined')
+                continue  # skip this test
+            endif
+
+            if get_option('default_library') == 'shared'
+                test_args += ['-d', dpdk_drivers_build_dir]
+            endif

These lines here seem to be exposing a bug in the mempool unit tests for shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then call the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of mempool ops for the new mempool, leaving the ops field at 0. This means that unless the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the driver is unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

In v6 of this set, I intend to fix this, by changing the create empty API to explicitly set the ring driver as default for new mempools. It's the most likely to work for common cases.

/Bruce

#65 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 11 lines · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests for shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then call the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of mempool ops for the new mempool, leaving the ops field at 0. This means that unless the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the driver is unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Quoted 4 lines

In v6 of this set, I intend to fix this, by changing the create empty API to explicitly set the ring driver as default for new mempools. It's the most likely to work for common cases.

Signature · 1 line
David Marchand
#66 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 15 lines · David Marchand
Quoted 11 lines · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests for shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then call the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of mempool ops for the new mempool, leaving the ops field at 0. This means that unless the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the driver is unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Quoted 5 lines

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Ok, re-reading your last comment, I agree it looks like an issue in the unit test itself.
Copying Olivier.

Signature · 1 line
David Marchand
#67 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 23 lines · David Marchand
Quoted 15 lines · David Marchand
Quoted 11 lines · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests for shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then call the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of mempool ops for the new mempool, leaving the ops field at 0. This means that unless the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the driver is unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Quoted 5 lines

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Quoted 4 lines

Ok, re-reading your last comment, I agree it looks like an issue in the unit test itself.
Copying Olivier.

No, I think it's not a bug in the test, but rather in the mempool. Unfortunately, I think the concept of the "default" driver for mempools seems to exist only when using the mbuf library to create mempools. Even then, the default mempool is different from what the first entry in the list is. That's the fundamental issue here, we are using the zero-eth entry in the ops list, rather than a default one.

/Bruce

#68 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Hi,

Quoted 28 lines · Bruce Richardson
Quoted 23 lines · David Marchand
Quoted 15 lines · David Marchand
Quoted 11 lines · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests for shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then call the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of mempool ops for the new mempool, leaving the ops field at 0. This means that unless the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the driver is unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Quoted 5 lines

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Quoted 4 lines

Ok, re-reading your last comment, I agree it looks like an issue in the unit test itself.
Copying Olivier.

Quoted 6 lines

No, I think it's not a bug in the test, but rather in the mempool. Unfortunately, I think the concept of the "default" driver for mempools seems to exist only when using the mbuf library to create mempools. Even then, the default mempool is different from what the first entry in the list is. That's the fundamental issue here, we are using the zero-eth entry in the ops list, rather than a default one.

Yes, Bruce is right.

As discussed off-list with David, moving rte_mempool_set_ops_byname() from rte_mempool_create() to rte_mempool_create_empty() would ensure that the ring driver is the default (and taking flags into account).

#69 lore raw

RE: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 46 lines

From: Olivier Matz [mailto:[email protected]]
Sent: Wednesday, 16 August 2023 15.17

Hi,

Quoted 7 lines · Bruce Richardson
Quoted 6 lines · David Marchand
Quoted 4 lines · David Marchand
Quoted 1 line · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests

for

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then

call

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of

mempool

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

ops for the new mempool, leaving the ops field at 0. This means that

unless

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the

driver is

Quoted 13 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Quoted 4 lines

Ok, re-reading your last comment, I agree it looks like an issue in the unit test itself.
Copying Olivier.

Quoted 6 lines

No, I think it's not a bug in the test, but rather in the mempool. Unfortunately, I think the concept of the "default" driver for mempools seems to exist only when using the mbuf library to create mempools. Even then, the default mempool is different from what the first entry in the list is. That's the fundamental issue here, we are using the zero-eth entry in the ops list, rather than a default one.

Quoted 5 lines

Yes, Bruce is right.

As discussed off-list with David, moving rte_mempool_set_ops_byname() from rte_mempool_create() to rte_mempool_create_empty() would ensure that the ring driver is the default (and taking flags into account).

I took a look at the mempool library source code, and reached the same conclusion.

Your suggested fix is also supported by the documentation of the "flags" parameter to rte_mempool_create_empty(), which - by referring to the "flags" parameter to rte_mempool_create() - says that the mempool ops will be set depending on the RTE_MEMPOOL_F_[S|M][P_PUT|C_GET] flags.

It should probably be flagged as a bug and backported to stable releases.

#70 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 52 lines · Morten Brørup
Quoted 46 lines

From: Olivier Matz [mailto:[email protected]]
Sent: Wednesday, 16 August 2023 15.17

Hi,

Quoted 7 lines · Bruce Richardson
Quoted 6 lines · David Marchand
Quoted 4 lines · David Marchand
Quoted 1 line · Bruce Richardson

These lines here seem to be exposing a bug in the mempool unit tests

for

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

shared builds, which is why we have a CI failure.

The mempool unit tests use the mempool "create_empty" API, and then

call

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the populate APIs to finish setting up the mempool. However, the create_empty API does not explicitly configure a particular set of

mempool

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

ops for the new mempool, leaving the ops field at 0. This means that

unless

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the app explicitly sets other ops, the mempool will use the ops from whatever driver registers itself first. This occurs even when the

driver is

Quoted 13 lines
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines

unsuitable, e.g. on my Intel system, the dpaa2 is first on the list, leading to failures in setting up and using the mempool.

Hum, it sounds like a bug to me.
The dpaa2 driver should not be registered as the default (or here, default platform) mempool.
Other mempool drivers ensure that required hw is available, I guess dpaa2 is missing some check.

Quoted 4 lines

Ok, re-reading your last comment, I agree it looks like an issue in the unit test itself.
Copying Olivier.

Quoted 6 lines

No, I think it's not a bug in the test, but rather in the mempool. Unfortunately, I think the concept of the "default" driver for mempools seems to exist only when using the mbuf library to create mempools. Even then, the default mempool is different from what the first entry in the list is. That's the fundamental issue here, we are using the zero-eth entry in the ops list, rather than a default one.

Quoted 5 lines

Yes, Bruce is right.

As discussed off-list with David, moving rte_mempool_set_ops_byname() from rte_mempool_create() to rte_mempool_create_empty() would ensure that the ring driver is the default (and taking flags into account).

Quoted 6 lines

I took a look at the mempool library source code, and reached the same conclusion.

Your suggested fix is also supported by the documentation of the "flags" parameter to rte_mempool_create_empty(), which - by referring to the "flags" parameter to rte_mempool_create() - says that the mempool ops will be set depending on the RTE_MEMPOOL_F_[S|M][P_PUT|C_GET] flags.

It should probably be flagged as a bug and backported to stable releases.

Yep. David has kindly done up a patch to fix this, and I'm rolling it into the v6 of this set.

/Bruce

#71 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

In reply to Bruce Richardson
Quoted 54 lines · Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 74 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 +++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +0 -0
new file mode 100644
index 0000000000..ec74d8adf2

app/test/suites/meson.build line 4

Quoted 4 lines
app/test/suites/meson.build new file +4 -0
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+# some perf tests (eg: memcpy perf autotest)take very long

s/)take/) take/

Quoted 20 lines
app/test/suites/meson.build new file +20 -0
+# to complete, so timeout to 10 minutes
+timeout_seconds = 600
+timeout_seconds_fast = 10
+
+test_no_huge_args = ['--no-huge', '-m', '2048']
+has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
+message('hugepage availability: @0@'.format(has_hugepage))
+
+# process source files to determine the different unit test suites
+# - fast_tests
+# - perf_tests
+# - driver_tests
+test_suites = run_command(get_test_suites_cmd, autotest_sources,
+         check: true).stdout().strip().split()
+foreach suite:test_suites
+    # simple cases - tests without parameters or special handling
+    suite = suite.split('=')
+    suite_name = suite[0]
+    suite_tests = suite[1].split(',')
+    if suite_name != 'fast-tests'

app/test/suites/meson.build line 34

Quoted 10 lines
app/test/suites/meson.build new file +10 -0
+        # simple cases - tests without parameters or special handling
+        foreach t: suite_tests
+            test(t, dpdk_test,
+                    env: ['DPDK_TEST=' + t],
+                    timeout: timeout_seconds,
+                    is_parallel: false,
+                    suite: suite_name)
+        endforeach
+    else
+    # special fast-test handling here

Indentation of this comment is off.

buildtools/has-hugepages.py

Quoted 83 lines
app/test/suites/meson.build new file +40 -0
+        foreach t: suite_tests
+            params = t.split(':')
+            test_name = params[0]
+            nohuge = params[1] == 'true'
+            asan = params[2] == 'true'
+
+            test_args = []
+            if nohuge
+                test_args += test_no_huge_args
+            elif not has_hugepage
+                continue  #skip this tests
+            endif
+            if not asan and (get_option('b_sanitize') == 'address'
+                    or get_option('b_sanitize') == 'address,undefined')
+                continue  # skip this test
+            endif
+
+            if get_option('default_library') == 'shared'
+                test_args += ['-d', dpdk_drivers_build_dir]
+            endif
+
+            test(test_name, dpdk_test,
+                args : test_args,
+                env: ['DPDK_TEST=' + test_name],
+                timeout : timeout_seconds_fast,
+                is_parallel : false,
+                suite : 'fast-tests')
+            if not is_windows and test_name == 'trace_autotest'
+                test_args += ['--trace=.*']
+                test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]
+                test(test_name + '_with_traces', dpdk_test,
+                    args : test_args,
+                    env: ['DPDK_TEST=' + test_name],
+                    timeout : timeout_seconds_fast,
+                    is_parallel : false,
+                    suite : 'fast-tests')
+            endif
+        endforeach
+    endif
+endforeach
buildtools/get-test-suites.py new file +33 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py

app/test/has_hugepage.py is still referenced in MAINTAINERS.
And new files (in this patch, and later patches) are not affiliated to someone.

Quoted 16 lines
buildtools/meson.build +2 -1
index e1c600e40f..ac5e4dcf08 100644
@@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 get_cpu_count_cmd = py3 + files('get-cpu-count.py')
 get_numa_count_cmd = py3 + files('get-numa-count.py')
+get_test_suites_cmd = py3 + files('get-test-suites.py')
+has_hugepages_cmd = py3 + files('has-hugepages.py')
 binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
                         [objdump] + cc.cmd_array())
 
--

2.39.2

Signature · 1 line
David Marchand
#72 lore raw

Re: [PATCH v5 05/10] app/test: define unit tests suites based on test macros

Quoted 54 lines · David Marchand
Quoted 52 lines · Bruce Richardson

Rather than having the test suites listed out in the meson.build files and having to have them enabled/disabled selectively based on what libs are being built, pull the tests to run from the source files which were added to the build.

Most test suites require no additional info other than the list of test names in the suite. However the fast-test are special that they have additional parameters associated with them. This requires some additional work in the test extraction script and in the meson.build file for processing the output.

---
 app/meson.build                               |  7 +-
 app/test/suites/meson.build                   | 74 +++++++++++++++++++
 buildtools/get-test-suites.py                 | 33 +++++++++
 .../has-hugepages.py                          |  0
 buildtools/meson.build                        |  2 +
 5 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 app/test/suites/meson.build
 create mode 100644 buildtools/get-test-suites.py
 rename app/test/has_hugepage.py => buildtools/has-hugepages.py (100%)
app/meson.build +6 -1
index 0d8b618e7f..c14dc80892 100644
@@ -101,7 +101,7 @@ foreach app:apps
         link_libs = dpdk_static_libraries + dpdk_drivers
     endif
 
-    executable('dpdk-' + name,
+    exec = executable('dpdk-' + name,
             sources,
             c_args: cflags,
             link_args: ldflags,
@@ -110,4 +110,9 @@ foreach app:apps
             include_directories: includes,
             install_rpath: join_paths(get_option('prefix'), driver_install_path),
             install: true)
+    if name == 'test'
+        dpdk_test = exec
+        autotest_sources = sources
+        subdir('test/suites')  # define the pre-canned test suites
+    endif
 endforeach
app/test/suites/meson.build new file +0 -1
new file mode 100644
index 0000000000..ec74d8adf2
--- /dev/null
Quoted 9 lines

app/test/suites/meson.build line 4

Quoted 6 lines

+++ b/app/test/suites/meson.build

app/test/suites/meson.build new file +4 -0
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+# some perf tests (eg: memcpy perf autotest)take very long

s/)take/) take/

Ack

Quoted 24 lines
Quoted 24 lines
app/test/suites/meson.build new file +24 -0
+# to complete, so timeout to 10 minutes
+timeout_seconds = 600
+timeout_seconds_fast = 10
+
+test_no_huge_args = ['--no-huge', '-m', '2048']
+has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
+message('hugepage availability: @0@'.format(has_hugepage))
+
+# process source files to determine the different unit test suites
+# - fast_tests
+# - perf_tests
+# - driver_tests
+test_suites = run_command(get_test_suites_cmd, autotest_sources,
+         check: true).stdout().strip().split()
+foreach suite:test_suites
+    # simple cases - tests without parameters or special handling
+    suite = suite.split('=')
+    suite_name = suite[0]
+    suite_tests = suite[1].split(',')
+    if suite_name != 'fast-tests'
+        # simple cases - tests without parameters or special handling
+        foreach t: suite_tests
+            test(t, dpdk_test,
+                    env: ['DPDK_TEST=' + t],
Quoted 9 lines

app/test/suites/meson.build line 34

Quoted 6 lines
app/test/suites/meson.build new file +6 -0
+                    timeout: timeout_seconds,
+                    is_parallel: false,
+                    suite: suite_name)
+        endforeach
+    else
+    # special fast-test handling here

Indentation of this comment is off.

Ack

Quoted 78 lines
Quoted 78 lines
app/test/suites/meson.build new file +40 -0
+        foreach t: suite_tests
+            params = t.split(':')
+            test_name = params[0]
+            nohuge = params[1] == 'true'
+            asan = params[2] == 'true'
+
+            test_args = []
+            if nohuge
+                test_args += test_no_huge_args
+            elif not has_hugepage
+                continue  #skip this tests
+            endif
+            if not asan and (get_option('b_sanitize') == 'address'
+                    or get_option('b_sanitize') == 'address,undefined')
+                continue  # skip this test
+            endif
+
+            if get_option('default_library') == 'shared'
+                test_args += ['-d', dpdk_drivers_build_dir]
+            endif
+
+            test(test_name, dpdk_test,
+                args : test_args,
+                env: ['DPDK_TEST=' + test_name],
+                timeout : timeout_seconds_fast,
+                is_parallel : false,
+                suite : 'fast-tests')
+            if not is_windows and test_name == 'trace_autotest'
+                test_args += ['--trace=.*']
+                test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]
+                test(test_name + '_with_traces', dpdk_test,
+                    args : test_args,
+                    env: ['DPDK_TEST=' + test_name],
+                    timeout : timeout_seconds_fast,
+                    is_parallel : false,
+                    suite : 'fast-tests')
+            endif
+        endforeach
+    endif
+endforeach
buildtools/get-test-suites.py new file +32 -0
new file mode 100644
index 0000000000..95a9cad4c8
@@ -0,0 +1,33 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2023 Intel Corporation
+
+import sys
+import re
+
+input_list = sys.argv[1:]
+test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)")
+test_suites = {}
+
+def get_fast_test_params(test_name, ln):
+    "Extract the extra fast-test parameters from the line"
+    #print(f"ln: {ln.rstrip()}, test_name: {test_name}, split: {ln.split(test_name, 1)}")
+    (_, rest_of_line) = ln.split(test_name, 1)
+    (_, nohuge, asan, _func) = rest_of_line.split(',', 3)
+    return f":{nohuge.strip().lower()}:{asan.strip().lower()}"
+
+for fname in input_list:
+    with open(fname) as f:
+        contents = [ln for ln in f.readlines() if test_def_regex.match(ln.strip())]
+    for ln in contents:
+        (test_suite, test_name) = test_def_regex.match(ln).group(1, 2)
+        suite_name = f"{test_suite.lower()}-tests"
+        if suite_name in test_suites:
+            test_suites[suite_name].append(test_name)
+        else:
+            test_suites[suite_name] = [test_name]
+        if suite_name == "fast-tests":
+            test_suites["fast-tests"][-1] += get_fast_test_params(test_name, ln)
+
+for suite in test_suites.keys():
Quoted 9 lines

buildtools/has-hugepages.py

Quoted 5 lines
buildtools/get-test-suites.py new file +1 -0
+    print(f"{suite}={','.join(test_suites[suite])}")
buildtools/has-hugepages.py renamed from app/test/has_hugepage.py +0 -0
similarity index 100%
rename from app/test/has_hugepage.py
rename to buildtools/has-hugepages.py

app/test/has_hugepage.py is still referenced in MAINTAINERS.
And new files (in this patch, and later patches) are not affiliated to someone.

Will look to fix in V6.

#73 lore raw

PATCH v5 6/10 app/test: add test case for scripted telemetry commands

In reply to Bruce Richardson

The test script for calling all telemetry commands is not discoverable by checking the C files for the build. Therefore we need to add it in as a special-case test in the fast-tests group.

---
 app/test/suites/meson.build             | 30 +++++++++++++++++++++++++
 app/test/{ => suites}/test_telemetry.sh |  0
 2 files changed, 30 insertions(+)
 rename app/test/{ => suites}/test_telemetry.sh (100%)
app/test/suites/meson.build +30 -0
index ec74d8adf2..2b428847c6 100644
@@ -72,3 +72,33 @@ foreach suite:test_suites
         endforeach
     endif
 endforeach
+
+# standalone test for telemetry
+if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
+    test_args = [dpdk_test]
+    test_args += test_no_huge_args
+    if get_option('default_library') == 'shared'
+        test_args += ['-d', dpdk_drivers_build_dir]
+    endif
+    if dpdk_conf.has('RTE_CRYPTO_NULL')
+        test_args += ['--vdev=crypto_null0']
+    endif
+    if dpdk_conf.has('RTE_DMA_SKELETON')
+        test_args += ['--vdev=dma_skeleton0']
+    endif
+    if dpdk_conf.has('RTE_EVENT_SKELETON')
+        test_args += ['--vdev=event_skeleton0']
+    endif
+    if dpdk_conf.has('RTE_NET_NULL')
+        test_args += ['--vdev=net_null0']
+    endif
+    if dpdk_conf.has('RTE_RAW_SKELETON')
+        test_args += ['--vdev=rawdev_skeleton0']
+    endif
+    test_args += ['-a', '0000:00:00.0']
+    test('telemetry_all', find_program('test_telemetry.sh'),
+            args: test_args,
+            timeout : timeout_seconds_fast,
+            is_parallel : false,
+            suite : 'fast-tests')
+endif
app/test/suites/test_telemetry.sh renamed from app/test/test_telemetry.sh +0 -0
similarity index 100%
rename from app/test/test_telemetry.sh
rename to app/test/suites/test_telemetry.sh
Signature · 1 line
2.39.2
#74 lore raw

PATCH v5 7/10 app/test: add debug test suite

In reply to Bruce Richardson

Add in for all platforms, the suite of tests to dump out the structure information available. Since the commands are defined in commands.c on all OS's, do not limit their presence to just the non-windows OS's.

---
 app/test/suites/meson.build | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
app/test/suites/meson.build +20 -0
index 2b428847c6..8cf498ac52 100644
@@ -102,3 +102,23 @@ if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
             is_parallel : false,
             suite : 'fast-tests')
 endif
+
+# dump tests are defined in commands.c, and not easily extractable
+dump_test_names = [
+        'dump_devargs',
+        'dump_log_types',
+        'dump_malloc_heaps',
+        'dump_malloc_stats',
+        'dump_mempool',
+        'dump_memzone',
+        'dump_physmem',
+        'dump_ring',
+        'dump_struct_sizes',
+]
+foreach arg : dump_test_names
+    test(arg, dpdk_test,
+                env : ['DPDK_TEST=' + arg],
+                timeout : timeout_seconds_fast,
+                is_parallel : false,
+                suite : 'debug-tests')
+endforeach
Signature · 1 line
2.39.2
#75 lore raw

PATCH v5 8/10 examples/l3fwd: make eventdev an optional dependency

In reply to Bruce Richardson

With l3fwd being a very commonly used example app, and built as part of our CI tests, we need to ensure it's buildable with just about all supported DPDK configurations. To enable l3fwd application to be built when the eventdev library is disabled, we need to compile in the eventdev support conditionally. Thankfully, the eventdev support is pretty self-contained, with only the main.c file having more than a couple of ifdefs.

---
 examples/l3fwd/l3fwd_em.c                  |  2 +
 examples/l3fwd/l3fwd_em_hlm.h              |  2 +
 examples/l3fwd/l3fwd_event.c               |  2 +
 examples/l3fwd/l3fwd_event.h               |  7 ++-
 examples/l3fwd/l3fwd_event_generic.c       |  2 +
 examples/l3fwd/l3fwd_event_internal_port.c |  2 +
 examples/l3fwd/l3fwd_fib.c                 |  2 +
 examples/l3fwd/l3fwd_lpm.c                 |  2 +
 examples/l3fwd/main.c                      | 65 +++++++++++++++++-----
 examples/l3fwd/meson.build                 |  5 +-
 10 files changed, 74 insertions(+), 17 deletions(-)
examples/l3fwd/l3fwd_em.c +2 -0
index 476ac0c54f..40e102b38a 100644
@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline void
 em_event_loop_single(struct l3fwd_event_resources *evt_rsrc,
 		const uint8_t flags)
@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	em_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Initialize exact match (hash) parameters. 8< */
 void
examples/l3fwd/l3fwd_em_hlm.h +2 -0
index 2e11eefad7..31cda9ddc1 100644
@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,
 	send_packets_multi(qconf, pkts_burst, dst_port, nb_rx);
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /*
  * Buffer optimized handling of events, invoked
  * from main_loop.
@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,
 
 	process_event_vector(vec, dst_port);
 }
+#endif /* RTE_LIB_EVENTDEV */
 
 #endif /* __L3FWD_EM_HLM_H__ */
examples/l3fwd/l3fwd_event.c +2 -0
index 32906ab08d..d72a4138cc 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 #include <getopt.h>
 
@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 	rte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush,
 			       NULL);
 }
+#endif /* #ifdef RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event.h +5 -2
index e21817c36b..1fd6fe4a78 100644
@@ -6,11 +6,13 @@
 #define __L3FWD_EVENTDEV_H__
 
 #include <rte_common.h>
+#include <rte_service.h>
+#include <rte_spinlock.h>
+
+#ifdef RTE_LIB_EVENTDEV
 #include <rte_eventdev.h>
 #include <rte_event_eth_rx_adapter.h>
 #include <rte_event_eth_tx_adapter.h>
-#include <rte_service.h>
-#include <rte_spinlock.h>
 
 #include "l3fwd.h"
 
@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,
 				struct rte_event events[], uint16_t nb_enq,
 				uint16_t nb_deq, uint8_t is_vector);
 
+#endif /* ifdef RTE_LIB_EVENTDEV */
 #endif /* __L3FWD_EVENTDEV_H__ */
examples/l3fwd/l3fwd_event_generic.c +2 -0
index c80573fc58..ddb6e5c38d 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_generic;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_event_internal_port.c +2 -0
index 32cf657148..cb49a8b9fa 100644
@@ -2,6 +2,7 @@
  * Copyright(C) 2019 Marvell International Ltd.
  */
 
+#ifdef RTE_LIB_EVENTDEV
 #include <stdbool.h>
 
 #include "l3fwd.h"
@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)
 	ops->event_port_setup = l3fwd_event_port_setup_internal_port;
 	ops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port;
 }
+#endif /* RTE_LIB_EVENTDEV */
examples/l3fwd/l3fwd_fib.c +2 -0
index 18398492ae..6a21984415 100644
@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 /* One eventdev loop for single and burst using fib. */
 static __rte_always_inline void
 fib_event_loop(struct l3fwd_event_resources *evt_rsrc,
@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	fib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 /* Function to setup fib. 8< */
 void
examples/l3fwd/l3fwd_lpm.c +2 -0
index 4ac1925c84..a484a33089 100644
@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)
 	return 0;
 }
 
+#ifdef RTE_LIB_EVENTDEV
 static __rte_always_inline uint16_t
 lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)
 {
@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)
 	lpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);
 	return 0;
 }
+#endif
 
 void
 setup_lpm(const int socketid)
examples/l3fwd/main.c +51 -14

227 lines not on this page · raw message

examples/l3fwd/meson.build +4 -1
index b40244a941..c25de77bba 100644
@@ -7,7 +7,7 @@
 # DPDK instance, use 'make'
 
 allow_experimental_apis = true
-deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']
+deps += ['acl', 'hash', 'lpm', 'fib']
 sources = files(
         'l3fwd_acl.c',
         'l3fwd_em.c',
@@ -18,3 +18,6 @@ sources = files(
         'l3fwd_lpm.c',
         'main.c',
 )
+if dpdk_conf.has('RTE_LIB_EVENTDEV')
+    deps += 'eventdev'
+endif
Signature · 1 line
2.39.2