test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Wan, Zhe" <zhe.wan@intel.com>
To: "Yao, BingX Y" <bingx.y.yao@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Yao, BingX Y" <bingx.y.yao@intel.com>
Subject: Re: [dts] [PATCH V1 4/4] tests/TestSuite_crypto_perf_cryptodev_perf:	add cases
Date: Mon, 21 Oct 2019 07:40:40 +0000	[thread overview]
Message-ID: <861C16A15685B44AA870C0D2A97B60458A26C3ED@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1571638221-86724-4-git-send-email-bingx.y.yao@intel.com>

Acked-by: Wan, Zhe <zhe.wan@intel.com>




Thanks!
BR,
Wan,Zhe

-----Original Message-----
From: dts <dts-bounces@dpdk.org> On Behalf Of yaobing
Sent: 2019年10月21日 14:10
To: dts@dpdk.org
Cc: Yao, BingX Y <bingx.y.yao@intel.com>
Subject: [dts] [PATCH V1 4/4] tests/TestSuite_crypto_perf_cryptodev_perf: add cases

add cases

Signed-off-by: yaobing <bingx.y.yao@intel.com>
---
 tests/TestSuite_crypto_perf_cryptodev_perf.py | 107 ++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py
index 38b959f..6b0fffb 100644
--- a/tests/TestSuite_crypto_perf_cryptodev_perf.py
+++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py
@@ -75,6 +75,10 @@ class PerfTestsCryptodev(TestCase):
             cc.build_dpdk_with_cryptodev(self)
 
         cc.bind_qat_device(self, "vfio-pci")
+        src_files = ['dep/test_aes_cbc.data', 'dep/test_aes_gcm.data']
+        self.dut_file_dir = '/tmp'
+        for file in src_files:
+            self.dut.session.copy_file_to(file, self.dut_file_dir)
 
     def tear_down_all(self):
         cc.clear_dpdk_config(self)
@@ -91,6 +95,109 @@ class PerfTestsCryptodev(TestCase):
     def tear_down(self):
         self.dut.kill_all()
 
+    def _run_func(self, eal_opt_str, crypto_func_opt_str, case_name):
+        cmd_str = cc.get_dpdk_app_cmd_str(self._app_path,
+                                          eal_opt_str,
+                                          crypto_func_opt_str)
+        self.logger.info(cmd_str)
+        try:
+            out = self.dut.send_expect(cmd_str+">%s/%s.txt" % (self.dut_file_dir, case_name), "#", 600)
+        except Exception as ex:
+            self.logger.error(ex)
+            raise ex
+        out = self.dut.send_expect("cat %s/%s.txt | grep fail" % (self.dut_file_dir, case_name), "#")
+        return out
+
+    def test_verify_aesni_mb(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_verify_aesni_mb")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_verify_qat(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_verify_qat")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_verify_openssl_qat(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_verify_openssl_qat")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_verify_openssl(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_verify_openssl")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_latency_qat(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_latency_qat")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_latency_auth_qat(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_latency_auth_qat")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_latency_aead_qat(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_latency_aead_qat")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_latency_aesni_gcm(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str, crypto_func_opt_str, "test_latency_aesni_gcm")
+        self.verify(len(out) == 0, "Test function failed")
+
+    def test_latency_auth_aesni_mb(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str,crypto_func_opt_str,"test_latency_auth_aesni_mb")
+        self.verify(len(out) ==0 , "Test function failed")
+
+    def test_latency_aesni_mb(self):
+        if cc.is_test_skip(self):
+            return
+
+        eal_opt_str = cc.get_eal_opt_str(self)
+        crypto_func_opt_str = self._get_crypto_perf_opt_str()
+        out = self._run_func(eal_opt_str,crypto_func_opt_str,"test_latency_aesni_mb")
+        self.verify(len(out) ==0 , "Test function failed")
+
     def test_qat_aes_cbc_sha1_hmac(self):
         if cc.is_test_skip(self):
             return
-- 
2.17.2


  reply	other threads:[~2019-10-21  7:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  6:10 [dts] [PATCH V1 1/4] add file to crypto_perf yaobing
2019-10-21  6:10 ` [dts] [PATCH V1 2/4] " yaobing
2019-10-21  7:39   ` Wan, Zhe
2019-10-21  7:44   ` Yao, BingX Y
2019-10-21  6:10 ` [dts] [PATCH V1 3/4] add config " yaobing
2019-10-21  7:40   ` Wan, Zhe
2019-10-21  7:45   ` Yao, BingX Y
2019-10-21  6:10 ` [dts] [PATCH V1 4/4] tests/TestSuite_crypto_perf_cryptodev_perf: add cases yaobing
2019-10-21  7:40   ` Wan, Zhe [this message]
2019-10-21  7:45   ` Yao, BingX Y
2019-10-21  7:39 ` [dts] [PATCH V1 1/4] add file to crypto_perf Wan, Zhe
2019-10-21  7:42   ` Yao, BingX Y
2019-10-23  9:54 ` Tu, Lijuan

Reply instructions:

You may reply publicly 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=861C16A15685B44AA870C0D2A97B60458A26C3ED@SHSMSX103.ccr.corp.intel.com \
    --to=zhe.wan@intel.com \
    --cc=bingx.y.yao@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).