From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D28CDA0351; Fri, 4 Mar 2022 07:03:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC4EB40150; Fri, 4 Mar 2022 07:03:28 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CB4E34013F for ; Fri, 4 Mar 2022 07:03:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646373807; x=1677909807; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NBi+SGdf+6hxfwvjuaO6WYsqYJXyMvYU1kfapBY66yc=; b=NC9RIVwde+AaCnb9L/UxA0qcdQKS2CDhDI7k/YRc9+7k3WN/jDb886r0 2koZleUn/M4yqQj8LpdsZSmY+B6WYY/BK7/uaAX2lUvw8Z5p9zXUbNmvH CAzqmI+BFZcROaim1mPZ1mBvJB8elNuAgK1/inIJnS9VgAmNk1MF+auXK QsZrunj/uR60g5mthJ8YHQvOT5vVB78hY35FBvLkTZOYJsvgdE8co5AYT aDyonIW6z/wcByiMNQ6CWv/qGymjTwhJyLd+wO3UM7RacDEj13InZUivP Z5KJxSOo7Y3NzBEZLZTiSKj+B6/b08C/8LzYTtm5EHzt4h7+JI+rHiTfD A==; X-IronPort-AV: E=McAfee;i="6200,9189,10275"; a="253634485" X-IronPort-AV: E=Sophos;i="5.90,154,1643702400"; d="scan'208";a="253634485" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 22:03:14 -0800 X-IronPort-AV: E=Sophos;i="5.90,154,1643702400"; d="scan'208";a="546134034" Received: from shwdenpg197.ccr.corp.intel.com ([10.253.109.70]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 22:03:13 -0800 From: Jun Dong To: dts@dpdk.org Cc: lijuan.tu@intel.com, qingx.sun@intel.com, junx.dong@intel.com Subject: [dts] [V1] tests/*: Remove some makefile and change their related context Date: Fri, 4 Mar 2022 14:03:08 +0800 Message-Id: <20220304060308.5287-1-junx.dong@intel.com> X-Mailer: git-send-email 2.33.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Jun Dong --- tests/TestSuite_crypto_perf_cryptodev_perf.py | 3 - tests/TestSuite_external_mempool_handler.py | 25 ++--- tests/TestSuite_fips_cryptodev.py | 2 - tests/TestSuite_ipsec_gw_cryptodev_func.py | 2 - tests/TestSuite_l2fwd_cryptodev_func.py | 2 - tests/TestSuite_unit_tests_cryptodev_func.py | 2 - tests/TestSuite_unit_tests_kni.py | 5 - .../TestSuite_virtio_ipsec_cryptodev_func.py | 18 +--- tests/TestSuite_virtio_perf_cryptodev_func.py | 3 - tests/TestSuite_virtio_unit_cryptodev_func.py | 3 - tests/cryptodev_common.py | 94 ------------------- 11 files changed, 10 insertions(+), 149 deletions(-) diff --git a/tests/TestSuite_crypto_perf_cryptodev_perf.py b/tests/TestSuite_crypto_perf_cryptodev_perf.py index 39be86c1..1635652f 100644 --- a/tests/TestSuite_crypto_perf_cryptodev_perf.py +++ b/tests/TestSuite_crypto_perf_cryptodev_perf.py @@ -76,9 +76,6 @@ class PerfTestsCryptodev(TestCase): self.dut.send_expect('echo 0 > /sys/kernel/mm/hugepages/hugepages-%skB/nr_hugepages' % (page_size), '# ', 5) self.dut.send_expect('echo 16 > /sys/kernel/mm/hugepages/hugepages-%skB/nr_hugepages' % (page_size), '# ', 5) - if not cc.is_build_skip(self): - 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' diff --git a/tests/TestSuite_external_mempool_handler.py b/tests/TestSuite_external_mempool_handler.py index cee22d0f..bd3e0a09 100644 --- a/tests/TestSuite_external_mempool_handler.py +++ b/tests/TestSuite_external_mempool_handler.py @@ -59,13 +59,8 @@ 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) - - def verify_unit_func(self): - self.dut.send_expect("./%s -n 4 -c f" % self.app_test_path, "R.*T.*E.*>.*>", 60) + def verify_unit_func(self, ops=''): + self.dut.send_expect("./%s -n 4 -c f --mbuf-pool-ops-name %s" % (self.app_test_path, ops), "R.*T.*E.*>.*>", 60) out = self.dut.send_expect("mempool_autotest", "RTE>>", 120) self.dut.send_expect("quit", "# ") self.verify("Test OK" in out, "Mempool autotest failed") @@ -102,39 +97,35 @@ class TestExternalMempool(TestCase): """ Verify default mempool ops """ - self.verify_unit_func() + self.verify_unit_func(ops='ring_mp_mc') self.verify_app_func() def test_mempool_handler_sp_sc(self): """ Verify mempool single produce single customer ops """ - self.change_mempool_ops(ops='ring_sp_sc') - self.verify_unit_func() + self.verify_unit_func(ops='ring_sp_sc') self.verify_app_func() def test_mempool_handler_sp_mc(self): """ Verify mempool single produce multiple customer ops """ - self.change_mempool_ops(ops='ring_sp_mc') - self.verify_unit_func() + self.verify_unit_func(ops='ring_sp_mc') self.verify_app_func() def test_mempool_handler_mp_sc(self): """ Verify mempool multiple produce single customer ops """ - self.change_mempool_ops(ops='ring_mp_sc') - self.verify_unit_func() + self.verify_unit_func(ops='ring_mp_sc') self.verify_app_func() def test_mempool_handler_stack(self): """ Verify external mempool handler stack ops """ - self.change_mempool_ops(ops='stack') - self.verify_unit_func() + self.verify_unit_func(ops='stack') self.verify_app_func() def tear_down(self): @@ -148,4 +139,4 @@ class TestExternalMempool(TestCase): """ Run after each test suite. """ - self.change_mempool_ops(ops='ring_mp_mc') + pass diff --git a/tests/TestSuite_fips_cryptodev.py b/tests/TestSuite_fips_cryptodev.py index 29a71990..cf360f7c 100644 --- a/tests/TestSuite_fips_cryptodev.py +++ b/tests/TestSuite_fips_cryptodev.py @@ -40,8 +40,6 @@ from framework.test_case import TestCase class FipCryptodev(TestCase): def set_up_all(self): - 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") diff --git a/tests/TestSuite_ipsec_gw_cryptodev_func.py b/tests/TestSuite_ipsec_gw_cryptodev_func.py index ddeb3af5..60c1acd2 100644 --- a/tests/TestSuite_ipsec_gw_cryptodev_func.py +++ b/tests/TestSuite_ipsec_gw_cryptodev_func.py @@ -73,8 +73,6 @@ class TestIPsecGW(TestCase): self.logger.info("rx interface = " + self.rx_interface) self._app_path = self.dut.apps_name['ipsec-secgw'] - if not cc.is_build_skip(self): - cc.build_dpdk_with_cryptodev(self) out =self.dut.build_dpdk_apps("./examples/ipsec-secgw") self.verify("Error"not in out,"Compilation error") self.verify("No such"not in out,"Compilation error") diff --git a/tests/TestSuite_l2fwd_cryptodev_func.py b/tests/TestSuite_l2fwd_cryptodev_func.py index 1b9129af..bf72a603 100644 --- a/tests/TestSuite_l2fwd_cryptodev_func.py +++ b/tests/TestSuite_l2fwd_cryptodev_func.py @@ -80,8 +80,6 @@ class TestL2fwdCrypto(TestCase): self.logger.info("rx interface = " + self.rx_interface) self._app_path = self.dut.apps_name['l2fwd-crypto'] - if not cc.is_build_skip(self): - cc.build_dpdk_with_cryptodev(self) out = self.dut.build_dpdk_apps("./examples/l2fwd-crypto") self.verify("Error" not in out, "Compilation error") diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py index 02d1b092..e669ca28 100644 --- a/tests/TestSuite_unit_tests_cryptodev_func.py +++ b/tests/TestSuite_unit_tests_cryptodev_func.py @@ -40,8 +40,6 @@ class UnitTestsCryptodev(TestCase): def set_up_all(self): self._app_path = self.dut.apps_name['test'] - if not cc.is_build_skip(self): - cc.build_dpdk_with_cryptodev(self) cc.bind_qat_device(self, "vfio-pci") def set_up(self): diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py index 5ad19d15..cbfbf381 100644 --- a/tests/TestSuite_unit_tests_kni.py +++ b/tests/TestSuite_unit_tests_kni.py @@ -73,11 +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) self.cores = self.dut.get_core_list("all") self.insmod_kni() diff --git a/tests/TestSuite_virtio_ipsec_cryptodev_func.py b/tests/TestSuite_virtio_ipsec_cryptodev_func.py index c4f62b86..7c4623ac 100644 --- a/tests/TestSuite_virtio_ipsec_cryptodev_func.py +++ b/tests/TestSuite_virtio_ipsec_cryptodev_func.py @@ -77,9 +77,6 @@ class VirtioCryptodevIpsecTest(TestCase): self.sriov_port = self.bind_vfio_pci() - if not cc.is_build_skip(self): - self.dut.skip_setup = False - cc.build_dpdk_with_cryptodev(self) cc.bind_qat_device(self, self.drivername) self.dut.build_dpdk_apps("./examples/vhost_crypto") self.bind_vfio_pci() @@ -95,15 +92,6 @@ class VirtioCryptodevIpsecTest(TestCase): def dut_execut_cmd(self, cmdline, ex='#', timout=30): 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") - def get_vhost_eal(self): default_eal_opts = { "c": None, @@ -231,8 +219,8 @@ class VirtioCryptodevIpsecTest(TestCase): self.dut.skip_setup = skip_setup vm_dut.restore_interfaces() - if not self.dut.skip_setup: - self.build_user_dpdk(vm_dut) + vm_dut.build_dpdk_apps("./examples/ipsec-secgw") + vm_dut.setup_modules(self.target, self.drivername, None) vm_dut.bind_interfaces_linux(self.drivername) vm.virtio_list = self.set_virtio_pci(vm_dut) @@ -371,5 +359,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 65045622..45c449d4 100644 --- a/tests/TestSuite_virtio_perf_cryptodev_func.py +++ b/tests/TestSuite_virtio_perf_cryptodev_func.py @@ -84,9 +84,6 @@ class VirtioCryptodevPerfTest(TestCase): self.cores = self.dut.get_core_list("1S/3C/1T") self.mem_channel = self.dut.get_memory_channels() - if not cc.is_build_skip(self): - self.dut.skip_setup = False - cc.build_dpdk_with_cryptodev(self) self.dut.build_dpdk_apps("./examples/vhost_crypto") cc.bind_qat_device(self, self.drivername) diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index fd5b30fe..57277adb 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -56,9 +56,6 @@ class VirtioCryptodevUnitTest(TestCase): self.cores = self.dut.get_core_list("1S/3C/1T") self.mem_channel = self.dut.get_memory_channels() - if not cc.is_build_skip(self): - self.dut.skip_setup = False - cc.build_dpdk_with_cryptodev(self) cc.bind_qat_device(self, self.drivername) self.dut.build_dpdk_apps("./examples/vhost_crypto") diff --git a/tests/cryptodev_common.py b/tests/cryptodev_common.py index e3c58cdc..dfd8016c 100644 --- a/tests/cryptodev_common.py +++ b/tests/cryptodev_common.py @@ -35,81 +35,6 @@ from nics.net_device import GetNicObj conf = SuiteConf('cryptodev_sample') -def build_dpdk_with_cryptodev(test_case): - # Rebuild the dpdk with cryptodev pmds - snow3g_lib_path = "/root/libsso_snow3g/snow3g/" - if "snow3g_lib_path" in conf.suite_cfg: - snow3g_lib_path = conf.suite_cfg["snow3g_lib_path"] - - zuc_lib_path = "/root/libsso_zuc.1.0.1.1-8/zuc" - if "zuc_lib_path" in conf.suite_cfg: - zuc_lib_path = conf.suite_cfg["zuc_lib_path"] - - kasumi_lib_path = "/root/LibSSO_0_3_1/isg_cid-wireless_libs/ciphers/kasumi/" - if "kasumi_lib_path" in conf.suite_cfg: - kasumi_lib_path = conf.suite_cfg["kasumi_lib_path"] - - fip_cflags_path = "'-I/opt/openssl-fips-2.0.16/include/'" - if "fip_cflags_path" in conf.suite_cfg: - fip_cflags_path = conf.suite_cfg["fip_cflags_path"] - - fip_ldflags_path = "'-L/opt/openssl-fips-2.0.16/'" - if "fip_ldflags_path" in conf.suite_cfg: - fip_cflags_path = conf.suite_cfg["fip_ldflags_path"] - - fip_library_path = "/opt/openssl-fips-2.0.16/" - if "fip_library_path" in conf.suite_cfg: - fip_cflags_path = conf.suite_cfg["fip_library_path"] - - test_case.dut.send_expect( - "export LIBSSO_SNOW3G_PATH={}".format(snow3g_lib_path), "#") - test_case.dut.send_expect( - "export LIBSSO_ZUC_PATH={}".format(zuc_lib_path), "#") - test_case.dut.send_expect( - "export LIBSSO_KASUMI_PATH={}".format(kasumi_lib_path), "#") - test_case.dut.send_expect( - "export EXTRA_CFLAGS={}".format(fip_cflags_path), "#") - test_case.dut.send_expect( - "export EXTRA_LDFLAGS={}".format(fip_ldflags_path), "#") - 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"): if driver == 'vfio-pci': test_case.dut.send_expect('modprobe vfio', '#', 10) @@ -168,25 +93,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, -- 2.33.1.windows.1