[dts] [PATCH V1] tests/crypto_perf_cryptodev_perf, cryptodev_common: optimize cryptodev test script
Tu, Lijuan
lijuan.tu at intel.com
Wed Jul 1 08:19:15 CEST 2020
Applied ,thanks
> -----Original Message-----
> From: dts <dts-bounces at dpdk.org> On Behalf Of Jiang, YuX
> Sent: 2020年7月1日 9:59
> To: dts at dpdk.org
> Cc: Jiang, YuX <yux.jiang at intel.com>
> Subject: [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf,
> cryptodev_common: optimize cryptodev test script
>
> From: "Jiang,yu" <yux.jiang at intel.com>
>
> optimize case's result which cryptodev perf does not support.
>
> Signed-off-by: Jiang,yu <yux.jiang at intel.com>
> ---
> tests/TestSuite_crypto_perf_cryptodev_perf.py | 8 +++++---
> tests/cryptodev_common.py | 4 ++--
> 2 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py
> b/tests/TestSuite_crypto_perf_cryptodev_perf.py
> index fc8f502..e1780f5 100644
> --- a/tests/TestSuite_crypto_perf_cryptodev_perf.py
> +++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py
> @@ -230,13 +230,13 @@ class PerfTestsCryptodev(TestCase):
>
> def _run_crypto_perf(self):
> if cc.is_test_skip(self):
> - return
> + return "skip"
>
> self.c_num, self.t_num = self._get_core_and_thread_num()
> devices = self._get_crypto_device(self.t_num)
> if not devices:
> self.logger.info("can not get device or unsupported, skip.")
> - return
> + return "skip"
>
> eal_opt_str = cc.get_eal_opt_str(self, devices)
> crypto_perf_opt_str = self._get_crypto_perf_opt_str() @@ -391,7 +391,9
> @@ class PerfTestsCryptodev(TestCase):
>
> def _run_crypto_perf_throughput(self):
> results = self._run_crypto_perf()
> -
> + if results == "skip":
> + return
> + self.verify(results, "test results is none, Test Failed")
> stats_results = self._stat_results_by_buf_size(results)
> json_result = []
>
> diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py index
> 832b3bf..23c7cd9 100644
> --- a/tests/cryptodev_common.py
> +++ b/tests/cryptodev_common.py
> @@ -138,7 +138,7 @@ def get_qat_devices(test_case, cpm_num=None,
> num=1):
> cpm_num = len(test_case.dev.keys())
> n, dev_list = 0, []
> if cpm_num > len(test_case.dev.keys()):
> - self.logger.warning("QAT card only {} cpm, but {} required".format(
> + test_case.logger.warning("QAT card only {} cpm, but {}
> + required".format(
> len(test_case.dev), cpm_num))
> return []
> for i in range(num):
> @@ -148,7 +148,7 @@ def get_qat_devices(test_case, cpm_num=None,
> num=1):
> if i < len(test_case.dev[cpm]):
> dev_list.append(test_case.dev[cpm][i])
> else:
> - self.logger.warning("not enough vf in cpm: {}".format(cpm))
> + test_case.logger.warning("not enough vf in cpm:
> + {}".format(cpm))
> n += 1
> return dev_list
>
> --
> 2.7.4
More information about the dts
mailing list