test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf, cryptodev_common: optimize cryptodev test script
@ 2020-07-01  1:59 Jiang, YuX
  2020-07-01  2:25 ` Jiang, YuX
  2020-07-01  6:19 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Jiang, YuX @ 2020-07-01  1:59 UTC (permalink / raw)
  To: dts; +Cc: Jiang,yu

From: "Jiang,yu" <yux.jiang@intel.com>

optimize case's result which cryptodev perf does not support.

Signed-off-by: Jiang,yu <yux.jiang@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-01  6:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01  1:59 [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf, cryptodev_common: optimize cryptodev test script Jiang, YuX
2020-07-01  2:25 ` Jiang, YuX
2020-07-01  6:19 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).