From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8608A04AB; Wed, 6 Nov 2019 13:21:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 677CD1C11B; Wed, 6 Nov 2019 13:21:53 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 931F81C117 for ; Wed, 6 Nov 2019 13:21:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 04:21:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,274,1569308400"; d="scan'208";a="196189321" Received: from silpixa00400072.ir.intel.com ([10.237.222.213]) by orsmga008.jf.intel.com with ESMTP; 06 Nov 2019 04:21:50 -0800 From: Vladimir Medvedkin To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, david.marchand@redhat.com Date: Wed, 6 Nov 2019 12:21:46 +0000 Message-Id: X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 1/2] test/rib: speed up rib autotests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Split slow part of rib_autotest into rib_slow_autotest Fixes: b35df4dd666e ("test/rib: add autotests") Signed-off-by: Vladimir Medvedkin --- app/test/autotest_data.py | 6 ++++++ app/test/meson.build | 1 + app/test/test_rib.c | 20 ++++++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index e89707e..ab150db 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -117,6 +117,12 @@ "Report": None, }, { + "Name": "RIB slow autotest", + "Command": "rib_slow_autotest", + "Func": default_autotest, + "Report": None, + }, + { "Name": "RIB6 autotest", "Command": "rib6_autotest", "Func": default_autotest, diff --git a/app/test/meson.build b/app/test/meson.build index 37ab9d2..8847d5a 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -259,6 +259,7 @@ perf_test_names = [ 'reciprocal_division', 'reciprocal_division_perf', 'lpm_perf_autotest', + 'rib_slow_autotest', 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', diff --git a/app/test/test_rib.c b/app/test/test_rib.c index c95957a..3dc48fe 100644 --- a/app/test/test_rib.c +++ b/app/test/test_rib.c @@ -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_rib_create(__func__, SOCKET_ID_ANY, &config); RTE_TEST_ASSERT(rib != NULL, "Failed to create RIB\n"); @@ -329,7 +329,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 +338,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 +357,11 @@ test_rib(void) return unit_test_suite_runner(&rib_tests); } +static int +test_slow_rib(void) +{ + return unit_test_suite_runner(&rib_slow_tests); +} + REGISTER_TEST_COMMAND(rib_autotest, test_rib); +REGISTER_TEST_COMMAND(rib_slow_autotest, test_slow_rib); -- 2.7.4