From patchwork Wed Nov 17 08:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Dong X-Patchwork-Id: 104452 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 55303A0C41; Wed, 17 Nov 2021 09:55:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F40F41143; Wed, 17 Nov 2021 09:55:17 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id E71AA40040 for ; Wed, 17 Nov 2021 09:55:14 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10170"; a="320122650" X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="320122650" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 00:55:14 -0800 X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="586530751" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.106.73]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 00:55:11 -0800 From: DongJunX To: qinx.sun@intel.com, weix.ling@intel.com, yanx.xia@intel.com, yux.jiang@intel.com, zhiminx.huang@intel.com, hailinx.xu@intel.com, songx.jiale@intel.com Cc: dts@dpdk.org Subject: [dts] [PATCH V1 4/4] tests/*: removed makefile from test suite Date: Wed, 17 Nov 2021 16:54:44 +0800 Message-Id: <20211117085444.2254-4-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 In-Reply-To: <20211117085444.2254-1-junx.dong@intel.com> References: <20211117085444.2254-1-junx.dong@intel.com> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 Signed-off-by: DongJunX --- tests/TestSuite_compressdev_isal_pmd.py | 9 ---- tests/TestSuite_compressdev_qat_pmd.py | 7 --- tests/TestSuite_compressdev_zlib_pmd.py | 9 ---- tests/TestSuite_crypto_perf_cryptodev_perf.py | 10 ++--- tests/TestSuite_external_mempool_handler.py | 1 - tests/TestSuite_fips_cryptodev.py | 42 +++++++++--------- tests/TestSuite_ieee1588.py | 4 -- tests/TestSuite_ipsec_gw_cryptodev_func.py | 2 +- tests/TestSuite_kni.py | 6 --- tests/TestSuite_l2fwd_cryptodev_func.py | 2 +- tests/TestSuite_packet_capture.py | 9 ---- tests/TestSuite_pmd.py | 1 - tests/TestSuite_power_branch_ratio.py | 25 +++-------- tests/TestSuite_power_pbf.py | 13 +----- tests/TestSuite_power_telemetry.py | 16 +++---- tests/TestSuite_unit_tests_cryptodev_func.py | 2 +- tests/TestSuite_unit_tests_kni.py | 2 - tests/TestSuite_vhost_1024_ethports.py | 12 +---- .../TestSuite_virtio_ipsec_cryptodev_func.py | 6 --- tests/TestSuite_virtio_perf_cryptodev_func.py | 5 --- tests/TestSuite_virtio_unit_cryptodev_func.py | 2 - tests/TestSuite_vmdq_dcb.py | 2 - tests/cryptodev_common.py | 44 +------------------ 23 files changed, 42 insertions(+), 189 deletions(-) diff --git a/tests/TestSuite_compressdev_isal_pmd.py b/tests/TestSuite_compressdev_isal_pmd.py index 559c68de..93e41ca9 100644 --- a/tests/TestSuite_compressdev_isal_pmd.py +++ b/tests/TestSuite_compressdev_isal_pmd.py @@ -53,10 +53,6 @@ class TestCompressdevIsalPmd(TestCase): cc.default_opts = copy.deepcopy(self.opts) def prepare_dpdk(self): - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=n$/CONFIG_RTE_COMPRESSDEV_TEST=y/' config/common_base", "# ") - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ISAL=n$/CONFIG_RTE_LIBRTE_PMD_ISAL=y/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) def test_isal_pmd_unit_test(self): @@ -87,11 +83,6 @@ class TestCompressdevIsalPmd(TestCase): def tear_down_all(self): self.dut.kill_all() - - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=y$/CONFIG_RTE_COMPRESSDEV_TEST=n/' config/common_base", "# ") - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ISAL=y$/CONFIG_RTE_LIBRTE_PMD_ISAL=n/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) if not self._perf_result: diff --git a/tests/TestSuite_compressdev_qat_pmd.py b/tests/TestSuite_compressdev_qat_pmd.py index 38f0bff3..13b7bb57 100644 --- a/tests/TestSuite_compressdev_qat_pmd.py +++ b/tests/TestSuite_compressdev_qat_pmd.py @@ -55,8 +55,6 @@ class TestCompressdevQatPmd(TestCase): cc.default_opts = copy.deepcopy(self.opts) def prepare_dpdk(self): - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=n$/CONFIG_RTE_COMPRESSDEV_TEST=y/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) def get_perf_default_device(self, dev_num=3): @@ -153,11 +151,6 @@ class TestCompressdevQatPmd(TestCase): def tear_down_all(self): self.dut.kill_all() - - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=y$/CONFIG_RTE_COMPRESSDEV_TEST=n/' config/common_base", "# ") - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) if not self._perf_result: diff --git a/tests/TestSuite_compressdev_zlib_pmd.py b/tests/TestSuite_compressdev_zlib_pmd.py index f1b3d4c4..574a6061 100644 --- a/tests/TestSuite_compressdev_zlib_pmd.py +++ b/tests/TestSuite_compressdev_zlib_pmd.py @@ -54,10 +54,6 @@ class TestCompressdevZlibPmd(TestCase): cc.default_opts = copy.deepcopy(self.opts) def prepare_dpdk(self): - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=n$/CONFIG_RTE_COMPRESSDEV_TEST=y/' config/common_base", "# ") - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZLIB=n$/CONFIG_RTE_LIBRTE_PMD_ZLIB=y/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) def test_zlib_pmd_unit_test(self): @@ -88,11 +84,6 @@ class TestCompressdevZlibPmd(TestCase): def tear_down_all(self): self.dut.kill_all() - - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_COMPRESSDEV_TEST=y$/CONFIG_RTE_COMPRESSDEV_TEST=n/' config/common_base", "# ") - self.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZLIB=y$/CONFIG_RTE_LIBRTE_PMD_ZLIB=n/' config/common_base", "# ") self.dut.build_install_dpdk(self.dut.target) if not self._perf_result: diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py index 759c5186..39be86c1 100644 --- a/tests/TestSuite_crypto_perf_cryptodev_perf.py +++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py @@ -86,13 +86,9 @@ class PerfTestsCryptodev(TestCase): self.dut.session.copy_file_to(file, self.dut_file_dir) def tear_down_all(self): - cc.clear_dpdk_config(self) - - if not self._perf_result: - return - - with open(self.logger.log_path + "/" + "perf_cryptodev_result.json", "a") as fv: - json.dump(self._perf_result, fv, indent=4) + if self._perf_result: + with open(self.logger.log_path + "/" + "perf_cryptodev_result.json", "a") as fv: + json.dump(self._perf_result, fv, indent=4) def set_up(self): pass diff --git a/tests/TestSuite_external_mempool_handler.py b/tests/TestSuite_external_mempool_handler.py index cee22d0f..d747a9da 100644 --- a/tests/TestSuite_external_mempool_handler.py +++ b/tests/TestSuite_external_mempool_handler.py @@ -60,7 +60,6 @@ class TestExternalMempool(TestCase): pass def change_mempool_ops(self, ops=''): - self.dut.send_expect("sed -i 's/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=.*$/CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS=\"%s\"/' ./config/common_base" % ops, "# ") self.dut.set_build_options({'RTE_MBUF_DEFAULT_MEMPOOL_OPS': ops}) self.dut.build_install_dpdk(self.target) diff --git a/tests/TestSuite_fips_cryptodev.py b/tests/TestSuite_fips_cryptodev.py index 39b30c6a..8731b109 100644 --- a/tests/TestSuite_fips_cryptodev.py +++ b/tests/TestSuite_fips_cryptodev.py @@ -43,8 +43,8 @@ class FipCryptodev(TestCase): if not cc.is_build_skip(self): cc.build_dpdk_with_cryptodev(self) out = self.dut.build_dpdk_apps("./examples/fips_validation") - self.verify("Error"not in out,"Compilation error") - self.verify("No such"not in out,"Compilation error") + self.verify("Error"not in out, "Compilation error") + self.verify("No such"not in out, "Compilation error") self.vf_driver = self.get_suite_cfg()['vf_driver'] cc.bind_qat_device(self, "vfio-pci") self._app_path = self.dut.apps_name['fips_validation'] @@ -54,7 +54,7 @@ class FipCryptodev(TestCase): "cryptodev": None, "path-is-folder": "", "cryptodev-id": 0, - "self-test":"", + "self-test": "", } self.FIP_path = "/root/FIPS" @@ -65,7 +65,7 @@ class FipCryptodev(TestCase): self.dut.kill_all() def tear_down_all(self): - cc.clear_dpdk_config(self) + pass # Private functions def _get_fips_opt_str(self): @@ -86,14 +86,14 @@ class FipCryptodev(TestCase): def compare_resp_file(self,eal_opt_str,fips_opt_str): out = self._run_fips(eal_opt_str, fips_opt_str) check_out = out[out.index("Done"):] - self.verify("Error" not in check_out," req file error") + self.verify("Error" not in check_out, " req file error") rep_list = re.findall(r"FIPS/(.*)/req/(.*).req", out) for alog_name, file_name in rep_list: out = self.dut.send_expect("diff %s/%s/resp/%s.rsp %s/%s/fax/%s.rsp | grep -v '#' | grep -v '\---'" % ( self.FIP_path, alog_name, file_name, self.FIP_path, alog_name, file_name), "#") lines = re.split('\r\n', out) - self.verify(len(lines) <= 2, "%s.req file comparison failed!"%file_name) + self.verify(len(lines) <= 2, "%s.req file comparison failed!" % file_name) def test_fips_aesni_mb_aes(self): eal_opt_str = cc.get_eal_opt_str(self) @@ -121,72 +121,72 @@ class FipCryptodev(TestCase): self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_gcm(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_aes(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_3des(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_hmac(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_ccm(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_qat_cmac(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":None}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_openssl_gcm(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_openssl_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_openssl_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_openssl_aes(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_openssl_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_openssl_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_openssl_3des(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_openssl_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_openssl_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_openssl_hmac(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_openssl_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_openssl_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_openssl_ccm(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_openssl_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_openssl_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_aesni_gcm_gcm(self): - eal_opt_str = cc.get_eal_opt_str(self,{"vdev":"crypto_aesni_gcm_pmd_1"}) + eal_opt_str = cc.get_eal_opt_str(self, {"vdev": "crypto_aesni_gcm_pmd_1"}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_self_test(self): - eal_opt_str = cc.get_eal_opt_str(self,{"l":None,"n":None,}) + eal_opt_str = cc.get_eal_opt_str(self, {"l": None, "n": None}) fips_opt_str = self._get_fips_opt_str() self.compare_resp_file(eal_opt_str, fips_opt_str) def test_fips_broken_test(self): - eal_opt_str = cc.get_eal_opt_str(self,{"l":None,"n":None,}) - fips_opt_str = cc.get_opt_str(self, self._default_fips_opts,{"cryptodev-id":None, "broken-test-id":15, "broken-test-dir":"dec"}) + eal_opt_str = cc.get_eal_opt_str(self, {"l": None, "n": None}) + fips_opt_str = cc.get_opt_str(self, self._default_fips_opts, {"cryptodev-id": None, "broken-test-id": 15, "broken-test-dir": "dec"}) out = self._run_fips(eal_opt_str, fips_opt_str) self.verify("Failed init" in out, "test Failed!") diff --git a/tests/TestSuite_ieee1588.py b/tests/TestSuite_ieee1588.py index e17b1699..d61f2a53 100644 --- a/tests/TestSuite_ieee1588.py +++ b/tests/TestSuite_ieee1588.py @@ -55,8 +55,6 @@ class TestIeee1588(TestCase): self.verify(len(dutPorts) > 0, "No ports found for " + self.nic) # Change the config file to support IEEE1588 and recompile the package. - self.dut.send_expect( - "sed -i -e 's/IEEE1588=n$/IEEE1588=y/' config/common_base", "# ", 30) self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'y'}) self.dut.skip_setup = False self.dut.build_install_dpdk(self.target) @@ -173,7 +171,5 @@ class TestIeee1588(TestCase): self.dut.send_expect("quit", "# ", 30) # Restore the config file and recompile the package. - self.dut.send_expect( - "sed -i -e 's/IEEE1588=y$/IEEE1588=n/' config/common_base", "# ", 30) self.dut.set_build_options({'RTE_LIBRTE_IEEE1588': 'n'}) self.dut.build_install_dpdk(self.target) diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py index a5d6e775..bfdc1271 100644 --- a/tests/TestSuite_ipsec_gw_cryptodev_func.py +++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py @@ -97,7 +97,7 @@ class TestIPsecGW(TestCase): self.dut.kill_all() def tear_down_all(self): - cc.clear_dpdk_config(self) + pass def test_qat_aes_128_cbc_ipv4_tunnel(self): self._execute_ipsec_gw_test() diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 85289d37..151668c3 100644 --- a/tests/TestSuite_kni.py +++ b/tests/TestSuite_kni.py @@ -259,9 +259,6 @@ class TestKni(TestCase): out = self.dut.send_expect("which brctl", "# ") self.verify('no brctl' not in out, "The linux tool brctl is needed to run this test suite") - - self.dut.send_expect("sed -i -e 's/KNI_KMOD_ETHTOOL=n$/KNI_KMOD_ETHTOOL=y/' config/common_base", "# ", 30) - self.dut.send_expect("sed -i -e 's/CONFIG_RTE_KNI_KMOD=n$/CONFIG_RTE_KNI_KMOD=y/' config/common_base", "# ", 30) self.dut.build_install_dpdk(self.target) out = self.dut.build_dpdk_apps("./examples/kni") @@ -1225,9 +1222,6 @@ class TestKni(TestCase): """ Run after each test suite. """ - - self.dut.send_expect("sed -i -e 's/KNI_KMOD_ETHTOOL=y$/KNI_KMOD_ETHTOOL=n/' config/common_base", "# ", 30) self.dut.build_install_dpdk(self.target) - self.dut.kill_all() self.dut.send_expect("rmmod rte_kni", "# ", 10) diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fwd_cryptodev_func.py index 1e8ce549..1b9129af 100644 --- a/tests/TestSuite_l2fwd_cryptodev_func.py +++ b/tests/TestSuite_l2fwd_cryptodev_func.py @@ -438,7 +438,7 @@ class TestL2fwdCrypto(TestCase): self.dut.kill_all() def tear_down_all(self): - cc.clear_dpdk_config(self) + pass def __test_vector_to_cmd(self, test_vector, core_mask="", port_mask=""): cores = ','.join(self.core_list) diff --git a/tests/TestSuite_packet_capture.py b/tests/TestSuite_packet_capture.py index 4440c5f3..5ad7ed37 100644 --- a/tests/TestSuite_packet_capture.py +++ b/tests/TestSuite_packet_capture.py @@ -815,12 +815,7 @@ class TestPacketCapture(TestCase): not self.is_existed_on_crb(self.pdump_log, crb='tester'): cmd = "mkdir -p {0}".format(self.pdump_log) self.tester.alt_session.send_expect(cmd, "# ") - self.pcap_SW = "CONFIG_RTE_LIBRTE_PMD_PCAP" - self.SW_file = os.path.join(self.target_dir, 'config/common_base') if not (self.dut_skip_compile and self.check_pcap_lib()): - cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}".format( - self.pcap_SW, self.SW_file) - self.dut.alt_session.send_expect(cmd, "# ", 30) self.dut.skip_setup = False self.dut.build_install_dpdk(self.target) # secondary process (dpdk-pdump) @@ -879,10 +874,6 @@ class TestPacketCapture(TestCase): self.session_ex = None # Restore the config file and recompile the package. if self.check_pcap_lib(): - self.dut.alt_session.send_expect( - ("sed -i -e 's/{0}=y$/{0}=n/' " - "{1}").format(self.pcap_SW, self.SW_file), - "# ", 120) # temporary disable skip_setup skip_setup = self.dut.skip_setup self.dut.skip_setup = True diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index 52250023..98421765 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -75,7 +75,6 @@ class TestPmd(TestCase): self.blocklist = "" # Update config file and rebuild to get best perf on FVL - self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=y/' ./config/common_base", "#", 20) self.dut.build_install_dpdk(self.target) # Based on h/w type, choose how many ports to use diff --git a/tests/TestSuite_power_branch_ratio.py b/tests/TestSuite_power_branch_ratio.py index dee2cc11..7484d130 100644 --- a/tests/TestSuite_power_branch_ratio.py +++ b/tests/TestSuite_power_branch_ratio.py @@ -44,8 +44,7 @@ from pprint import pformat from framework.exception import VerifyFailure from framework.packet import Packet from framework.pktgen import TRANSMIT_CONT -from framework.qemu_libvirt import LibvirtKvm -from framework.settings import HEADER_SIZE, HOST_BUILD_TYPE_SETTING, load_global_setting +from framework.settings import HEADER_SIZE from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask @@ -224,15 +223,8 @@ class TestPowerBranchRatio(TestCase): return sw_table def preset_compilation(self): - if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): - compile_SWs = self.compile_switch + ["CONFIG_RTE_LIBRTE_I40E_PMD"] - self.dut.set_build_options(dict([(sw[7:], 'y') for sw in compile_SWs])) - else: - for sw in self.compile_switch: - cmd = ("sed -i -e " - "'s/{0}=n$/{0}=y/' " - "{1}/config/common_base").format(sw, self.target_dir) - self.d_a_con(cmd) + compile_SWs = self.compile_switch + ["CONFIG_RTE_LIBRTE_I40E_PMD"] + self.dut.set_build_options(dict([(sw[7:], 'y') for sw in compile_SWs])) # re-compile dpdk source code self.dut.build_install_dpdk(self.target) @@ -247,15 +239,8 @@ class TestPowerBranchRatio(TestCase): except Exception as e: self.logger.error(traceback.format_exc()) # restore compilation - if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): - self.dut.set_build_options( - dict([(sw[7:], 'n') for sw in self.compile_switch])) - else: - for sw in self.compile_switch: - cmd = ("sed -i -e " - "'s/{0}=y$/{0}=n/' " - "{1}/config/common_base").format(sw, self.target_dir) - self.d_a_con(cmd) + self.dut.set_build_options( + dict([(sw[7:], 'n') for sw in self.compile_switch])) # re-compile dpdk source code self.dut.build_install_dpdk(self.target) diff --git a/tests/TestSuite_power_pbf.py b/tests/TestSuite_power_pbf.py index 42d939cd..832f5c57 100644 --- a/tests/TestSuite_power_pbf.py +++ b/tests/TestSuite_power_pbf.py @@ -31,18 +31,14 @@ import json import os -import random import re import shutil import time import traceback + from collections import Counter from pprint import pformat - from framework.exception import VerifyFailure - -# import framework.dts as dts libs -from framework.settings import HOST_BUILD_TYPE_SETTING, load_global_setting from framework.test_case import TestCase from framework.utils import create_mask @@ -149,12 +145,7 @@ class TestPowerPbf(TestCase): self.create_powermonitor_folder() # open debug SW SW = "CONFIG_RTE_LIBRTE_POWER_DEBUG" - if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): - self.dut.set_build_options({SW[7:]: 'y'}) - else: - cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format( - SW, self.target_dir) - self.d_a_con(cmd) + self.dut.set_build_options({SW[7:]: 'y'}) self.dut.build_install_dpdk(self.target) # set up vm power management binary process setting self.vm_power_mgr = self.prepare_binary('vm_power_manager') diff --git a/tests/TestSuite_power_telemetry.py b/tests/TestSuite_power_telemetry.py index d8182ce2..dda942a4 100644 --- a/tests/TestSuite_power_telemetry.py +++ b/tests/TestSuite_power_telemetry.py @@ -45,7 +45,7 @@ from pprint import pformat from framework.exception import VerifyFailure from framework.packet import Packet from framework.pktgen import TRANSMIT_CONT -from framework.settings import HEADER_SIZE, HOST_BUILD_TYPE_SETTING, load_global_setting +from framework.settings import HEADER_SIZE from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask @@ -122,17 +122,11 @@ class TestPowerTelemetry(TestCase): return result def preset_compilation(self): - if self.dut.skip_setup: - return - SW = "CONFIG_RTE_LIBRTE_TELEMETRY" - if 'meson' == load_global_setting(HOST_BUILD_TYPE_SETTING): + if not self.dut.skip_setup: + SW = "CONFIG_RTE_LIBRTE_TELEMETRY" self.dut.set_build_options({SW[7:]: 'y'}) - else: - cmd = "sed -i -e 's/{0}=n$/{0}=y/' {1}/config/common_base".format( - SW, self.target_dir) - self.d_a_con(cmd) - # re-compile dpdk source code - self.dut.build_install_dpdk(self.target) + # re-compile dpdk source code + self.dut.build_install_dpdk(self.target) def prepare_binary(self, name): example_dir = "examples/" + name diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py index d2117255..02d1b092 100644 --- a/tests/TestSuite_unit_tests_cryptodev_func.py +++ b/tests/TestSuite_unit_tests_cryptodev_func.py @@ -51,7 +51,7 @@ class UnitTestsCryptodev(TestCase): self.dut.kill_all() def tear_down_all(self): - cc.clear_dpdk_config(self) + pass def _get_crypto_device(self, num): device = {} diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py index 5ad19d15..91283b8a 100644 --- a/tests/TestSuite_unit_tests_kni.py +++ b/tests/TestSuite_unit_tests_kni.py @@ -73,8 +73,6 @@ class TestUnitTestsKni(TestCase): KNI Prerequisites """ - self.dut.send_expect("sed -i -e 's/KNI_KMOD_ETHTOOL=n$/KNI_KMOD_ETHTOOL=y/' config/common_base", "# ", 30) - self.dut.send_expect("sed -i -e 's/CONFIG_RTE_KNI_KMOD=n$/CONFIG_RTE_KNI_KMOD=y/' config/common_base", "# ", 30) self.dut.set_build_options({'KNI_KMOD_ETHTOOL': 'y'}) self.dut.set_build_options({'RTE_KNI_KMOD': 'y'}) self.dut.build_install_dpdk(self.target) diff --git a/tests/TestSuite_vhost_1024_ethports.py b/tests/TestSuite_vhost_1024_ethports.py index 3b20f3e0..d2a643c2 100644 --- a/tests/TestSuite_vhost_1024_ethports.py +++ b/tests/TestSuite_vhost_1024_ethports.py @@ -65,18 +65,10 @@ class TestVhost1024Ethports(TestCase): self.vhost_user = self.dut.new_session(suite='vhost-user') def build_user_dpdk(self): - if self.dut.build_type == "meson": - self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=1024") - else: - self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=32$/CONFIG_RTE_MAX_ETHPORTS=1024/' config/common_base", '#', 30) - self.dut.build_install_dpdk(self.target) + self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=1024") def restore_dpdk(self): - if self.dut.build_type == "meson": - self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=32") - else: - self.dut.send_expect("sed -i 's/CONFIG_RTE_MAX_ETHPORTS=1024$/CONFIG_RTE_MAX_ETHPORTS=32/' config/common_base", '#', 30) - self.dut.build_install_dpdk(self.target) + self.dut.build_install_dpdk(self.target, extra_options="-Dmax_ethports=32") @property def check_2M_env(self): diff --git a/tests/TestSuite_virtio_ipsec_cryptodev_func.py b/tests/TestSuite_virtio_ipsec_cryptodev_func.py index c4f62b86..d5374209 100644 --- a/tests/TestSuite_virtio_ipsec_cryptodev_func.py +++ b/tests/TestSuite_virtio_ipsec_cryptodev_func.py @@ -96,10 +96,6 @@ class VirtioCryptodevIpsecTest(TestCase): return self.dut.send_expect(cmdline, ex, timout) def build_user_dpdk(self, user_dut): - user_dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y/' config/common_base", '#', 30) - user_dut.send_expect( - "sed -i 's/CONFIG_RTE_EAL_IGB_UIO=n/CONFIG_RTE_EAL_IGB_UIO=y/g' config/common_base", '#', 30) user_dut.set_build_options({'RTE_LIBRTE_PMD_AESNI_MB': 'y'}) user_dut.build_install_dpdk(self.target) user_dut.build_dpdk_apps("./examples/ipsec-secgw") @@ -371,5 +367,3 @@ class VirtioCryptodevIpsecTest(TestCase): self.dut.send_expect("killall -s INT %s" % self.app_name, "#") self.dut_execut_cmd("killall -s INT qemu-system-x86_64") self.dut_execut_cmd("rm -r /tmp/*") - - cc.clear_dpdk_config(self) diff --git a/tests/TestSuite_virtio_perf_cryptodev_func.py b/tests/TestSuite_virtio_perf_cryptodev_func.py index 92765675..f8b288c8 100644 --- a/tests/TestSuite_virtio_perf_cryptodev_func.py +++ b/tests/TestSuite_virtio_perf_cryptodev_func.py @@ -117,10 +117,6 @@ class VirtioCryptodevPerfTest(TestCase): return self.dut.send_expect(cmdline, ex, timout) def build_user_dpdk(self, user_dut): - user_dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y/' config/common_base", '#', 30) - user_dut.send_expect( - "sed -i 's/CONFIG_RTE_EAL_IGB_UIO=n/CONFIG_RTE_EAL_IGB_UIO=y/g' config/common_base", '#', 30) user_dut.set_build_options({'RTE_LIBRTE_PMD_AESNI_MB': 'y'}) user_dut.build_install_dpdk(self.target) @@ -257,4 +253,3 @@ class VirtioCryptodevPerfTest(TestCase): self.dut.send_expect("killall -s INT %s" % self.app_name, "#") self.dut_execut_cmd("killall -s INT qemu-system-x86_64") self.dut_execut_cmd("rm -r /tmp/*") - cc.clear_dpdk_config(self) diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index 6ccfef7f..fd5b30fe 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -202,5 +202,3 @@ class VirtioCryptodevUnitTest(TestCase): self.dut.send_expect("killall -s INT %s" % self.app_name, "#") self.dut_execut_cmd("killall -s INT qemu-system-x86_64") self.dut_execut_cmd("rm -r /tmp/*") - - cc.clear_dpdk_config(self) diff --git a/tests/TestSuite_vmdq_dcb.py b/tests/TestSuite_vmdq_dcb.py index b5714469..c7f60141 100644 --- a/tests/TestSuite_vmdq_dcb.py +++ b/tests/TestSuite_vmdq_dcb.py @@ -93,8 +93,6 @@ class TestVmdqDcb(TestCase): """ Rebuild dpdk """ - self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=.*$/CONFIG_RTE_LIBRTE_I40E_" - "QUEUE_NUM_PER_VM=%s/' ./config/common_base" % nb_queue_per_vm, "#", 20) self.dut.set_build_options({'RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM': nb_queue_per_vm}) self.dut.build_install_dpdk(self.target) diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py index e3c58cdc..2856e322 100644 --- a/tests/cryptodev_common.py +++ b/tests/cryptodev_common.py @@ -74,43 +74,20 @@ def build_dpdk_with_cryptodev(test_case): test_case.dut.send_expect( "export LD_LIBRARY_PATH={}".format(fip_library_path), "#") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_AESNI_MB': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_QAT_SYM': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_QAT_ASYM': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_AESNI_GCM': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_OPENSSL': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_SNOW3G=n$/CONFIG_RTE_LIBRTE_PMD_SNOW3G=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_SNOW3G': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_KASUMI=n$/CONFIG_RTE_LIBRTE_PMD_KASUMI=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_KASUMI': 'y'}) - - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZUC=n$/CONFIG_RTE_LIBRTE_PMD_ZUC=y/' config/common_base", "# ") test_case.dut.set_build_options({'RTE_LIBRTE_PMD_ZUC': 'y'}) test_case.dut.skip_setup = False test_case.dut.build_install_dpdk(test_case.dut.target) -def bind_qat_device(test_case, driver = "igb_uio"): +def bind_qat_device(test_case, driver="igb_uio"): if driver == 'vfio-pci': test_case.dut.send_expect('modprobe vfio', '#', 10) test_case.dut.send_expect('modprobe vfio-pci', '#', 10) @@ -168,25 +145,6 @@ def get_qat_devices(test_case, cpm_num=None, num=1): return dev_list -def clear_dpdk_config(test_case): - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=y$/CONFIG_RTE_LIBRTE_PMD_QAT_ASYM=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=y$/CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_OPENSSL=y$/CONFIG_RTE_LIBRTE_PMD_OPENSSL=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_SNOW3G=y$/CONFIG_RTE_LIBRTE_PMD_SNOW3G=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_KASUMI=y$/CONFIG_RTE_LIBRTE_PMD_KASUMI=n/' config/common_base", "# ") - test_case.dut.send_expect( - "sed -i 's/CONFIG_RTE_LIBRTE_PMD_ZUC=y$/CONFIG_RTE_LIBRTE_PMD_ZUC=n/' config/common_base", "# ") - - default_eal_opts = { "c": None, "l": None,