X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_interrupts.c;h=371101f0885ef9dadd7b2819983602f736e98495;hb=f689586bc060aeb3f0ba038d34263c6b943ed31a;hp=322c218d6822aa7d5e2f5757ee2768c0047d1618;hpb=e9d48c0072d36eb6423b45fba4ec49d0def6c36f;p=dpdk.git diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index 322c218d68..371101f088 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -35,15 +35,13 @@ #include #include -#include - #include #include #include #include "test.h" -#define TEST_INTERRUPT_CHECK_INTERVAL 1000 /* ms */ +#define TEST_INTERRUPT_CHECK_INTERVAL 100 /* ms */ /* predefined interrupt handle types */ enum test_interrupt_handle_type { @@ -159,7 +157,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l, } #else -/* to be implemented for baremetal later */ +/* to be implemented for bsd later */ static inline int test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle) { @@ -374,7 +372,7 @@ test_interrupt_full_path_check(enum test_interrupt_handle_type intr_type) if (test_interrupt_trigger_interrupt() < 0) return -1; - /* check flag in 3 seconds */ + /* check flag */ for (count = 0; flag == 0 && count < 3; count++) rte_delay_ms(TEST_INTERRUPT_CHECK_INTERVAL); @@ -397,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; @@ -550,3 +548,4 @@ out: return ret; } +REGISTER_TEST_COMMAND(interrupt_autotest, test_interrupt);