X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_rib.c;h=06058f8f7c52a9260c17da9c95f834c7e8c441ad;hb=81c2337e044dc16f1d93745d2a1668cdebc37c81;hp=c95957a4745b46120e5f4dab01fe7d8298a2950b;hpb=b35df4dd666ea7ef365d7f55824602b07512c660;p=dpdk.git diff --git a/app/test/test_rib.c b/app/test/test_rib.c index c95957a474..06058f8f7c 100644 --- a/app/test/test_rib.c +++ b/app/test/test_rib.c @@ -3,14 +3,31 @@ * Copyright(c) 2019 Intel Corporation */ +#include "test.h" + #include #include #include #include -#include -#include "test.h" +#ifdef RTE_EXEC_ENV_WINDOWS +static int +test_rib(void) +{ + printf("rib not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} + +static int +test_slow_rib(void) +{ + printf("slow_rib not supported on Windows, skipping test\n"); + return TEST_SKIPPED; +} +#else + +#include typedef int32_t (*rte_rib_test)(void); @@ -76,7 +93,7 @@ test_multiple_create(void) config.ext_sz = 0; - for (i = 0; i < 10; i++) { + for (i = 0; i < 100; i++) { config.max_nodes = MAX_RULES - i; rib = rte_rib_create(__func__, SOCKET_ID_ANY, &config); RTE_TEST_ASSERT(rib != NULL, "Failed to create RIB\n"); @@ -329,7 +346,6 @@ static struct unit_test_suite rib_tests = { .teardown = NULL, .unit_test_cases = { TEST_CASE(test_create_invalid), - TEST_CASE(test_multiple_create), TEST_CASE(test_free_null), TEST_CASE(test_insert_invalid), TEST_CASE(test_get_fn), @@ -339,6 +355,16 @@ static struct unit_test_suite rib_tests = { } }; +static struct unit_test_suite rib_slow_tests = { + .suite_name = "rib slow autotest", + .setup = NULL, + .teardown = NULL, + .unit_test_cases = { + TEST_CASE(test_multiple_create), + TEST_CASES_END() + } +}; + /* * Do all unit tests. */ @@ -348,4 +374,13 @@ test_rib(void) return unit_test_suite_runner(&rib_tests); } +static int +test_slow_rib(void) +{ + return unit_test_suite_runner(&rib_slow_tests); +} + +#endif /* !RTE_EXEC_ENV_WINDOWS */ + REGISTER_TEST_COMMAND(rib_autotest, test_rib); +REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib);