* [dpdk-dev] [PATCH v2 5/7] app/test: convert all tests to register system
2014-08-18 11:29 [dpdk-dev] [PATCH v2 0/7] fix build errors David Marchand
` (3 preceding siblings ...)
2014-08-18 11:29 ` [dpdk-dev] [PATCH v2 4/7] app/test: introduce dynamic commands list David Marchand
@ 2014-08-18 11:29 ` David Marchand
2014-08-18 11:29 ` [dpdk-dev] [PATCH v2 6/7] app/test: no more builtin commands David Marchand
` (2 subsequent siblings)
7 siblings, 0 replies; 10+ messages in thread
From: David Marchand @ 2014-08-18 11:29 UTC (permalink / raw)
To: dev
Remove all tests from the builtin commands list and use the dynamic commands
list register macro.
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
app/test/commands.c | 157 +-------------------------------------
app/test/test.c | 2 +
app/test/test.h | 55 +------------
app/test/test_acl.c | 15 ++--
app/test/test_alarm.c | 7 +-
app/test/test_atomic.c | 7 +-
app/test/test_byteorder.c | 8 +-
app/test/test_cmdline.c | 13 ++--
app/test/test_common.c | 8 +-
app/test/test_cpuflags.c | 8 +-
app/test/test_cycles.c | 8 +-
app/test/test_debug.c | 8 +-
app/test/test_devargs.c | 8 +-
app/test/test_distributor.c | 18 ++---
app/test/test_distributor_perf.c | 18 ++---
app/test/test_eal_flags.c | 18 ++---
app/test/test_eal_fs.c | 15 ++--
app/test/test_errno.c | 8 +-
app/test/test_func_reentrancy.c | 8 +-
app/test/test_hash.c | 16 ++--
app/test/test_hash_perf.c | 16 ++--
app/test/test_interrupts.c | 7 +-
app/test/test_ivshmem.c | 12 ++-
app/test/test_kni.c | 16 ++--
app/test/test_kvargs.c | 9 ++-
app/test/test_link_bonding.c | 8 +-
app/test/test_logs.c | 8 +-
app/test/test_lpm.c | 16 ++--
app/test/test_lpm6.c | 16 ++--
app/test/test_malloc.c | 8 +-
app/test/test_mbuf.c | 8 +-
app/test/test_memcpy.c | 8 +-
app/test/test_memcpy_perf.c | 8 +-
app/test/test_memory.c | 8 +-
app/test/test_mempool.c | 8 +-
app/test/test_mempool_perf.c | 8 +-
app/test/test_memzone.c | 8 +-
app/test/test_meter.c | 15 ++--
app/test/test_mp_secondary.c | 17 ++---
app/test/test_pci.c | 6 ++
app/test/test_per_lcore.c | 8 +-
app/test/test_pmd_ring.c | 15 ++--
app/test/test_power.c | 16 ++--
app/test/test_prefetch.c | 8 +-
app/test/test_red.c | 17 ++---
app/test/test_ring.c | 8 +-
app/test/test_ring_perf.c | 8 +-
app/test/test_rwlock.c | 8 +-
app/test/test_sched.c | 15 ++--
app/test/test_spinlock.c | 8 +-
app/test/test_string_fns.c | 8 +-
app/test/test_table.c | 19 ++---
app/test/test_table.h | 1 -
app/test/test_tailq.c | 8 +-
app/test/test_timer.c | 15 ++--
app/test/test_timer_perf.c | 15 ++--
app/test/test_version.c | 8 +-
57 files changed, 358 insertions(+), 442 deletions(-)
diff --git a/app/test/commands.c b/app/test/commands.c
index a1ffd43..0640ac9 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -104,122 +104,6 @@ static void cmd_autotest_parsed(void *parsed_result,
ret = t->callback();
}
- if (!strcmp(res->autotest, "version_autotest"))
- ret = test_version();
- if (!strcmp(res->autotest, "eal_fs_autotest"))
- ret = test_eal_fs();
- if (!strcmp(res->autotest, "debug_autotest"))
- ret = test_debug();
- if (!strcmp(res->autotest, "pci_autotest"))
- ret = test_pci();
- if (!strcmp(res->autotest, "prefetch_autotest"))
- ret = test_prefetch();
- if (!strcmp(res->autotest, "byteorder_autotest"))
- ret = test_byteorder();
- if (!strcmp(res->autotest, "per_lcore_autotest"))
- ret = test_per_lcore();
- if (!strcmp(res->autotest, "atomic_autotest"))
- ret = test_atomic();
- if (!strcmp(res->autotest, "malloc_autotest"))
- ret = test_malloc();
- if (!strcmp(res->autotest, "spinlock_autotest"))
- ret = test_spinlock();
- if (!strcmp(res->autotest, "memory_autotest"))
- ret = test_memory();
- if (!strcmp(res->autotest, "memzone_autotest"))
- ret = test_memzone();
- if (!strcmp(res->autotest, "rwlock_autotest"))
- ret = test_rwlock();
- if (!strcmp(res->autotest, "mbuf_autotest"))
- ret = test_mbuf();
- if (!strcmp(res->autotest, "logs_autotest"))
- ret = test_logs();
- if (!strcmp(res->autotest, "errno_autotest"))
- ret = test_errno();
- if (!strcmp(res->autotest, "hash_autotest"))
- ret = test_hash();
- if (!strcmp(res->autotest, "hash_perf_autotest"))
- ret = test_hash_perf();
- if (!strcmp(res->autotest, "lpm_autotest"))
- ret = test_lpm();
- if (!strcmp(res->autotest, "lpm6_autotest"))
- ret = test_lpm6();
- if (!strcmp(res->autotest, "cpuflags_autotest"))
- ret = test_cpuflags();
- if (!strcmp(res->autotest, "cmdline_autotest"))
- ret = test_cmdline();
- if (!strcmp(res->autotest, "tailq_autotest"))
- ret = test_tailq();
- if (!strcmp(res->autotest, "multiprocess_autotest"))
- ret = test_mp_secondary();
- if (!strcmp(res->autotest, "memcpy_autotest"))
- ret = test_memcpy();
- if (!strcmp(res->autotest, "string_autotest"))
- ret = test_string_fns();
- if (!strcmp(res->autotest, "eal_flags_autotest"))
- ret = test_eal_flags();
- if (!strcmp(res->autotest, "alarm_autotest"))
- ret = test_alarm();
- if (!strcmp(res->autotest, "interrupt_autotest"))
- ret = test_interrupt();
- if (!strcmp(res->autotest, "cycles_autotest"))
- ret = test_cycles();
- if (!strcmp(res->autotest, "ring_autotest"))
- ret = test_ring();
- if (!strcmp(res->autotest, "table_autotest"))
- ret = test_table();
- if (!strcmp(res->autotest, "ring_perf_autotest"))
- ret = test_ring_perf();
- if (!strcmp(res->autotest, "timer_autotest"))
- ret = test_timer();
- if (!strcmp(res->autotest, "timer_perf_autotest"))
- ret = test_timer_perf();
-#ifdef RTE_LIBRTE_PMD_BOND
- if (!strcmp(res->autotest, "link_bonding_autotest"))
- ret = test_link_bonding();
-#endif
- if (!strcmp(res->autotest, "mempool_autotest"))
- ret = test_mempool();
- if (!strcmp(res->autotest, "mempool_perf_autotest"))
- ret = test_mempool_perf();
- if (!strcmp(res->autotest, "memcpy_perf_autotest"))
- ret = test_memcpy_perf();
- if (!strcmp(res->autotest, "func_reentrancy_autotest"))
- ret = test_func_reentrancy();
- if (!strcmp(res->autotest, "red_autotest"))
- ret = test_red();
- if (!strcmp(res->autotest, "sched_autotest"))
- ret = test_sched();
- if (!strcmp(res->autotest, "meter_autotest"))
- ret = test_meter();
- if (!strcmp(res->autotest, "kni_autotest"))
- ret = test_kni();
- if (!strcmp(res->autotest, "power_autotest"))
- ret = test_power();
- if (!strcmp(res->autotest, "common_autotest"))
- ret = test_common();
- if (!strcmp(res->autotest, "ivshmem_autotest"))
- ret = test_ivshmem();
- if (!strcmp(res->autotest, "distributor_autotest"))
- ret = test_distributor();
- if (!strcmp(res->autotest, "distributor_perf_autotest"))
- ret = test_distributor_perf();
- if (!strcmp(res->autotest, "devargs_autotest"))
- ret = test_devargs();
-#ifdef RTE_LIBRTE_PMD_RING
- if (!strcmp(res->autotest, "ring_pmd_autotest"))
- ret = test_pmd_ring();
-#endif /* RTE_LIBRTE_PMD_RING */
-
-#ifdef RTE_LIBRTE_ACL
- if (!strcmp(res->autotest, "acl_autotest"))
- ret = test_acl();
-#endif /* RTE_LIBRTE_ACL */
-#ifdef RTE_LIBRTE_KVARGS
- if (!strcmp(res->autotest, "kvargs_autotest"))
- ret |= test_kvargs();
-#endif /* RTE_LIBRTE_KVARGS */
-
if (ret == 0)
printf("Test OK\n");
else
@@ -440,46 +324,7 @@ cmdline_parse_ctx_t main_ctx[] = {
int commands_init(void)
{
struct test_command *t;
- char builtin_commands[] =
- "pci_autotest#memory_autotest#"
- "per_lcore_autotest#spinlock_autotest#"
- "rwlock_autotest#atomic_autotest#"
- "byteorder_autotest#prefetch_autotest#"
- "cycles_autotest#logs_autotest#"
- "memzone_autotest#ring_autotest#"
- "mempool_autotest#mbuf_autotest#"
- "timer_autotest#malloc_autotest#"
- "memcpy_autotest#hash_autotest#"
- "lpm_autotest#debug_autotest#"
- "lpm6_autotest#"
- "errno_autotest#tailq_autotest#"
- "string_autotest#multiprocess_autotest#"
- "cpuflags_autotest#eal_flags_autotest#"
- "alarm_autotest#interrupt_autotest#"
- "version_autotest#eal_fs_autotest#"
- "cmdline_autotest#func_reentrancy_autotest#"
-#ifdef RTE_LIBRTE_PMD_BOND
- "link_bonding_autotest#"
-#endif
- "mempool_perf_autotest#hash_perf_autotest#"
- "memcpy_perf_autotest#ring_perf_autotest#"
- "red_autotest#meter_autotest#sched_autotest#"
- "memcpy_perf_autotest#kni_autotest#"
- "ivshmem_autotest#"
- "devargs_autotest#table_autotest#"
-#ifdef RTE_LIBRTE_ACL
- "acl_autotest#"
-#endif
- "power_autotest#"
- "timer_perf_autotest#"
-#ifdef RTE_LIBRTE_PMD_RING
- "ring_pmd_autotest#"
-#endif
-#ifdef RTE_LIBRTE_KVARGS
- "kvargs_autotest#"
-#endif
- "common_autotest#"
- "distributor_autotest#distributor_perf_autotest";
+ char builtin_commands[] = "";
char *commands, *ptr;
int commands_len = strlen(builtin_commands) + 1;
diff --git a/app/test/test.c b/app/test/test.c
index a33b2b5..9bee6bb 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -96,7 +96,9 @@ do_recursive_call(void)
{ "test_memory_flags", no_action },
{ "test_file_prefix", no_action },
{ "test_no_huge_flag", no_action },
+#ifdef RTE_LIBRTE_IVSHMEM
{ "test_ivshmem", test_ivshmem },
+#endif
};
if (recursive_call == NULL)
diff --git a/app/test/test.h b/app/test/test.h
index bba0ec5..98ab804 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -132,60 +132,11 @@ int commands_init(void);
int main(int argc, char **argv);
int test_pci(void);
-int test_memory(void);
-int test_per_lcore(void);
-int test_spinlock(void);
-int test_rwlock(void);
-int test_atomic(void);
-int test_byteorder(void);
-int test_prefetch(void);
-int test_cycles(void);
-int test_logs(void);
-int test_memzone(void);
-int test_ring(void);
-int test_table(void);
-int test_ring_perf(void);
-int test_mempool(void);
-int test_mempool_perf(void);
-int test_mbuf(void);
-int test_timer(void);
-int test_timer_perf(void);
-int test_malloc(void);
-int test_memcpy(void);
-int test_memcpy_perf(void);
-int test_hash(void);
-int test_hash_perf(void);
-int test_lpm(void);
-int test_lpm6(void);
-int test_debug(void);
-int test_errno(void);
-int test_tailq(void);
-int test_string_fns(void);
+int test_pci_run;
+
int test_mp_secondary(void);
-int test_cpuflags(void);
-int test_eal_flags(void);
-int test_alarm(void);
-int test_interrupt(void);
-int test_version(void);
-int test_eal_fs(void);
-int test_cmdline(void);
-int test_func_reentrancy(void);
-int test_red(void);
-int test_sched(void);
-int test_meter(void);
-int test_acl(void);
-int test_kni(void);
-int test_power(void);
-int test_common(void);
-int test_pmd_ring(void);
-int test_ivshmem(void);
-int test_distributor(void);
-int test_distributor_perf(void);
-int test_kvargs(void);
-int test_devargs(void);
-int test_link_bonding(void);
-int test_pci_run;
+int test_ivshmem(void);
typedef int (test_callback)(void);
TAILQ_HEAD(test_commands_list, test_command);
diff --git a/app/test/test_acl.c b/app/test/test_acl.c
index 869f6d3..4e7b470 100644
--- a/app/test/test_acl.c
+++ b/app/test/test_acl.c
@@ -910,7 +910,7 @@ test_misc(void)
return 0;
}
-int
+static int
test_acl(void)
{
if (test_invalid_parameters() < 0)
@@ -928,13 +928,10 @@ test_acl(void)
return 0;
}
-#else
-
-int
-test_acl(void)
-{
- printf("This binary was not compiled with ACL support!\n");
- return 0;
-}
+static struct test_command acl_cmd = {
+ .command = "acl_autotest",
+ .callback = test_acl,
+};
+REGISTER_TEST_COMMAND(acl_cmd);
#endif /* RTE_LIBRTE_ACL */
diff --git a/app/test/test_alarm.c b/app/test/test_alarm.c
index d5bea5e..5d6f4a2 100644
--- a/app/test/test_alarm.c
+++ b/app/test/test_alarm.c
@@ -199,7 +199,7 @@ test_multi_alarms(void)
return 0;
}
-int
+static int
test_alarm(void)
{
int count = 0;
@@ -253,3 +253,8 @@ test_alarm(void)
return 0;
}
+static struct test_command alarm_cmd = {
+ .command = "alarm_autotest",
+ .callback = test_alarm,
+};
+REGISTER_TEST_COMMAND(alarm_cmd);
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index 141cc22..3347413 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -248,7 +248,7 @@ test_atomic_dec_and_test(__attribute__((unused)) void *arg)
return 0;
}
-int
+static int
test_atomic(void)
{
rte_atomic16_init(&a16);
@@ -375,3 +375,8 @@ test_atomic(void)
return 0;
}
+static struct test_command atomic_cmd = {
+ .command = "atomic_autotest",
+ .callback = test_atomic,
+};
+REGISTER_TEST_COMMAND(atomic_cmd);
diff --git a/app/test/test_byteorder.c b/app/test/test_byteorder.c
index 38f8d39..a088489 100644
--- a/app/test/test_byteorder.c
+++ b/app/test/test_byteorder.c
@@ -52,7 +52,7 @@ static volatile uint64_t u64 = 0xdeadcafebabefaceULL;
* size (16, 32, 64 bits)
*/
-int
+static int
test_byteorder(void)
{
uint16_t res_u16;
@@ -91,3 +91,9 @@ test_byteorder(void)
return 0;
}
+
+static struct test_command byteorder_cmd = {
+ .command = "byteorder_autotest",
+ .callback = test_byteorder,
+};
+REGISTER_TEST_COMMAND(byteorder_cmd);
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 10a3f77..9b8bd5c 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -36,10 +36,10 @@
#include "test.h"
#include "test_cmdline.h"
-int
+#ifdef RTE_LIBRTE_CMDLINE
+static int
test_cmdline(void)
{
-#ifdef RTE_LIBRTE_CMDLINE
printf("Testind parsing ethernet addresses...\n");
if (test_parse_etheraddr_valid() < 0)
return -1;
@@ -87,9 +87,12 @@ test_cmdline(void)
printf("Testing library functions...\n");
if (test_cmdline_lib() < 0)
return -1;
-#else
- printf("The cmdline library is not included in this build\n");
-#endif
return 0;
}
+static struct test_command cmdline_cmd = {
+ .command = "cmdline_autotest",
+ .callback = test_cmdline,
+};
+REGISTER_TEST_COMMAND(cmdline_cmd);
+#endif
diff --git a/app/test/test_common.c b/app/test/test_common.c
index 628201b..4b71e7b 100644
--- a/app/test/test_common.c
+++ b/app/test/test_common.c
@@ -158,7 +158,7 @@ test_align(void)
return 0;
}
-int
+static int
test_common(void)
{
int ret = 0;
@@ -168,3 +168,9 @@ test_common(void)
return ret;
}
+
+static struct test_command common_cmd = {
+ .command = "common_autotest",
+ .callback = test_common,
+};
+REGISTER_TEST_COMMAND(common_cmd);
diff --git a/app/test/test_cpuflags.c b/app/test/test_cpuflags.c
index cb49384..82c0197 100644
--- a/app/test/test_cpuflags.c
+++ b/app/test/test_cpuflags.c
@@ -74,7 +74,7 @@ cpu_flag_result(int result)
* - Check if register and CPUID functions fail properly
*/
-int
+static int
test_cpuflags(void)
{
int result;
@@ -129,3 +129,9 @@ test_cpuflags(void)
return 0;
}
+
+static struct test_command cpuflags_cmd = {
+ .command = "cpuflags_autotest",
+ .callback = test_cpuflags,
+};
+REGISTER_TEST_COMMAND(cpuflags_cmd);
diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index b8d66a0..d8fa517 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -52,7 +52,7 @@
* of cycles is correct with regard to the frequency of the timer.
*/
-int
+static int
test_cycles(void)
{
unsigned i;
@@ -88,3 +88,9 @@ test_cycles(void)
return 0;
}
+
+static struct test_command cycles_cmd = {
+ .command = "cycles_autotest",
+ .callback = test_cycles,
+};
+REGISTER_TEST_COMMAND(cycles_cmd);
diff --git a/app/test/test_debug.c b/app/test/test_debug.c
index 135b75d..4659e46 100644
--- a/app/test/test_debug.c
+++ b/app/test/test_debug.c
@@ -156,7 +156,7 @@ test_usage(void)
return 0;
}
-int
+static int
test_debug(void)
{
rte_dump_stack();
@@ -169,3 +169,9 @@ test_debug(void)
return -1;
return 0;
}
+
+static struct test_command debug_cmd = {
+ .command = "debug_autotest",
+ .callback = test_debug,
+};
+REGISTER_TEST_COMMAND(debug_cmd);
diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index 63eee0b..f0acf8e 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -52,7 +52,7 @@ static void free_devargs_list(void)
}
}
-int
+static int
test_devargs(void)
{
struct rte_devargs_list save_devargs_list;
@@ -129,3 +129,9 @@ test_devargs(void)
devargs_list = save_devargs_list;
return -1;
}
+
+static struct test_command devargs_cmd = {
+ .command = "devargs_autotest",
+ .callback = test_devargs,
+};
+REGISTER_TEST_COMMAND(devargs_cmd);
diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 7648ed1..b29bef8 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -503,7 +503,7 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
-int
+static int
test_distributor(void)
{
static struct rte_distributor *d;
@@ -581,15 +581,9 @@ err:
return -1;
}
-#else
-
-#include <stdio.h>
-
-int
-test_distributor(void)
-{
- printf("Distributor is not enabled in configuration\n");
- return 0;
-}
-
+static struct test_command distributor_cmd = {
+ .command = "distributor_autotest",
+ .callback = test_distributor,
+};
+REGISTER_TEST_COMMAND(distributor_cmd);
#endif
diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index 1031baa..8a6b855 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -212,7 +212,7 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
-int
+static int
test_distributor_perf(void)
{
static struct rte_distributor *d;
@@ -261,15 +261,9 @@ test_distributor_perf(void)
return 0;
}
-#else
-
-#include <stdio.h>
-
-int
-test_distributor_perf(void)
-{
- printf("Distributor is not enabled in configuration\n");
- return 0;
-}
-
+static struct test_command distributor_perf_cmd = {
+ .command = "distributor_perf_autotest",
+ .callback = test_distributor_perf,
+};
+REGISTER_TEST_COMMAND(distributor_perf_cmd);
#endif
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 729d4ee..2d81764 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -1204,7 +1204,7 @@ test_memory_flags(void)
return 0;
}
-int
+static int
test_eal_flags(void)
{
int ret = 0;
@@ -1283,15 +1283,9 @@ test_eal_flags(void)
return ret;
}
-#else
-/* Baremetal version
- * Multiprocess not applicable, so just return 0 always
- */
-int
-test_eal_flags(void)
-{
- printf("Multi-process not possible for baremetal, cannot test EAL flags\n");
- return 0;
-}
-
+static struct test_command eal_flags_cmd = {
+ .command = "eal_flags_autotest",
+ .callback = test_eal_flags,
+};
+REGISTER_TEST_COMMAND(eal_flags_cmd);
#endif
diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c
index b28ca6c..8d4edc1 100644
--- a/app/test/test_eal_fs.c
+++ b/app/test/test_eal_fs.c
@@ -196,18 +196,17 @@ error:
return -1;
}
-int
+static int
test_eal_fs(void)
{
if (test_parse_sysfs_value() < 0)
return -1;
return 0;
}
-#else
-/* baremetal does not have a filesystem */
-int
-test_eal_fs(void)
-{
- return 0;
-}
+
+static struct test_command eal_fs_cmd = {
+ .command = "eal_fs_autotest",
+ .callback = test_eal_fs,
+};
+REGISTER_TEST_COMMAND(eal_fs_cmd);
#endif
diff --git a/app/test/test_errno.c b/app/test/test_errno.c
index 93ad0b5..c903b19 100644
--- a/app/test/test_errno.c
+++ b/app/test/test_errno.c
@@ -42,7 +42,7 @@
#include "test.h"
-int
+static int
test_errno(void)
{
const char *rte_retval;
@@ -112,3 +112,9 @@ test_errno(void)
return 0;
}
+
+static struct test_command errno_cmd = {
+ .command = "errno_autotest",
+ .callback = test_errno,
+};
+REGISTER_TEST_COMMAND(errno_cmd);
diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 0955b0a..45928fa 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -465,7 +465,7 @@ launch_test(struct test_case *pt_case)
/**
* Main entry of func_reentrancy test
*/
-int
+static int
test_func_reentrancy(void)
{
uint32_t case_id;
@@ -492,3 +492,9 @@ test_func_reentrancy(void)
return 0;
}
+
+static struct test_command func_reentrancy_cmd = {
+ .command = "func_reentrancy_autotest",
+ .callback = test_func_reentrancy,
+};
+REGISTER_TEST_COMMAND(func_reentrancy_cmd);
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 87de3c6..ae3238b 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -1330,7 +1330,8 @@ fail_jhash_3word:
/*
* Do all unit and performance tests.
*/
-int test_hash(void)
+static int
+test_hash(void)
{
if (test_add_delete() < 0)
return -1;
@@ -1366,13 +1367,10 @@ int test_hash(void)
return 0;
}
-#else /* RTE_LIBRTE_HASH */
-
-int
-test_hash(void)
-{
- printf("The Hash library is not included in this build\n");
- return 0;
-}
+static struct test_command hash_cmd = {
+ .command = "hash_autotest",
+ .callback = test_hash,
+};
+REGISTER_TEST_COMMAND(hash_cmd);
#endif /* RTE_LIBRTE_HASH */
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 1e9c16e..d3e9990 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -761,7 +761,8 @@ fbk_hash_perf_test(void)
/*
* Do all unit and performance tests.
*/
-int test_hash_perf(void)
+static int
+test_hash_perf(void)
{
if (run_all_tbl_perf_tests() < 0)
return -1;
@@ -771,13 +772,10 @@ int test_hash_perf(void)
return -1;
return 0;
}
-#else /* RTE_LIBRTE_HASH */
-
-int
-test_hash_perf(void)
-{
- printf("The Hash library is not included in this build\n");
- return 0;
-}
+static struct test_command hash_perf_cmd = {
+ .command = "hash_perf_autotest",
+ .callback = test_hash_perf,
+};
+REGISTER_TEST_COMMAND(hash_perf_cmd);
#endif /* RTE_LIBRTE_HASH */
diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c
index 4563e2b..61fdc56 100644
--- a/app/test/test_interrupts.c
+++ b/app/test/test_interrupts.c
@@ -395,7 +395,7 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type)
/**
* Main function of testing interrupt.
*/
-int
+static int
test_interrupt(void)
{
int ret = -1;
@@ -548,3 +548,8 @@ out:
return ret;
}
+static struct test_command interrupt_cmd = {
+ .command = "interrupt_autotest",
+ .callback = test_interrupt,
+};
+REGISTER_TEST_COMMAND(interrupt_cmd);
diff --git a/app/test/test_ivshmem.c b/app/test/test_ivshmem.c
index 1404ada..e759939 100644
--- a/app/test/test_ivshmem.c
+++ b/app/test/test_ivshmem.c
@@ -431,12 +431,10 @@ test_ivshmem(void)
return -1;
}
-#else /* RTE_LIBRTE_IVSHMEM */
-int
-test_ivshmem(void)
-{
- printf("This binary was not compiled with IVSHMEM support!\n");
- return 0;
-}
+static struct test_command ivshmem_cmd = {
+ .command = "ivshmem_autotest",
+ .callback = test_ivshmem,
+};
+REGISTER_TEST_COMMAND(ivshmem_cmd);
#endif /* RTE_LIBRTE_IVSHMEM */
diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 962bfad..60683d2 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -488,7 +488,7 @@ fail_kni:
return ret;
}
-int
+static int
test_kni(void)
{
int ret = -1;
@@ -680,13 +680,9 @@ fail:
return ret;
}
-#else /* RTE_LIBRTE_KNI */
-
-int
-test_kni(void)
-{
- printf("The KNI library is not included in this build\n");
- return 0;
-}
-
+static struct test_command kni_cmd = {
+ .command = "kni_autotest",
+ .callback = test_kni,
+};
+REGISTER_TEST_COMMAND(kni_cmd);
#endif /* RTE_LIBRTE_KNI */
diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c
index c417ba2..b8f5e5c 100644
--- a/app/test/test_kvargs.c
+++ b/app/test/test_kvargs.c
@@ -223,7 +223,8 @@ static int test_invalid_kvargs(void)
return -1;
}
-int test_kvargs(void)
+static int
+test_kvargs(void)
{
printf("== test valid case ==\n");
if (test_valid_kvargs() < 0)
@@ -233,3 +234,9 @@ int test_kvargs(void)
return -1;
return 0;
}
+
+static struct test_command kvargs_cmd = {
+ .command = "kvargs_autotest",
+ .callback = test_kvargs,
+};
+REGISTER_TEST_COMMAND(kvargs_cmd);
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 5c1303e..db5b180 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -3810,8 +3810,14 @@ static struct unit_test_suite link_bonding_test_suite = {
};
-int
+static int
test_link_bonding(void)
{
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);
diff --git a/app/test/test_logs.c b/app/test/test_logs.c
index 67daa5b..2063c74 100644
--- a/app/test/test_logs.c
+++ b/app/test/test_logs.c
@@ -59,7 +59,7 @@
* - Send logs with different types and levels, some should not be displayed.
*/
-int
+static int
test_logs(void)
{
/* enable these logs type */
@@ -90,3 +90,9 @@ test_logs(void)
return 0;
}
+
+static struct test_command logs_cmd = {
+ .command = "logs_autotest",
+ .callback = test_logs,
+};
+REGISTER_TEST_COMMAND(logs_cmd);
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 05f0a93..087d97a 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -1332,7 +1332,7 @@ perf_test(void)
* Do all unit and performance tests.
*/
-int
+static int
test_lpm(void)
{
unsigned i;
@@ -1349,13 +1349,9 @@ test_lpm(void)
return global_status;
}
-#else /* RTE_LIBRTE_LPM */
-
-int
-test_lpm(void)
-{
- printf("The LPM library is not included in this build\n");
- return 0;
-}
-
+static struct test_command lpm_cmd = {
+ .command = "lpm_autotest",
+ .callback = test_lpm,
+};
+REGISTER_TEST_COMMAND(lpm_cmd);
#endif /* RTE_LIBRTE_LPM */
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index 982930b..bd99125 100644
--- a/app/test/test_lpm6.c
+++ b/app/test/test_lpm6.c
@@ -1902,7 +1902,7 @@ perf_test(void)
/*
* Do all unit and performance tests.
*/
-int
+static int
test_lpm6(void)
{
unsigned i;
@@ -1920,13 +1920,9 @@ test_lpm6(void)
return global_status;
}
-#else /* RTE_LIBRTE_LPM */
-
-int
-test_lpm6(void)
-{
- printf("The LPM library is not included in this build\n");
- return 0;
-}
-
+static struct test_command lpm6_cmd = {
+ .command = "lpm6_autotest",
+ .callback = test_lpm6,
+};
+REGISTER_TEST_COMMAND(lpm6_cmd);
#endif /* RTE_LIBRTE_LPM */
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index 0817151..ee34ca3 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -924,7 +924,7 @@ test_alloc_socket(void)
return 0;
}
-int
+static int
test_malloc(void)
{
unsigned lcore_id;
@@ -1045,3 +1045,9 @@ test_malloc(void)
return 0;
}
+
+static struct test_command malloc_cmd = {
+ .command = "malloc_autotest",
+ .callback = test_malloc,
+};
+REGISTER_TEST_COMMAND(malloc_cmd);
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 2b87521..21024e7 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -829,7 +829,7 @@ test_failing_mbuf_sanity_check(void)
#endif
-int
+static int
test_mbuf(void)
{
RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != 64);
@@ -927,3 +927,9 @@ test_mbuf(void)
}
return 0;
}
+
+static struct test_command mbuf_cmd = {
+ .command = "mbuf_autotest",
+ .callback = test_mbuf,
+};
+REGISTER_TEST_COMMAND(mbuf_cmd);
diff --git a/app/test/test_memcpy.c b/app/test/test_memcpy.c
index ee0b0da..56b8e1e 100644
--- a/app/test/test_memcpy.c
+++ b/app/test/test_memcpy.c
@@ -210,7 +210,7 @@ func_test(void)
return 0;
}
-int
+static int
test_memcpy(void)
{
int ret;
@@ -223,3 +223,9 @@ test_memcpy(void)
return -1;
return 0;
}
+
+static struct test_command memcpy_cmd = {
+ .command = "memcpy_autotest",
+ .callback = test_memcpy,
+};
+REGISTER_TEST_COMMAND(memcpy_cmd);
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index f6b95c9..7809610 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -278,7 +278,7 @@ perf_test(void)
}
-int
+static int
test_memcpy_perf(void)
{
int ret;
@@ -288,3 +288,9 @@ test_memcpy_perf(void)
return -1;
return 0;
}
+
+static struct test_command memcpy_perf_cmd = {
+ .command = "memcpy_perf_autotest",
+ .callback = test_memcpy_perf,
+};
+REGISTER_TEST_COMMAND(memcpy_perf_cmd);
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index 6c62de8..02ef3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -51,7 +51,7 @@
* - Try to read all memory; it should not segfault.
*/
-int
+static int
test_memory(void)
{
uint64_t s;
@@ -84,3 +84,9 @@ test_memory(void)
return 0;
}
+
+static struct test_command memory_cmd = {
+ .command = "memory_autotest",
+ .callback = test_memory,
+};
+REGISTER_TEST_COMMAND(memory_cmd);
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index a83b2ee..303d2b3 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -455,7 +455,7 @@ test_mempool_xmem_misc(void)
return (0);
}
-int
+static int
test_mempool(void)
{
rte_atomic32_init(&synchro);
@@ -521,3 +521,9 @@ test_mempool(void)
return 0;
}
+
+static struct test_command mempool_cmd = {
+ .command = "mempool_autotest",
+ .callback = test_mempool,
+};
+REGISTER_TEST_COMMAND(mempool_cmd);
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index d3141fe..57c0e5e 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -273,7 +273,7 @@ do_one_mempool_test(unsigned cores)
return 0;
}
-int
+static int
test_mempool_perf(void)
{
rte_atomic32_init(&synchro);
@@ -329,3 +329,9 @@ test_mempool_perf(void)
return 0;
}
+
+static struct test_command mempool_perf_cmd = {
+ .command = "mempool_perf_autotest",
+ .callback = test_mempool_perf,
+};
+REGISTER_TEST_COMMAND(mempool_perf_cmd);
diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 42c7601..381f643 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -922,7 +922,7 @@ test_memzone_reserve_remainder(void)
return 0;
}
-int
+static int
test_memzone(void)
{
const struct rte_memzone *memzone1;
@@ -1044,3 +1044,9 @@ test_memzone(void)
return 0;
}
+
+static struct test_command memzone_cmd = {
+ .command = "memzone_autotest",
+ .callback = test_memzone,
+};
+REGISTER_TEST_COMMAND(memzone_cmd);
diff --git a/app/test/test_meter.c b/app/test/test_meter.c
index 226b231..215cbf8 100644
--- a/app/test/test_meter.c
+++ b/app/test/test_meter.c
@@ -471,7 +471,7 @@ tm_test_trtcm_color_aware_check(void)
/**
* test main entrance for library meter
*/
-int
+static int
test_meter(void)
{
if(tm_test_srtcm_config() != 0 )
@@ -496,12 +496,9 @@ test_meter(void)
}
-#else /* RTE_LIBRTE_METER */
-
-int
-test_meter(void)
-{
- printf("The meter library is not included in this build\n");
- return 0;
-}
+static struct test_command meter_cmd = {
+ .command = "meter_autotest",
+ .callback = test_meter,
+};
+REGISTER_TEST_COMMAND(meter_cmd);
#endif /* RTE_LIBRTE_METER */
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index e739765..7579e20 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -265,16 +265,9 @@ test_mp_secondary(void)
return run_object_creation_tests();
}
-#else
-
-/* Baremetal version
- * Multiprocess not applicable, so just return 0 always
- */
-int
-test_mp_secondary(void)
-{
- printf("Multi-process not applicable for baremetal\n");
- return 0;
-}
-
+static struct test_command multiprocess_cmd = {
+ .command = "multiprocess_autotest",
+ .callback = test_mp_secondary,
+};
+REGISTER_TEST_COMMAND(multiprocess_cmd);
#endif
diff --git a/app/test/test_pci.c b/app/test/test_pci.c
index 40095c6..e834c4d 100644
--- a/app/test/test_pci.c
+++ b/app/test/test_pci.c
@@ -195,3 +195,9 @@ test_pci(void)
return 0;
}
+
+static struct test_command pci_cmd = {
+ .command = "pci_autotest",
+ .callback = test_pci,
+};
+REGISTER_TEST_COMMAND(pci_cmd);
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 2241ed5..1a5a232 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -99,7 +99,7 @@ test_per_lcore_delay(__attribute__((unused)) void *arg)
return 0;
}
-int
+static int
test_per_lcore(void)
{
unsigned lcore_id;
@@ -136,3 +136,9 @@ test_per_lcore(void)
return 0;
}
+
+static struct test_command per_lcore_cmd = {
+ .command = "per_lcore_autotest",
+ .callback = test_per_lcore,
+};
+REGISTER_TEST_COMMAND(per_lcore_cmd);
diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c
index 19ad0e9..6364495 100644
--- a/app/test/test_pmd_ring.c
+++ b/app/test/test_pmd_ring.c
@@ -405,7 +405,7 @@ test_pmd_ring_pair_create_attach(void)
return 0;
}
-int
+static int
test_pmd_ring(void)
{
mp = rte_mempool_create("mbuf_pool", NB_MBUF,
@@ -445,13 +445,10 @@ test_pmd_ring(void)
return 0;
}
-#else
-
-int
-test_pmd_ring(void)
-{
- return 0;
-}
-
+static struct test_command ring_pmd_cmd = {
+ .command = "ring_pmd_autotest",
+ .callback = test_pmd_ring,
+};
+REGISTER_TEST_COMMAND(ring_pmd_cmd);
#endif
diff --git a/app/test/test_power.c b/app/test/test_power.c
index 94c1cac..123b199 100644
--- a/app/test/test_power.c
+++ b/app/test/test_power.c
@@ -379,7 +379,7 @@ check_power_freq_min(void)
return 0;
}
-int
+static int
test_power(void)
{
int ret = -1;
@@ -477,14 +477,10 @@ fail_all:
return -1;
}
-#else /* RTE_LIBRTE_POWER */
-
-int
-test_power(void)
-{
- printf("The power library is not included in this build\n");
- return 0;
-}
-
+static struct test_command power_cmd = {
+ .command = "power_autotest",
+ .callback = test_power,
+};
+REGISTER_TEST_COMMAND(power_cmd);
#endif /* RTE_LIBRTE_POWER */
diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c
index 10039b7..f8615e2 100644
--- a/app/test/test_prefetch.c
+++ b/app/test/test_prefetch.c
@@ -46,7 +46,7 @@
* The test always return success.
*/
-int
+static int
test_prefetch(void)
{
int a;
@@ -57,3 +57,9 @@ test_prefetch(void)
return 0;
}
+
+static struct test_command prefetch_cmd = {
+ .command = "prefetch_autotest",
+ .callback = test_prefetch,
+};
+REGISTER_TEST_COMMAND(prefetch_cmd);
diff --git a/app/test/test_red.c b/app/test/test_red.c
index bb62aba..7cf2221 100644
--- a/app/test/test_red.c
+++ b/app/test/test_red.c
@@ -1861,7 +1861,8 @@ test_invalid_parameters(void)
return 0;
}
-int test_red(void)
+static int
+test_red(void)
{
uint32_t num_tests = 0;
uint32_t num_pass = 0;
@@ -1883,13 +1884,9 @@ int test_red(void)
return (ret);
}
-#else
-
-int
-test_red(void)
-{
- printf("The SCHED library is not included in this build\n");
- return 0;
-}
-
+static struct test_command red_cmd = {
+ .command = "red_autotest",
+ .callback = test_red,
+};
+REGISTER_TEST_COMMAND(red_cmd);
#endif
diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index be588f2..2cd8e77 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -1322,7 +1322,7 @@ fail_test:
return ret;
}
-int
+static int
test_ring(void)
{
/* some more basic operations */
@@ -1392,3 +1392,9 @@ test_ring(void)
return 0;
}
+
+static struct test_command ring_cmd = {
+ .command = "ring_autotest",
+ .callback = test_ring,
+};
+REGISTER_TEST_COMMAND(ring_cmd);
diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index 9ec6932..44dda4d 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -381,7 +381,7 @@ test_bulk_enqueue_dequeue(void)
}
}
-int
+static int
test_ring_perf(void)
{
struct lcore_pair cores;
@@ -413,3 +413,9 @@ test_ring_perf(void)
}
return 0;
}
+
+static struct test_command ring_perf_cmd = {
+ .command = "ring_perf_autotest",
+ .callback = test_ring_perf,
+};
+REGISTER_TEST_COMMAND(ring_perf_cmd);
diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c
index 89fc594..c4e6e95 100644
--- a/app/test/test_rwlock.c
+++ b/app/test/test_rwlock.c
@@ -97,7 +97,7 @@ test_rwlock_per_core(__attribute__((unused)) void *arg)
return 0;
}
-int
+static int
test_rwlock(void)
{
int i;
@@ -129,3 +129,9 @@ test_rwlock(void)
return 0;
}
+
+static struct test_command rwlock_cmd = {
+ .command = "rwlock_autotest",
+ .callback = test_rwlock,
+};
+REGISTER_TEST_COMMAND(rwlock_cmd);
diff --git a/app/test/test_sched.c b/app/test/test_sched.c
index d9abb51..2cc9df5 100644
--- a/app/test/test_sched.c
+++ b/app/test/test_sched.c
@@ -155,7 +155,7 @@ prepare_pkt(struct rte_mbuf *mbuf)
/**
* test main entrance for library sched
*/
-int
+static int
test_sched(void)
{
struct rte_mempool *mp = NULL;
@@ -229,12 +229,9 @@ test_sched(void)
return 0;
}
-#else /* RTE_LIBRTE_SCHED */
-
-int
-test_sched(void)
-{
- printf("The Scheduler library is not included in this build\n");
- return 0;
-}
+static struct test_command sched_cmd = {
+ .command = "sched_autotest",
+ .callback = test_sched,
+};
+REGISTER_TEST_COMMAND(sched_cmd);
#endif /* RTE_LIBRTE_SCHED */
diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index 9b45d8e..c95b0c0 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -225,7 +225,7 @@ test_spinlock_try(__attribute__((unused)) void *arg)
* Test rte_eal_get_lcore_state() in addition to spinlocks
* as we have "waiting" then "running" lcores.
*/
-int
+static int
test_spinlock(void)
{
int ret = 0;
@@ -333,3 +333,9 @@ test_spinlock(void)
return ret;
}
+
+static struct test_command spinlock_cmd = {
+ .command = "spinlock_autotest",
+ .callback = test_spinlock,
+};
+REGISTER_TEST_COMMAND(spinlock_cmd);
diff --git a/app/test/test_string_fns.c b/app/test/test_string_fns.c
index 223797c..29bfe5b 100644
--- a/app/test/test_string_fns.c
+++ b/app/test/test_string_fns.c
@@ -291,7 +291,7 @@ test_rte_strsplit(void)
return 0;
}
-int
+static int
test_string_fns(void)
{
if (test_rte_snprintf() < 0 ||
@@ -299,3 +299,9 @@ test_string_fns(void)
return -1;
return 0;
}
+
+static struct test_command string_cmd = {
+ .command = "string_autotest",
+ .callback = test_string_fns,
+};
+REGISTER_TEST_COMMAND(string_cmd);
diff --git a/app/test/test_table.c b/app/test/test_table.c
index 970d15c..33e2efc 100644
--- a/app/test/test_table.c
+++ b/app/test/test_table.c
@@ -32,17 +32,7 @@
*/
-#ifndef RTE_LIBRTE_TABLE
-
-#include "test.h"
-
-int
-test_table(void)
-{
- return 0;
-}
-
-#else
+#ifdef RTE_LIBRTE_TABLE
#include <rte_byteorder.h>
#include <rte_hexdump.h>
@@ -156,7 +146,7 @@ app_init_rings(void)
}
-int
+static int
test_table(void)
{
int status, failures;
@@ -217,4 +207,9 @@ test_table(void)
return 0;
}
+static struct test_command table_cmd = {
+ .command = "table_autotest",
+ .callback = test_table,
+};
+REGISTER_TEST_COMMAND(table_cmd);
#endif
diff --git a/app/test/test_table.h b/app/test/test_table.h
index afea738..40e50db 100644
--- a/app/test/test_table.h
+++ b/app/test/test_table.h
@@ -126,7 +126,6 @@
} while (0)
/* Function definitions */
-int test_table(void);
uint64_t pipeline_test_hash(
void *key,
__attribute__((unused)) uint32_t key_size,
diff --git a/app/test/test_tailq.c b/app/test/test_tailq.c
index c9b53ee..4d32c6f 100644
--- a/app/test/test_tailq.c
+++ b/app/test/test_tailq.c
@@ -153,7 +153,7 @@ test_tailq_deprecated(void)
return 0;
}
-int
+static int
test_tailq(void)
{
int ret = 0;
@@ -162,3 +162,9 @@ test_tailq(void)
ret |= test_tailq_deprecated();
return ret;
}
+
+static struct test_command tailq_cmd = {
+ .command = "tailq_autotest",
+ .callback = test_tailq,
+};
+REGISTER_TEST_COMMAND(tailq_cmd);
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index 57b722c..ec826c0 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -457,7 +457,7 @@ timer_sanity_check(void)
return 0;
}
-int
+static int
test_timer(void)
{
unsigned i;
@@ -520,12 +520,9 @@ test_timer(void)
return 0;
}
-#else
-
-int
-test_timer(void)
-{
- return 0;
-}
-
+static struct test_command timer_cmd = {
+ .command = "timer_autotest",
+ .callback = test_timer,
+};
+REGISTER_TEST_COMMAND(timer_cmd);
#endif
diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c
index 83bd45d..da92473 100644
--- a/app/test/test_timer_perf.c
+++ b/app/test/test_timer_perf.c
@@ -62,7 +62,7 @@ timer_cb(struct rte_timer *t __rte_unused, void *param __rte_unused)
#define do_delay() rte_pause()
#endif
-int
+static int
test_timer_perf(void)
{
unsigned iterations = 100;
@@ -159,12 +159,9 @@ test_timer_perf(void)
return 0;
}
-#else
-
-int
-test_timer_perf(void)
-{
- return 0;
-}
-
+static struct test_command timer_perf_cmd = {
+ .command = "timer_perf_autotest",
+ .callback = test_timer_perf,
+};
+REGISTER_TEST_COMMAND(timer_perf_cmd);
#endif
diff --git a/app/test/test_version.c b/app/test/test_version.c
index ac6ffa0..f66827d 100644
--- a/app/test/test_version.c
+++ b/app/test/test_version.c
@@ -41,7 +41,7 @@
#include "test.h"
-int
+static int
test_version(void)
{
const char *version = rte_version();
@@ -53,3 +53,9 @@ test_version(void)
return -1;
return 0;
}
+
+static struct test_command version_cmd = {
+ .command = "version_autotest",
+ .callback = test_version,
+};
+REGISTER_TEST_COMMAND(version_cmd);
--
1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 7/7] app/test: only build what has been selected in config
2014-08-18 11:29 [dpdk-dev] [PATCH v2 0/7] fix build errors David Marchand
` (5 preceding siblings ...)
2014-08-18 11:29 ` [dpdk-dev] [PATCH v2 6/7] app/test: no more builtin commands David Marchand
@ 2014-08-18 11:29 ` David Marchand
2014-08-18 12:57 ` [dpdk-dev] [PATCH v2 0/7] fix build errors Bruce Richardson
7 siblings, 0 replies; 10+ messages in thread
From: David Marchand @ 2014-08-18 11:29 UTC (permalink / raw)
To: dev
Avoid building tests if their counterparts are not selected in config.
This has the nice side effect of fixing build errors when disabling parts of
the dpdk.
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
app/test/Makefile | 61 ++++++++++++++++++++++++++------------
app/test/test_acl.c | 3 --
app/test/test_cmdline.c | 2 --
app/test/test_distributor.c | 2 --
app/test/test_distributor_perf.c | 2 --
app/test/test_eal_flags.c | 2 --
app/test/test_eal_fs.c | 2 --
app/test/test_hash.c | 3 --
app/test/test_hash_perf.c | 3 --
app/test/test_ivshmem.c | 3 --
app/test/test_kni.c | 2 --
app/test/test_lpm.c | 3 --
app/test/test_lpm6.c | 3 --
app/test/test_meter.c | 3 --
app/test/test_mp_secondary.c | 2 --
app/test/test_pmd_ring.c | 4 ---
app/test/test_power.c | 4 ---
app/test/test_red.c | 3 --
app/test/test_sched.c | 3 --
app/test/test_table.c | 4 ---
app/test/test_table_acl.c | 4 ---
app/test/test_table_combined.c | 3 --
app/test/test_table_pipeline.c | 8 -----
app/test/test_table_ports.c | 4 ---
app/test/test_table_tables.c | 4 ---
app/test/test_timer.c | 2 --
app/test/test_timer_perf.c | 2 --
27 files changed, 42 insertions(+), 99 deletions(-)
diff --git a/app/test/Makefile b/app/test/Makefile
index 445405a..37a3772 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -53,39 +53,57 @@ SRCS-y += test_cycles.c
SRCS-y += test_spinlock.c
SRCS-y += test_memory.c
SRCS-y += test_memzone.c
+
SRCS-y += test_ring.c
+SRCS-y += test_ring_perf.c
+
+ifeq ($(CONFIG_RTE_LIBRTE_TABLE),y)
SRCS-y += test_table.c
-SRCS-y += test_table_pipeline.c
+SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test_table_pipeline.c
SRCS-y += test_table_tables.c
SRCS-y += test_table_ports.c
SRCS-y += test_table_combined.c
-SRCS-y += test_table_acl.c
-SRCS-y += test_ring_perf.c
+SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_table_acl.c
+endif
+
SRCS-y += test_rwlock.c
-SRCS-y += test_timer.c
+
+SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer.c
+SRCS-$(CONFIG_RTE_LIBRTE_TIMER) += test_timer_perf.c
+
SRCS-y += test_mempool.c
SRCS-y += test_mempool_perf.c
+
SRCS-y += test_mbuf.c
SRCS-y += test_logs.c
+
SRCS-y += test_memcpy.c
SRCS-y += test_memcpy_perf.c
-SRCS-y += test_hash.c
-SRCS-y += test_hash_perf.c
-SRCS-y += test_lpm.c
-SRCS-y += test_lpm6.c
+
+SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash.c
+SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c
+
+SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c
+SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c
+
SRCS-y += test_debug.c
SRCS-y += test_errno.c
SRCS-y += test_tailq.c
SRCS-y += test_string_fns.c
-SRCS-y += test_mp_secondary.c
SRCS-y += test_cpuflags.c
+
+ifeq ($(CONFIG_RTE_EXEC_ENV_BAREMETAL),)
+SRCS-y += test_mp_secondary.c
SRCS-y += test_eal_flags.c
+SRCS-y += test_eal_fs.c
+endif
+
SRCS-y += test_alarm.c
SRCS-y += test_interrupts.c
SRCS-y += test_version.c
-SRCS-y += test_eal_fs.c
SRCS-y += test_func_reentrancy.c
-SRCS-y += test_cmdline.c
+
+SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_num.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_etheraddr.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_portlist.c
@@ -93,16 +111,21 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_ipaddr.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_cirbuf.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
+
+ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
SRCS-y += test_red.c
-SRCS-y += test_sched.c
-SRCS-y += test_meter.c
-SRCS-y += test_kni.c
-SRCS-y += test_power.c
+SRCS-$(CONFIG_RTE_ARCH_X86_64) += test_sched.c
+endif
+
+SRCS-$(CONFIG_RTE_LIBRTE_METER) += test_meter.c
+SRCS-$(CONFIG_RTE_LIBRTE_KNI) += test_kni.c
+SRCS-$(CONFIG_RTE_LIBRTE_POWER) += test_power.c
SRCS-y += test_common.c
-SRCS-y += test_timer_perf.c
-SRCS-y += test_ivshmem.c
-SRCS-y += test_distributor.c
-SRCS-y += test_distributor_perf.c
+SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += test_ivshmem.c
+
+SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor.c
+SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c
+
SRCS-y += test_devargs.c
SRCS-y += virtual_pmd.c
SRCS-y += packet_burst_generator.c
diff --git a/app/test/test_acl.c b/app/test/test_acl.c
index 4e7b470..c6b3f86 100644
--- a/app/test/test_acl.c
+++ b/app/test/test_acl.c
@@ -36,8 +36,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_ACL
-
#include <rte_string_fns.h>
#include <rte_mbuf.h>
#include <rte_byteorder.h>
@@ -934,4 +932,3 @@ static struct test_command acl_cmd = {
.callback = test_acl,
};
REGISTER_TEST_COMMAND(acl_cmd);
-#endif /* RTE_LIBRTE_ACL */
diff --git a/app/test/test_cmdline.c b/app/test/test_cmdline.c
index 9b8bd5c..2b5840f 100644
--- a/app/test/test_cmdline.c
+++ b/app/test/test_cmdline.c
@@ -36,7 +36,6 @@
#include "test.h"
#include "test_cmdline.h"
-#ifdef RTE_LIBRTE_CMDLINE
static int
test_cmdline(void)
{
@@ -95,4 +94,3 @@ static struct test_command cmdline_cmd = {
.callback = test_cmdline,
};
REGISTER_TEST_COMMAND(cmdline_cmd);
-#endif
diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index b29bef8..eca974d 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -33,7 +33,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_DISTRIBUTOR
#include <unistd.h>
#include <string.h>
#include <rte_cycles.h>
@@ -586,4 +585,3 @@ static struct test_command distributor_cmd = {
.callback = test_distributor,
};
REGISTER_TEST_COMMAND(distributor_cmd);
-#endif
diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index 8a6b855..849387d 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -33,7 +33,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_DISTRIBUTOR
#include <unistd.h>
#include <string.h>
#include <rte_cycles.h>
@@ -266,4 +265,3 @@ static struct test_command distributor_perf_cmd = {
.callback = test_distributor_perf,
};
REGISTER_TEST_COMMAND(distributor_perf_cmd);
-#endif
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 2d81764..21e6cca 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -35,7 +35,6 @@
#include "test.h"
-#ifndef RTE_EXEC_ENV_BAREMETAL
#include <string.h>
#include <stdarg.h>
#include <libgen.h>
@@ -1288,4 +1287,3 @@ static struct test_command eal_flags_cmd = {
.callback = test_eal_flags,
};
REGISTER_TEST_COMMAND(eal_flags_cmd);
-#endif
diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c
index 8d4edc1..cd41b3e 100644
--- a/app/test/test_eal_fs.c
+++ b/app/test/test_eal_fs.c
@@ -32,7 +32,6 @@
*/
#include "test.h"
-#ifndef RTE_EXEC_ENV_BAREMETAL
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -209,4 +208,3 @@ static struct test_command eal_fs_cmd = {
.callback = test_eal_fs,
};
REGISTER_TEST_COMMAND(eal_fs_cmd);
-#endif
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index ae3238b..178ec3f 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -52,8 +52,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_HASH
-
#include <rte_hash.h>
#include <rte_fbk_hash.h>
#include <rte_jhash.h>
@@ -1373,4 +1371,3 @@ static struct test_command hash_cmd = {
.callback = test_hash,
};
REGISTER_TEST_COMMAND(hash_cmd);
-#endif /* RTE_LIBRTE_HASH */
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index d3e9990..7bb7016 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -53,8 +53,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_HASH
-
#include <rte_hash.h>
#include <rte_fbk_hash.h>
#include <rte_jhash.h>
@@ -778,4 +776,3 @@ static struct test_command hash_perf_cmd = {
.callback = test_hash_perf,
};
REGISTER_TEST_COMMAND(hash_perf_cmd);
-#endif /* RTE_LIBRTE_HASH */
diff --git a/app/test/test_ivshmem.c b/app/test/test_ivshmem.c
index e759939..2996a86 100644
--- a/app/test/test_ivshmem.c
+++ b/app/test/test_ivshmem.c
@@ -43,8 +43,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_IVSHMEM
-
#include <rte_common.h>
#include <rte_ivshmem.h>
#include <rte_string_fns.h>
@@ -437,4 +435,3 @@ static struct test_command ivshmem_cmd = {
.callback = test_ivshmem,
};
REGISTER_TEST_COMMAND(ivshmem_cmd);
-#endif /* RTE_LIBRTE_IVSHMEM */
diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 60683d2..2860bf3 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -39,7 +39,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_KNI
#include <rte_string_fns.h>
#include <rte_mempool.h>
#include <rte_ethdev.h>
@@ -685,4 +684,3 @@ static struct test_command kni_cmd = {
.callback = test_kni,
};
REGISTER_TEST_COMMAND(kni_cmd);
-#endif /* RTE_LIBRTE_KNI */
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 087d97a..6d8823e 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -47,8 +47,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_LPM
-
#include "rte_lpm.h"
#include "test_lpm_routes.h"
@@ -1354,4 +1352,3 @@ static struct test_command lpm_cmd = {
.callback = test_lpm,
};
REGISTER_TEST_COMMAND(lpm_cmd);
-#endif /* RTE_LIBRTE_LPM */
diff --git a/app/test/test_lpm6.c b/app/test/test_lpm6.c
index bd99125..1f88d7a 100644
--- a/app/test/test_lpm6.c
+++ b/app/test/test_lpm6.c
@@ -41,8 +41,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_LPM
-
#include <rte_common.h>
#include <rte_cycles.h>
#include <rte_memory.h>
@@ -1925,4 +1923,3 @@ static struct test_command lpm6_cmd = {
.callback = test_lpm6,
};
REGISTER_TEST_COMMAND(lpm6_cmd);
-#endif /* RTE_LIBRTE_LPM */
diff --git a/app/test/test_meter.c b/app/test/test_meter.c
index 215cbf8..bc76391 100644
--- a/app/test/test_meter.c
+++ b/app/test/test_meter.c
@@ -39,8 +39,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_METER
-
#include <rte_cycles.h>
#include <rte_meter.h>
@@ -501,4 +499,3 @@ static struct test_command meter_cmd = {
.callback = test_meter,
};
REGISTER_TEST_COMMAND(meter_cmd);
-#endif /* RTE_LIBRTE_METER */
diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c
index 7579e20..95a12e2 100644
--- a/app/test/test_mp_secondary.c
+++ b/app/test/test_mp_secondary.c
@@ -35,7 +35,6 @@
#include "test.h"
-#ifndef RTE_EXEC_ENV_BAREMETAL
#include <stdint.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -270,4 +269,3 @@ static struct test_command multiprocess_cmd = {
.callback = test_mp_secondary,
};
REGISTER_TEST_COMMAND(multiprocess_cmd);
-#endif
diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c
index 6364495..7490112 100644
--- a/app/test/test_pmd_ring.c
+++ b/app/test/test_pmd_ring.c
@@ -32,8 +32,6 @@
*/
#include "test.h"
-#ifdef RTE_LIBRTE_PMD_RING
-
#include <stdio.h>
#include <rte_eth_ring.h>
@@ -450,5 +448,3 @@ static struct test_command ring_pmd_cmd = {
.callback = test_pmd_ring,
};
REGISTER_TEST_COMMAND(ring_pmd_cmd);
-#endif
-
diff --git a/app/test/test_power.c b/app/test/test_power.c
index 123b199..d9eb420 100644
--- a/app/test/test_power.c
+++ b/app/test/test_power.c
@@ -39,8 +39,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_POWER
-
#include <rte_power.h>
#define TEST_POWER_LCORE_ID 2U
@@ -482,5 +480,3 @@ static struct test_command power_cmd = {
.callback = test_power,
};
REGISTER_TEST_COMMAND(power_cmd);
-#endif /* RTE_LIBRTE_POWER */
-
diff --git a/app/test/test_red.c b/app/test/test_red.c
index 7cf2221..262df72 100644
--- a/app/test/test_red.c
+++ b/app/test/test_red.c
@@ -43,8 +43,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_SCHED
-
#include <rte_red.h>
#ifdef __INTEL_COMPILER
@@ -1889,4 +1887,3 @@ static struct test_command red_cmd = {
.callback = test_red,
};
REGISTER_TEST_COMMAND(red_cmd);
-#endif
diff --git a/app/test/test_sched.c b/app/test/test_sched.c
index 2cc9df5..ce47084 100644
--- a/app/test/test_sched.c
+++ b/app/test/test_sched.c
@@ -39,8 +39,6 @@
#include "test.h"
-#if defined(RTE_LIBRTE_SCHED) && defined(RTE_ARCH_X86_64)
-
#include <rte_cycles.h>
#include <rte_ether.h>
#include <rte_ip.h>
@@ -234,4 +232,3 @@ static struct test_command sched_cmd = {
.callback = test_sched,
};
REGISTER_TEST_COMMAND(sched_cmd);
-#endif /* RTE_LIBRTE_SCHED */
diff --git a/app/test/test_table.c b/app/test/test_table.c
index 33e2efc..c3093cc 100644
--- a/app/test/test_table.c
+++ b/app/test/test_table.c
@@ -31,9 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#ifdef RTE_LIBRTE_TABLE
-
#include <rte_byteorder.h>
#include <rte_hexdump.h>
#include <rte_string_fns.h>
@@ -212,4 +209,3 @@ static struct test_command table_cmd = {
.callback = test_table,
};
REGISTER_TEST_COMMAND(table_cmd);
-#endif
diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
index 5bcc8b8..dda0570 100644
--- a/app/test/test_table_acl.c
+++ b/app/test/test_table_acl.c
@@ -31,8 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef RTE_LIBRTE_ACL
-
#include <rte_hexdump.h>
#include "test_table.h"
#include "test_table_acl.h"
@@ -587,5 +585,3 @@ test_table_ACL(void)
return 0;
}
-
-#endif
diff --git a/app/test/test_table_combined.c b/app/test/test_table_combined.c
index 3380ff1..dd09da5 100644
--- a/app/test/test_table_combined.c
+++ b/app/test/test_table_combined.c
@@ -31,7 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef RTE_LIBRTE_TABLE
#include <string.h>
#include "test_table_combined.h"
#include "test_table.h"
@@ -780,5 +779,3 @@ test_table_hash32ext(void)
return 0;
}
-
-#endif
diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c
index 35644a6..70b1015 100644
--- a/app/test/test_table_pipeline.c
+++ b/app/test/test_table_pipeline.c
@@ -31,12 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RTE_LIBRTE_PIPELINE
-
-#include "test.h"
-
-#else
-
#include <string.h>
#include <rte_pipeline.h>
#include <rte_log.h>
@@ -599,5 +593,3 @@ test_table_pipeline(void)
return 0;
}
-
-#endif
diff --git a/app/test/test_table_ports.c b/app/test/test_table_ports.c
index e9d45b0..2532367 100644
--- a/app/test/test_table_ports.c
+++ b/app/test/test_table_ports.c
@@ -31,8 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef RTE_LIBRTE_TABLE
-
#include "test_table_ports.h"
#include "test_table.h"
@@ -220,5 +218,3 @@ test_port_ring_writer(void)
return 0;
}
-
-#endif
diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index da8338c..14add77 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -31,8 +31,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef RTE_LIBRTE_TABLE
-
#include <string.h>
#include <rte_byteorder.h>
#include <rte_table_lpm_ipv6.h>
@@ -903,5 +901,3 @@ test_table_hash_ext(void)
return 0;
}
-
-#endif
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index ec826c0..4b4800b 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -33,7 +33,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_TIMER
/*
* Timer
* =====
@@ -525,4 +524,3 @@ static struct test_command timer_cmd = {
.callback = test_timer,
};
REGISTER_TEST_COMMAND(timer_cmd);
-#endif
diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c
index da92473..3f7ddd3 100644
--- a/app/test/test_timer_perf.c
+++ b/app/test/test_timer_perf.c
@@ -33,7 +33,6 @@
#include "test.h"
-#ifdef RTE_LIBRTE_TIMER
#include <stdio.h>
#include <unistd.h>
#include <inttypes.h>
@@ -164,4 +163,3 @@ static struct test_command timer_perf_cmd = {
.callback = test_timer_perf,
};
REGISTER_TEST_COMMAND(timer_perf_cmd);
-#endif
--
1.7.10.4
^ permalink raw reply [flat|nested] 10+ messages in thread