From: Jun Dong <junx.dong@intel.com>
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 [thread overview]
Message-ID: <20220304060308.5287-1-junx.dong@intel.com> (raw)
Signed-off-by: Jun Dong <junx.dong@intel.com>
---
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
next reply other threads:[~2022-03-04 6:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 6:03 Jun Dong [this message]
2022-03-11 11:30 ` 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=20220304060308.5287-1-junx.dong@intel.com \
--to=junx.dong@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=qingx.sun@intel.com \
/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).