test suite reviews and discussions
 help / color / Atom feed
From: "Jiang, YuX" <yux.jiang@intel.com>
To: dts@dpdk.org
Cc: "Jiang,yu" <yux.jiang@intel.com>
Subject: [dts] [PATCH V1] tests/crypto_perf_cryptodev_perf, cryptodev_common: optimize cryptodev test script
Date: Wed,  1 Jul 2020 09:59:29 +0800
Message-ID: <1593568769-343083-1-git-send-email-yux.jiang@intel.com> (raw)

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


             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  1:59 Jiang, YuX [this message]
2020-07-01  2:25 ` Jiang, YuX
2020-07-01  6:19 ` Tu, Lijuan

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593568769-343083-1-git-send-email-yux.jiang@intel.com \
    --to=yux.jiang@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox