From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH v2 1/2] test/test: free mempool on exit Date: Mon, 3 Apr 2017 14:30:01 +0530 Message-ID: <1491210002-9519-1-git-send-email-hemant.agrawal@nxp.com> References: <1490955469-16216-1-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , To: Return-path: In-Reply-To: <1490955469-16216-1-git-send-email-shreyansh.jain@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Shreyansh Jain mempool autotest was not freeing the mempools. Fixes: 8ef772ae ("app/test: rework mempool tes") Cc: stable@dpdk.org Signed-off-by: Shreyansh Jain --- test/test/test_mempool.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/test/test/test_mempool.c b/test/test/test_mempool.c index b9880b3..d863885 100644 --- a/test/test/test_mempool.c +++ b/test/test/test_mempool.c @@ -500,15 +500,10 @@ static int test_mempool_single_consumer(void) return 0; } -static void -walk_cb(struct rte_mempool *mp, void *userdata __rte_unused) -{ - printf("\t%s\n", mp->name); -} - static int test_mempool(void) { + int ret = -1; struct rte_mempool *mp_cache = NULL; struct rte_mempool *mp_nocache = NULL; struct rte_mempool *mp_stack = NULL; @@ -567,9 +562,6 @@ static int test_mempool_single_consumer(void) goto err; } - printf("Walk into mempools:\n"); - rte_mempool_walk(walk_cb, NULL); - rte_mempool_list_dump(stdout); /* basic tests without cache */ @@ -607,13 +599,14 @@ static int test_mempool_single_consumer(void) rte_mempool_list_dump(stdout); - return 0; + ret = 0; err: rte_mempool_free(mp_nocache); rte_mempool_free(mp_cache); rte_mempool_free(mp_stack); - return -1; + + return ret; } REGISTER_TEST_COMMAND(mempool_autotest, test_mempool); -- 1.9.1