diff mbox series

[v3,1/2] test/crypto: close PMD after tests

Message ID 20210409121301.57789-2-adamx.dybkowski@intel.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers show
Series test/crypto: close PMD after tests | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Adam Dybkowski April 9, 2021, 12:13 p.m. UTC
This patch adds closing of the PMD after running the tests.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test/test_cryptodev.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index f91debc168..d68855c442 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -842,6 +842,7 @@  static void
 testsuite_teardown(void)
 {
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	int res;
 
 	if (ts_params->mbuf_pool != NULL) {
 		RTE_LOG(DEBUG, USER1, "CRYPTO_MBUFPOOL count %u\n",
@@ -863,6 +864,10 @@  testsuite_teardown(void)
 		rte_mempool_free(ts_params->session_mpool);
 		ts_params->session_mpool = NULL;
 	}
+
+	res = rte_cryptodev_close(ts_params->valid_devs[0]);
+	if (res)
+		RTE_LOG(ERR, USER1, "Crypto device close error %d\n", res);
 }
 
 static int