DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: Declan Doherty <declan.doherty@intel.com>,
	Fiona Trahe <fiona.trahe@intel.com>,
	John Griffin <john.griffin@intel.com>,
	Des O Dea <des.j.o.dea@intel.com>,
	Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Cc: dev@dpdk.org, akhil.goyal@nxp.com, honnappa.nagarahalli@arm.com,
	nd@arm.com, Ruifeng Wang <ruifeng.wang@arm.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/3] test/crypto: fix stat test
Date: Mon, 31 Aug 2020 16:51:43 +0800	[thread overview]
Message-ID: <20200831085145.184179-2-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20200831085145.184179-1-ruifeng.wang@arm.com>

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 <ruifeng.wang@arm.com>
---
 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


  reply	other threads:[~2020-08-31  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31  8:51 [dpdk-dev] [PATCH 0/3] armv8 crypto PMD Ruifeng Wang
2020-08-31  8:51 ` Ruifeng Wang [this message]
2020-09-01  9:46   ` [dpdk-dev] [PATCH 1/3] test/crypto: fix stat test Dybkowski, AdamX
2020-08-31  8:51 ` [dpdk-dev] [PATCH 2/3] crypto/armv8: fix mempool object returning Ruifeng Wang
2020-08-31  8:51 ` [dpdk-dev] [PATCH 3/3] crypto/armv8: move to cryptodev test suite Ruifeng Wang
2020-10-08 21:05 ` [dpdk-dev] [PATCH 0/3] armv8 crypto PMD Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200831085145.184179-2-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=des.j.o.dea@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=john.griffin@intel.com \
    --cc=nd@arm.com \
    --cc=sergio.gonzalez.monroy@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).