test/crypto: fix device number
diff mbox series

Message ID 1596108017-7692-1-git-send-email-adwivedi@marvell.com
State Accepted
Delegated to: akhil goyal
Headers show
Series
  • test/crypto: fix device number
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ankur Dwivedi July 30, 2020, 11:20 a.m. UTC
In testsuite_setup(), ts_params is configured for first valid device.
The same device should be used as valid device in
test_device_configure_invalid_dev_id test case.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
Cc: stable@dpdk.org

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zhang, Roy Fan Aug. 26, 2020, 3:02 p.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ankur Dwivedi
> Sent: Thursday, July 30, 2020 12:20 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> anoobj@marvell.com; Ankur Dwivedi <adwivedi@marvell.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] test/crypto: fix device number
> 
> In testsuite_setup(), ts_params is configured for first valid device.
> The same device should be used as valid device in
> test_device_configure_invalid_dev_id test case.
> 
> Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> ---

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Akhil Goyal Oct. 6, 2020, 6:32 p.m. UTC | #2
> > Subject: [dpdk-dev] [PATCH] test/crypto: fix device number
> >
> > In testsuite_setup(), ts_params is configured for first valid device.
> > The same device should be used as valid device in
> > test_device_configure_invalid_dev_id test case.
> >
> > Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > ---
> 
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Applied to dpdk-next-crypto

Thanks.

Patch
diff mbox series

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 70bf6fe..c3e4649 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -755,7 +755,7 @@  struct crypto_unittest_params {
 			"Need at least %d devices for test", 1);
 
 	/* valid dev_id values */
-	dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1];
+	dev_id = ts_params->valid_devs[0];
 
 	/* Stop the device in case it's started so it can be configured */
 	rte_cryptodev_stop(dev_id);