From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: [PATCH] test/crypto: fix the devid testcases Date: Wed, 4 Jul 2018 15:19:38 +0530 Message-ID: <1530697778-1598-1-git-send-email-hemant.agrawal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org, stable@dpdk.org, declan.doherty@intel.com To: pablo.de.lara.guarch@intel.com Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" devid is valid, while ts_params->valid_devs[devid] may result a different value in case multiple devices are present and any of the device is being used. Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests") Cc: stable@dpdk.org Cc: declan.doherty@intel.com Signed-off-by: Hemant Agrawal --- test/test/test_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c index 389f796..e252fee 100644 --- a/test/test/test_cryptodev.c +++ b/test/test/test_cryptodev.c @@ -585,7 +585,7 @@ test_device_configure_invalid_dev_id(void) dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1]; /* Stop the device in case it's started so it can be configured */ - rte_cryptodev_stop(ts_params->valid_devs[dev_id]); + rte_cryptodev_stop(dev_id); TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf), "Failed test for rte_cryptodev_configure: " -- 2.7.4