From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69684A325E for ; Mon, 21 Oct 2019 08:05:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51AEA2BA2; Mon, 21 Oct 2019 08:05:16 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6042029AC for ; Mon, 21 Oct 2019 08:05:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Oct 2019 23:05:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,322,1566889200"; d="scan'208";a="280870607" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 20 Oct 2019 23:05:10 -0700 From: yaobing To: dts@dpdk.org Cc: yaobing Date: Mon, 21 Oct 2019 14:10:21 +0800 Message-Id: <1571638221-86724-4-git-send-email-bingx.y.yao@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1571638221-86724-1-git-send-email-bingx.y.yao@intel.com> References: <1571638221-86724-1-git-send-email-bingx.y.yao@intel.com> Subject: [dts] [PATCH V1 4/4] tests/TestSuite_crypto_perf_cryptodev_perf: add cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" add cases Signed-off-by: yaobing --- 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