Skip to contentSkip to conversation

test/crypto: reset device after asym tests

PATCH Applied Anoob Joseph 2 participants 2 messages Nov 11, 2022 – Nov 15, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/crypto: reset device after asym tests

Reset the crypto device after asym tests so that the state from asymmetric tests won't affect the tests executed later.

---
 app/test/test_cryptodev_asym.c | 6 ++++++
 1 file changed, 6 insertions(+)
app/test/test_cryptodev_asym.c +6 -0
index 9da54530e5..c58c7f488b 100644
@@ -904,6 +904,12 @@ testsuite_teardown(void)
 {
 	struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
 
+	/* Reset device */
+	ts_params->qp_conf.mp_session = NULL;
+	ts_params->conf.ff_disable = 0;
+	if (rte_cryptodev_configure(ts_params->valid_devs[0], &ts_params->conf))
+		RTE_LOG(DEBUG, USER1, "Could not reset cryptodev\n");
+
 	if (ts_params->op_mpool != NULL) {
 		RTE_LOG(DEBUG, USER1, "CRYPTO_OP_POOL count %u\n",
 		rte_mempool_avail_count(ts_params->op_mpool));
Signature · 1 line
2.25.1