X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_interrupts.c;h=df6d26180c83dd5d5e67c60c36f2336066f407e0;hb=775a8cfc46969a4bb0e7206a2e7b2a630f2f0966;hp=4563e2b0e507a1619a4107bd770f447a01b23e6f;hpb=21a7f4e2646e1cb6b0dbd6643e5d64f72355af58;p=dpdk.git diff --git a/app/test/test_interrupts.c b/app/test/test_interrupts.c index 4563e2b0e5..df6d26180c 100644 --- a/app/test/test_interrupts.c +++ b/app/test/test_interrupts.c @@ -41,7 +41,7 @@ #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 { @@ -157,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) { @@ -372,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); @@ -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);