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 91359A0513; Thu, 4 Jun 2020 02:56:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E35541D5AD; Thu, 4 Jun 2020 02:56:15 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3E9CD1D585 for ; Thu, 4 Jun 2020 02:56:14 +0200 (CEST) IronPort-SDR: yeI+w0U+OZSq7+JHcE5Vj0lTwmt9FNKpGWJ6EfUpYpG4KIzkdZxnzciYCQ4WXRbZNveULd8YjA xR6E9zGQYXMA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 17:56:13 -0700 IronPort-SDR: yXPyYX484BF9Stqk6v59h/ODjBwVahtT0D98bNIRs9Y8jty7mEj2DQqRUIoIM1m5ZxkkTGebYl 77ADApQe9G2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,470,1583222400"; d="scan'208";a="269251947" Received: from unknown (HELO dpdk-xinfengx-dut.sh.intel.com) ([10.67.117.16]) by orsmga003.jf.intel.com with ESMTP; 03 Jun 2020 17:56:12 -0700 From: xinfengx To: dts@dpdk.org Cc: xinfengx Date: Thu, 4 Jun 2020 08:54:45 +0800 Message-Id: <20200604005445.110297-7-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200604005445.110297-1-xinfengx.zhao@intel.com> References: <20200604005445.110297-1-xinfengx.zhao@intel.com> Subject: [dts] [PATCH V1 6/6] tests/unit_tests_cryptodev_func: rework cryptodev unit test script 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" rework cryptodev unit test script remove the redundant code Signed-off-by: xinfengx --- tests/TestSuite_unit_tests_cryptodev_func.py | 56 ++++++++------------ 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py index a370fc4..e990192 100644 --- a/tests/TestSuite_unit_tests_cryptodev_func.py +++ b/tests/TestSuite_unit_tests_cryptodev_func.py @@ -54,77 +54,63 @@ class UnitTestsCryptodev(TestCase): cc.clear_dpdk_config(self) def test_cryptodev_qat_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_qat_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_qat_autotest") def test_cryptodev_qat_asym_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_qat_asym_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_qat_asym_autotest") def _test_cryptodev_qat_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_qat_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_qat_perftest") def _test_cryptodev_qat_continual_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_qat_continual_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_qat_continual_perftest") def _test_cryptodev_qat_snow3g_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_qat_snow3g_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_qat_snow3g_perftest") def test_cryptodev_aesni_mb_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_aesni_mb_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_aesni_mb_autotest") def _test_cryptodev_aesni_mb_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_aesni_mb_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_aesni_mb_perftest") def test_cryptodev_aesni_gcm_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_aesni_gcm_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_aesni_gcm_autotest") def _test_cryptodev_aesni_gcm_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_aesni_gcm_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_aesni_gcm_perftest") def test_cryptodev_sw_snow3g_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_sw_snow3g_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_sw_snow3g_autotest") def _test_cryptodev_sw_snow3g_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_sw_snow3g_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_sw_snow3g_perftest") def test_cryptodev_sw_kasumi_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_sw_kasumi_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_sw_kasumi_autotest") def test_cryptodev_sw_zuc_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_sw_zuc_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_sw_zuc_autotest") def test_cryptodev_null_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_null_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_null_autotest") def test_cryptodev_openssl_autotest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_openssl_autotest", eal_opt_str) + self.__run_unit_test("cryptodev_openssl_autotest") def _test_cryptodev_openssl_perftest(self): - eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_openssl_perftest", eal_opt_str) + self.__run_unit_test("cryptodev_openssl_perftest") def test_cryptodev_scheduler_autotest(self): + self.__run_unit_test("cryptodev_scheduler_autotest") + + def __run_unit_test(self, testsuite, timeout=600): eal_opt_str = cc.get_eal_opt_str(self) - self.__run_unit_test("cryptodev_scheduler_autotest", eal_opt_str) + w = cc.get_qat_devices(self, num=1) - def __run_unit_test(self, testsuite, eal_opt_str, timeout=600): self.logger.info("STEP_TEST: " + testsuite) self.dut.send_expect("dmesg -C", "# ", 30) - cmd_str = cc.get_dpdk_app_cmd_str(self._app_path, eal_opt_str) + cmd_str = cc.get_dpdk_app_cmd_str(self._app_path, eal_opt_str + " --log-level=6 -w %s" % w[0]) self.dut.send_expect(cmd_str, "RTE>>", 30) out = "" -- 2.17.1