void add_test_command(struct test_command *t);
-#define REGISTER_TEST_COMMAND(t) \
-static void __attribute__((used)) testfn_##t(void);\
-void __attribute__((constructor, used)) testfn_##t(void)\
-{\
- add_test_command(&t);\
-}
+/* Register a test function with its command string */
+#define REGISTER_TEST_COMMAND(cmd, func) \
+ static struct test_command test_struct_##cmd = { \
+ .command = RTE_STR(cmd), \
+ .callback = func, \
+ }; \
+ static void __attribute__((constructor, used)) \
+ test_register_##cmd(void) \
+ { \
+ add_test_command(&test_struct_##cmd); \
+ }
#endif
return 0;
}
-static struct test_command acl_cmd = {
- .command = "acl_autotest",
- .callback = test_acl,
-};
-REGISTER_TEST_COMMAND(acl_cmd);
+REGISTER_TEST_COMMAND(acl_autotest, test_acl);
return 0;
}
-static struct test_command alarm_cmd = {
- .command = "alarm_autotest",
- .callback = test_alarm,
-};
-REGISTER_TEST_COMMAND(alarm_cmd);
+REGISTER_TEST_COMMAND(alarm_autotest, test_alarm);
return 0;
}
-static struct test_command atomic_cmd = {
- .command = "atomic_autotest",
- .callback = test_atomic,
-};
-REGISTER_TEST_COMMAND(atomic_cmd);
+REGISTER_TEST_COMMAND(atomic_autotest, test_atomic);
return 0;
}
-static struct test_command byteorder_cmd = {
- .command = "byteorder_autotest",
- .callback = test_byteorder,
-};
-REGISTER_TEST_COMMAND(byteorder_cmd);
+REGISTER_TEST_COMMAND(byteorder_autotest, test_byteorder);
return 0;
}
-static struct test_command cmdline_cmd = {
- .command = "cmdline_autotest",
- .callback = test_cmdline,
-};
-REGISTER_TEST_COMMAND(cmdline_cmd);
+REGISTER_TEST_COMMAND(cmdline_autotest, test_cmdline);
return ret;
}
-static struct test_command common_cmd = {
- .command = "common_autotest",
- .callback = test_common,
-};
-REGISTER_TEST_COMMAND(common_cmd);
+REGISTER_TEST_COMMAND(common_autotest, test_common);
return 0;
}
-static struct test_command cpuflags_cmd = {
- .command = "cpuflags_autotest",
- .callback = test_cpuflags,
-};
-REGISTER_TEST_COMMAND(cpuflags_cmd);
+REGISTER_TEST_COMMAND(cpuflags_autotest, test_cpuflags);
gbl_cryptodev_type = RTE_CRYPTODEV_QAT_SYM_PMD;
return unit_test_suite_runner(&cryptodev_qat_testsuite);
}
-static struct test_command cryptodev_qat_cmd = {
- .command = "cryptodev_qat_autotest",
- .callback = test_cryptodev_qat,
-};
static int
test_cryptodev_aesni_mb(void /*argv __rte_unused, int argc __rte_unused*/)
return unit_test_suite_runner(&cryptodev_aesni_mb_testsuite);
}
-static struct test_command cryptodev_aesni_mb_cmd = {
- .command = "cryptodev_aesni_mb_autotest",
- .callback = test_cryptodev_aesni_mb,
-};
-
static int
test_cryptodev_aesni_gcm(void)
{
return unit_test_suite_runner(&cryptodev_aesni_gcm_testsuite);
}
-static struct test_command cryptodev_aesni_gcm_cmd = {
- .command = "cryptodev_aesni_gcm_autotest",
- .callback = test_cryptodev_aesni_gcm,
-};
-
static int
test_cryptodev_null(void)
{
return unit_test_suite_runner(&cryptodev_null_testsuite);
}
-static struct test_command cryptodev_null_cmd = {
- .command = "cryptodev_null_autotest",
- .callback = test_cryptodev_null,
-};
-
static int
test_cryptodev_sw_snow3g(void /*argv __rte_unused, int argc __rte_unused*/)
{
return unit_test_suite_runner(&cryptodev_sw_snow3g_testsuite);
}
-static struct test_command cryptodev_sw_snow3g_cmd = {
- .command = "cryptodev_sw_snow3g_autotest",
- .callback = test_cryptodev_sw_snow3g,
-};
-
static int
test_cryptodev_sw_kasumi(void /*argv __rte_unused, int argc __rte_unused*/)
{
return unit_test_suite_runner(&cryptodev_sw_kasumi_testsuite);
}
-static struct test_command cryptodev_sw_kasumi_cmd = {
- .command = "cryptodev_sw_kasumi_autotest",
- .callback = test_cryptodev_sw_kasumi,
-};
-
-REGISTER_TEST_COMMAND(cryptodev_qat_cmd);
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_cmd);
-REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_cmd);
-REGISTER_TEST_COMMAND(cryptodev_null_cmd);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_cmd);
-REGISTER_TEST_COMMAND(cryptodev_sw_kasumi_cmd);
+REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);
+REGISTER_TEST_COMMAND(cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);
+REGISTER_TEST_COMMAND(cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm);
+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);
return unit_test_suite_runner(&cryptodev_snow3g_testsuite);
}
-static struct test_command cryptodev_aesni_mb_perf_cmd = {
- .command = "cryptodev_aesni_mb_perftest",
- .callback = perftest_aesni_mb_cryptodev,
-};
-
-static struct test_command cryptodev_qat_perf_cmd = {
- .command = "cryptodev_qat_perftest",
- .callback = perftest_qat_cryptodev,
-};
-
-static struct test_command cryptodev_sw_snow3g_perf_cmd = {
- .command = "cryptodev_sw_snow3g_perftest",
- .callback = perftest_sw_snow3g_cryptodev,
-};
-
-static struct test_command cryptodev_qat_snow3g_perf_cmd = {
- .command = "cryptodev_qat_snow3g_perftest",
- .callback = perftest_qat_snow3g_cryptodev,
-};
-
-REGISTER_TEST_COMMAND(cryptodev_aesni_mb_perf_cmd);
-REGISTER_TEST_COMMAND(cryptodev_qat_perf_cmd);
-REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_perf_cmd);
-REGISTER_TEST_COMMAND(cryptodev_qat_snow3g_perf_cmd);
+REGISTER_TEST_COMMAND(cryptodev_aesni_mb_perftest, perftest_aesni_mb_cryptodev);
+REGISTER_TEST_COMMAND(cryptodev_qat_perftest, perftest_qat_cryptodev);
+REGISTER_TEST_COMMAND(cryptodev_sw_snow3g_perftest, perftest_sw_snow3g_cryptodev);
+REGISTER_TEST_COMMAND(cryptodev_qat_snow3g_perftest, perftest_qat_snow3g_cryptodev);
return 0;
}
-static struct test_command cycles_cmd = {
- .command = "cycles_autotest",
- .callback = test_cycles,
-};
-REGISTER_TEST_COMMAND(cycles_cmd);
+REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
return 0;
}
-static struct test_command debug_cmd = {
- .command = "debug_autotest",
- .callback = test_debug,
-};
-REGISTER_TEST_COMMAND(debug_cmd);
+REGISTER_TEST_COMMAND(debug_autotest, test_debug);
return -1;
}
-static struct test_command devargs_cmd = {
- .command = "devargs_autotest",
- .callback = test_devargs,
-};
-REGISTER_TEST_COMMAND(devargs_cmd);
+REGISTER_TEST_COMMAND(devargs_autotest, test_devargs);
return -1;
}
-static struct test_command distributor_cmd = {
- .command = "distributor_autotest",
- .callback = test_distributor,
-};
-REGISTER_TEST_COMMAND(distributor_cmd);
+REGISTER_TEST_COMMAND(distributor_autotest, test_distributor);
return 0;
}
-static struct test_command distributor_perf_cmd = {
- .command = "distributor_perf_autotest",
- .callback = test_distributor_perf,
-};
-REGISTER_TEST_COMMAND(distributor_perf_cmd);
+REGISTER_TEST_COMMAND(distributor_perf_autotest, test_distributor_perf);
return ret;
}
-static struct test_command eal_flags_cmd = {
- .command = "eal_flags_autotest",
- .callback = test_eal_flags,
-};
-REGISTER_TEST_COMMAND(eal_flags_cmd);
+REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags);
return 0;
}
-static struct test_command eal_fs_cmd = {
- .command = "eal_fs_autotest",
- .callback = test_eal_fs,
-};
-REGISTER_TEST_COMMAND(eal_fs_cmd);
+REGISTER_TEST_COMMAND(eal_fs_autotest, test_eal_fs);
return 0;
}
-static struct test_command errno_cmd = {
- .command = "errno_autotest",
- .callback = test_errno,
-};
-REGISTER_TEST_COMMAND(errno_cmd);
+REGISTER_TEST_COMMAND(errno_autotest, test_errno);
return 0;
}
-static struct test_command func_reentrancy_cmd = {
- .command = "func_reentrancy_autotest",
- .callback = test_func_reentrancy,
-};
-REGISTER_TEST_COMMAND(func_reentrancy_cmd);
+REGISTER_TEST_COMMAND(func_reentrancy_autotest, test_func_reentrancy);
return 0;
}
-static struct test_command hash_cmd = {
- .command = "hash_autotest",
- .callback = test_hash,
-};
-REGISTER_TEST_COMMAND(hash_cmd);
+REGISTER_TEST_COMMAND(hash_autotest, test_hash);
return 0;
}
-static struct test_command hash_functions_cmd = {
- .command = "hash_functions_autotest",
- .callback = test_hash_functions,
-};
-REGISTER_TEST_COMMAND(hash_functions_cmd);
+REGISTER_TEST_COMMAND(hash_functions_autotest, test_hash_functions);
return r;
}
-
-static struct test_command hash_scaling_cmd = {
- .command = "hash_multiwriter_autotest",
- .callback = test_hash_multiwriter_main,
-};
-
-REGISTER_TEST_COMMAND(hash_scaling_cmd);
+REGISTER_TEST_COMMAND(hash_multiwriter_autotest, test_hash_multiwriter_main);
return 0;
}
-static struct test_command hash_perf_cmd = {
- .command = "hash_perf_autotest",
- .callback = test_hash_perf,
-};
-REGISTER_TEST_COMMAND(hash_perf_cmd);
+REGISTER_TEST_COMMAND(hash_perf_autotest, test_hash_perf);
return r;
}
-
-static struct test_command hash_scaling_cmd = {
- .command = "hash_scaling_autotest",
- .callback = test_hash_scaling_main,
-};
-REGISTER_TEST_COMMAND(hash_scaling_cmd);
+REGISTER_TEST_COMMAND(hash_scaling_autotest, test_hash_scaling_main);
return ret;
}
-static struct test_command interrupt_cmd = {
- .command = "interrupt_autotest",
- .callback = test_interrupt,
-};
-REGISTER_TEST_COMMAND(interrupt_cmd);
+REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);
return -1;
}
-static struct test_command ivshmem_cmd = {
- .command = "ivshmem_autotest",
- .callback = test_ivshmem,
-};
-REGISTER_TEST_COMMAND(ivshmem_cmd);
+REGISTER_TEST_COMMAND(ivshmem_autotest, test_ivshmem);
return ret;
}
-static struct test_command kni_cmd = {
- .command = "kni_autotest",
- .callback = test_kni,
-};
-REGISTER_TEST_COMMAND(kni_cmd);
+REGISTER_TEST_COMMAND(kni_autotest, test_kni);
return 0;
}
-static struct test_command kvargs_cmd = {
- .command = "kvargs_autotest",
- .callback = test_kvargs,
-};
-REGISTER_TEST_COMMAND(kvargs_cmd);
+REGISTER_TEST_COMMAND(kvargs_autotest, test_kvargs);
return unit_test_suite_runner(&link_bonding_test_suite);
}
-static struct test_command link_bonding_cmd = {
- .command = "link_bonding_autotest",
- .callback = test_link_bonding,
-};
-REGISTER_TEST_COMMAND(link_bonding_cmd);
+REGISTER_TEST_COMMAND(link_bonding_autotest, test_link_bonding);
return unit_test_suite_runner(&link_bonding_mode4_test_suite);
}
-static struct test_command link_bonding_cmd = {
- .command = "link_bonding_mode4_autotest",
- .callback = test_link_bonding_mode4,
-};
-
-REGISTER_TEST_COMMAND(link_bonding_cmd);
+REGISTER_TEST_COMMAND(link_bonding_mode4_autotest, test_link_bonding_mode4);
return unit_test_suite_runner(&link_bonding_rssconf_test_suite);
}
-static struct test_command test_link_bonding_rssconf_cmd = {
- .command = "link_bonding_rssconf_autotest",
- .callback = test_link_bonding_rssconf,
-};
-
-REGISTER_TEST_COMMAND(test_link_bonding_rssconf_cmd);
+REGISTER_TEST_COMMAND(link_bonding_rssconf_autotest, test_link_bonding_rssconf);
return 0;
}
-static struct test_command logs_cmd = {
- .command = "logs_autotest",
- .callback = test_logs,
-};
-REGISTER_TEST_COMMAND(logs_cmd);
+REGISTER_TEST_COMMAND(logs_autotest, test_logs);
return global_status;
}
-static struct test_command lpm_cmd = {
- .command = "lpm_autotest",
- .callback = test_lpm,
-};
-REGISTER_TEST_COMMAND(lpm_cmd);
+REGISTER_TEST_COMMAND(lpm_autotest, test_lpm);
return global_status;
}
-static struct test_command lpm6_cmd = {
- .command = "lpm6_autotest",
- .callback = test_lpm6,
-};
-REGISTER_TEST_COMMAND(lpm6_cmd);
+REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);
return 0;
}
-static struct test_command lpm6_perf_cmd = {
- .command = "lpm6_perf_autotest",
- .callback = test_lpm6_perf,
-};
-REGISTER_TEST_COMMAND(lpm6_perf_cmd);
+REGISTER_TEST_COMMAND(lpm6_perf_autotest, test_lpm6_perf);
return 0;
}
-static struct test_command lpm_perf_cmd = {
- .command = "lpm_perf_autotest",
- .callback = test_lpm_perf,
-};
-REGISTER_TEST_COMMAND(lpm_perf_cmd);
+REGISTER_TEST_COMMAND(lpm_perf_autotest, test_lpm_perf);
return 0;
}
-static struct test_command malloc_cmd = {
- .command = "malloc_autotest",
- .callback = test_malloc,
-};
-REGISTER_TEST_COMMAND(malloc_cmd);
+REGISTER_TEST_COMMAND(malloc_autotest, test_malloc);
return 0;
}
-static struct test_command mbuf_cmd = {
- .command = "mbuf_autotest",
- .callback = test_mbuf,
-};
-REGISTER_TEST_COMMAND(mbuf_cmd);
+REGISTER_TEST_COMMAND(mbuf_autotest, test_mbuf);
return 0;
}
-static struct test_command memcpy_cmd = {
- .command = "memcpy_autotest",
- .callback = test_memcpy,
-};
-REGISTER_TEST_COMMAND(memcpy_cmd);
+REGISTER_TEST_COMMAND(memcpy_autotest, test_memcpy);
return 0;
}
-static struct test_command memcpy_perf_cmd = {
- .command = "memcpy_perf_autotest",
- .callback = test_memcpy_perf,
-};
-REGISTER_TEST_COMMAND(memcpy_perf_cmd);
+REGISTER_TEST_COMMAND(memcpy_perf_autotest, test_memcpy_perf);
return 0;
}
-static struct test_command memory_cmd = {
- .command = "memory_autotest",
- .callback = test_memory,
-};
-REGISTER_TEST_COMMAND(memory_cmd);
+REGISTER_TEST_COMMAND(memory_autotest, test_memory);
return -1;
}
-static struct test_command mempool_cmd = {
- .command = "mempool_autotest",
- .callback = test_mempool,
-};
-REGISTER_TEST_COMMAND(mempool_cmd);
+REGISTER_TEST_COMMAND(mempool_autotest, test_mempool);
return 0;
}
-static struct test_command mempool_perf_cmd = {
- .command = "mempool_perf_autotest",
- .callback = test_mempool_perf,
-};
-REGISTER_TEST_COMMAND(mempool_perf_cmd);
+REGISTER_TEST_COMMAND(mempool_perf_autotest, test_mempool_perf);
return 0;
}
-static struct test_command memzone_cmd = {
- .command = "memzone_autotest",
- .callback = test_memzone,
-};
-REGISTER_TEST_COMMAND(memzone_cmd);
+REGISTER_TEST_COMMAND(memzone_autotest, test_memzone);
}
-static struct test_command meter_cmd = {
- .command = "meter_autotest",
- .callback = test_meter,
-};
-REGISTER_TEST_COMMAND(meter_cmd);
+REGISTER_TEST_COMMAND(meter_autotest, test_meter);
return run_object_creation_tests();
}
-static struct test_command multiprocess_cmd = {
- .command = "multiprocess_autotest",
- .callback = test_mp_secondary,
-};
-REGISTER_TEST_COMMAND(multiprocess_cmd);
+REGISTER_TEST_COMMAND(multiprocess_autotest, test_mp_secondary);
return 0;
}
-static struct test_command pci_cmd = {
- .command = "pci_autotest",
- .callback = test_pci,
-};
-REGISTER_TEST_COMMAND(pci_cmd);
+REGISTER_TEST_COMMAND(pci_autotest, test_pci);
return 0;
}
-static struct test_command per_lcore_cmd = {
- .command = "per_lcore_autotest",
- .callback = test_per_lcore,
-};
-REGISTER_TEST_COMMAND(per_lcore_cmd);
+REGISTER_TEST_COMMAND(per_lcore_autotest, test_per_lcore);
return -1;
}
-static struct test_command pmd_perf_cmd = {
- .command = "pmd_perf_autotest",
- .callback = test_pmd_perf,
-};
-REGISTER_TEST_COMMAND(pmd_perf_cmd);
+REGISTER_TEST_COMMAND(pmd_perf_autotest, test_pmd_perf);
return 0;
}
-static struct test_command ring_pmd_cmd = {
- .command = "ring_pmd_autotest",
- .callback = test_pmd_ring,
-};
-REGISTER_TEST_COMMAND(ring_pmd_cmd);
+REGISTER_TEST_COMMAND(ring_pmd_autotest, test_pmd_ring);
return 0;
}
-static struct test_command ring_pmd_perf_cmd = {
- .command = "ring_pmd_perf_autotest",
- .callback = test_ring_pmd_perf,
-};
-REGISTER_TEST_COMMAND(ring_pmd_perf_cmd);
+REGISTER_TEST_COMMAND(ring_pmd_perf_autotest, test_ring_pmd_perf);
return -1;
}
-static struct test_command power_cmd = {
- .command = "power_autotest",
- .callback = test_power,
-};
-REGISTER_TEST_COMMAND(power_cmd);
+REGISTER_TEST_COMMAND(power_autotest, test_power);
return -1;
}
-static struct test_command power_acpi_cpufreq_cmd = {
- .command = "power_acpi_cpufreq_autotest",
- .callback = test_power_acpi_cpufreq,
-};
-REGISTER_TEST_COMMAND(power_acpi_cpufreq_cmd);
+REGISTER_TEST_COMMAND(power_acpi_cpufreq_autotest, test_power_acpi_cpufreq);
return -1;
}
-static struct test_command power_kvm_vm_cmd = {
- .command = "power_kvm_vm_autotest",
- .callback = test_power_kvm_vm,
-};
-REGISTER_TEST_COMMAND(power_kvm_vm_cmd);
+REGISTER_TEST_COMMAND(power_kvm_vm_autotest, test_power_kvm_vm);
return 0;
}
-static struct test_command prefetch_cmd = {
- .command = "prefetch_autotest",
- .callback = test_prefetch,
-};
-REGISTER_TEST_COMMAND(prefetch_cmd);
+REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);
return tell_the_result(num_tests, num_pass);
}
-static struct test_command red_cmd = {
- .command = "red_autotest",
- .callback = test_red,
-};
-REGISTER_TEST_COMMAND(red_cmd);
-
-static struct test_command red_cmd_perf = {
- .command = "red_perf",
- .callback = test_red_perf,
-};
-REGISTER_TEST_COMMAND(red_cmd_perf);
-
-static struct test_command red_cmd_all = {
- .command = "red_all",
- .callback = test_red_all,
-};
-REGISTER_TEST_COMMAND(red_cmd_all);
+REGISTER_TEST_COMMAND(red_autotest, test_red);
+REGISTER_TEST_COMMAND(red_perf, test_red_perf);
+REGISTER_TEST_COMMAND(red_all, test_red_all);
return unit_test_suite_runner(&reorder_test_suite);
}
-static struct test_command reorder_cmd = {
- .command = "reorder_autotest",
- .callback = test_reorder,
-};
-REGISTER_TEST_COMMAND(reorder_cmd);
+REGISTER_TEST_COMMAND(reorder_autotest, test_reorder);
return 0;
}
-static struct test_command resource_cmd = {
- .command = "resource_autotest",
- .callback = test_resource,
-};
-REGISTER_TEST_COMMAND(resource_cmd);
+REGISTER_TEST_COMMAND(resource_autotest, test_resource);
return 0;
}
-static struct test_command ring_cmd = {
- .command = "ring_autotest",
- .callback = test_ring,
-};
-REGISTER_TEST_COMMAND(ring_cmd);
+REGISTER_TEST_COMMAND(ring_autotest, test_ring);
return 0;
}
-static struct test_command ring_perf_cmd = {
- .command = "ring_perf_autotest",
- .callback = test_ring_perf,
-};
-REGISTER_TEST_COMMAND(ring_perf_cmd);
+REGISTER_TEST_COMMAND(ring_perf_autotest, test_ring_perf);
return 0;
}
-static struct test_command rwlock_cmd = {
- .command = "rwlock_autotest",
- .callback = test_rwlock,
-};
-REGISTER_TEST_COMMAND(rwlock_cmd);
+REGISTER_TEST_COMMAND(rwlock_autotest, test_rwlock);
return 0;
}
-static struct test_command sched_cmd = {
- .command = "sched_autotest",
- .callback = test_sched,
-};
-REGISTER_TEST_COMMAND(sched_cmd);
+REGISTER_TEST_COMMAND(sched_autotest, test_sched);
return ret;
}
-static struct test_command spinlock_cmd = {
- .command = "spinlock_autotest",
- .callback = test_spinlock,
-};
-REGISTER_TEST_COMMAND(spinlock_cmd);
+REGISTER_TEST_COMMAND(spinlock_autotest, test_spinlock);
return 0;
}
-static struct test_command string_cmd = {
- .command = "string_autotest",
- .callback = test_string_fns,
-};
-REGISTER_TEST_COMMAND(string_cmd);
+REGISTER_TEST_COMMAND(string_autotest, test_string_fns);
return 0;
}
-static struct test_command table_cmd = {
- .command = "table_autotest",
- .callback = test_table,
-};
-REGISTER_TEST_COMMAND(table_cmd);
+REGISTER_TEST_COMMAND(table_autotest, test_table);
return ret;
}
-static struct test_command tailq_cmd = {
- .command = "tailq_autotest",
- .callback = test_tailq,
-};
-REGISTER_TEST_COMMAND(tailq_cmd);
+REGISTER_TEST_COMMAND(tailq_autotest, test_tailq);
return 0;
}
-static struct test_command thash_cmd = {
- .command = "thash_autotest",
- .callback = test_thash,
-};
-REGISTER_TEST_COMMAND(thash_cmd);
+REGISTER_TEST_COMMAND(thash_autotest, test_thash);
return TEST_SUCCESS;
}
-static struct test_command timer_cmd = {
- .command = "timer_autotest",
- .callback = test_timer,
-};
-REGISTER_TEST_COMMAND(timer_cmd);
+REGISTER_TEST_COMMAND(timer_autotest, test_timer);
return 0;
}
-static struct test_command timer_perf_cmd = {
- .command = "timer_perf_autotest",
- .callback = test_timer_perf,
-};
-REGISTER_TEST_COMMAND(timer_perf_cmd);
+REGISTER_TEST_COMMAND(timer_perf_autotest, test_timer_perf);
return TEST_SUCCESS;
}
-static struct test_command timer_racecond_cmd = {
- .command = "timer_racecond_autotest",
- .callback = test_timer_racecond,
-};
-REGISTER_TEST_COMMAND(timer_racecond_cmd);
+REGISTER_TEST_COMMAND(timer_racecond_autotest, test_timer_racecond);
return 0;
}
-static struct test_command version_cmd = {
- .command = "version_autotest",
- .callback = test_version,
-};
-REGISTER_TEST_COMMAND(version_cmd);
+REGISTER_TEST_COMMAND(version_autotest, test_version);