test/crypto: fix device number
authorAnkur Dwivedi <adwivedi@marvell.com>
Thu, 30 Jul 2020 11:20:17 +0000 (16:50 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 14 Oct 2020 19:06:56 +0000 (21:06 +0200)
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>
app/test/test_cryptodev.c

index 153d001..162c21d 100644 (file)
@@ -755,7 +755,7 @@ test_device_configure_invalid_dev_id(void)
                        "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);