> -----Original Message----- > From: Apeksha Gupta <[email protected]> > Sent: Thursday, May 14, 2020 1:19 AM > To: [email protected] > Cc: Ruifeng Wang <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; > [email protected]; [email protected]; Apeksha Gupta > <[email protected]> > Subject: [PATCH] app/test: Fix test_stats for dpaa_sec > > Test case test_stats should be unsupported for dpaa_sec and return - > ENOTSUP. > > Signed-off-by: Apeksha Gupta <[email protected]> > --- > app/test/test_cryptodev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index > c624018ee..5aafe52f1 100644 > --- a/app/test/test_cryptodev.c > +++ b/app/test/test_cryptodev.c > @@ -8821,6 +8821,8 @@ test_stats(void) > TEST_ASSERT((rte_cryptodev_stats_get(ts_params->valid_devs[0], > 0) != 0), > "rte_cryptodev_stats_get invalid Param failed"); > dev = &rte_cryptodevs[ts_params->valid_devs[0]]; > + if (dev->dev_ops->stats_get == 0) > + return -ENOTSUP;
There are two tests prior to this check. IMO, this check should be hoisted. What do you think? > temp_pfn = dev->dev_ops->stats_get; > dev->dev_ops->stats_get = (cryptodev_stats_get_t)0; > TEST_ASSERT((rte_cryptodev_stats_get(ts_params->valid_devs[0], > &stats) > -- > 2.17.1

