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 48BA4A04AB; Mon, 31 Aug 2020 10:52:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2A2BF1C0AC; Mon, 31 Aug 2020 10:52:28 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id D5CBDA3; Mon, 31 Aug 2020 10:52:26 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5E75E1FB; Mon, 31 Aug 2020 01:52:26 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.210.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F323C3F68F; Mon, 31 Aug 2020 01:52:22 -0700 (PDT) From: Ruifeng Wang To: Declan Doherty , Fiona Trahe , John Griffin , Des O Dea , Sergio Gonzalez Monroy Cc: dev@dpdk.org, akhil.goyal@nxp.com, honnappa.nagarahalli@arm.com, nd@arm.com, Ruifeng Wang , stable@dpdk.org Date: Mon, 31 Aug 2020 16:51:43 +0800 Message-Id: <20200831085145.184179-2-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200831085145.184179-1-ruifeng.wang@arm.com> References: <20200831085145.184179-1-ruifeng.wang@arm.com> Subject: [dpdk-dev] [PATCH 1/3] test/crypto: fix stat test 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" ut_setup / ut_teardown are invoked for each test case by test framework. The call inside test_stats is unnecessary and even incorrect. This caused double free of objects such as crypto operation structure. Trapped the issue when RTE_LIBRTE_MEMPOOL_DEBUG was enabled. Fix issue by removing ut_setup / ut_teardown from test case implementation. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: declan.doherty@intel.com Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang --- app/test/test_cryptodev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 70bf6fe2c..068b8c9c1 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -9326,9 +9326,7 @@ test_stats(void) "rte_cryptodev_stats_get invalid Param failed"); /* Test expected values */ - ut_setup(); test_AES_CBC_HMAC_SHA1_encrypt_digest(); - ut_teardown(); TEST_ASSERT_SUCCESS(rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats), "rte_cryptodev_stats_get failed"); -- 2.17.1