test/rib: speed up rib6 autotests

Split slow part of rib6_autotest into rib6_slow_autotest

Fixes: abab6d2966dc ("test/rib: add IPv6 autotests")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
Vladimir Medvedkin 2019-11-06 12:21:47 +00:00 committed by David Marchand
parent 23f5fb667c
commit 82962b6abb
3 changed files with 26 additions and 3 deletions

View File

@ -128,6 +128,12 @@ parallel_test_list = [
"Func": default_autotest,
"Report": None,
},
{
"Name": "RIB6 slow autotest",
"Command": "rib6_slow_autotest",
"Func": default_autotest,
"Report": None,
},
{
"Name": "FIB autotest",
"Command": "fib_autotest",

View File

@ -271,6 +271,7 @@ perf_test_names = [
'member_perf_autotest',
'efd_perf_autotest',
'lpm6_perf_autotest',
'rib6_slow_autotest',
'fib6_slow_autotest',
'fib6_perf_autotest',
'rcu_qsbr_perf_autotest',

View File

@ -76,7 +76,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_rib6_create(__func__, SOCKET_ID_ANY, &config);
RTE_TEST_ASSERT(rib != NULL, "Failed to create RIB\n");
@ -334,7 +334,6 @@ static struct unit_test_suite rib6_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),
@ -344,6 +343,16 @@ static struct unit_test_suite rib6_tests = {
}
};
static struct unit_test_suite rib6_slow_tests = {
.suite_name = "rib6 slow autotest",
.setup = NULL,
.teardown = NULL,
.unit_test_cases = {
TEST_CASE(test_multiple_create),
TEST_CASES_END()
}
};
/*
* Do all unit tests.
*/
@ -353,5 +362,12 @@ test_rib6(void)
return unit_test_suite_runner(&rib6_tests);
}
REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
static int
test_slow_rib6(void)
{
return unit_test_suite_runner(&rib6_slow_tests);
}
REGISTER_TEST_COMMAND(rib6_autotest, test_rib6);
REGISTER_TEST_COMMAND(rib6_slow_autotest, test_slow_rib6);