summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py28
1 files changed, 24 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index d8f7f3473..3dfbb4cc8 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -41,6 +41,7 @@ VPP_CONF = '/run/vpp/vpp.conf'
base_path = ['vpp']
driver = 'dpdk'
interface = 'eth1'
+system_memory_path = ['system', 'option', 'kernel', 'memory']
def get_vpp_config():
@@ -96,6 +97,9 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
def setUp(self):
self.cli_set(base_path + ['settings', 'interface', interface, 'driver', driver])
self.cli_set(base_path + ['settings', 'unix', 'poll-sleep-usec', '10'])
+ self.cli_set(
+ system_memory_path + ['hugepage-size', '2M', 'hugepage-count', '2048']
+ )
def tearDown(self):
try:
@@ -110,6 +114,12 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.cli_delete(['interfaces', 'ethernet', interface, 'address'])
self.cli_commit()
+ # delete kernel memory settings
+ self.cli_delete(
+ system_memory_path + ['hugepage-size', '2M', 'hugepage-count', '2048']
+ )
+ self.cli_commit()
+
self.assertFalse(os.path.exists(VPP_CONF))
self.assertFalse(process_named_running(PROCESS_NAME))
@@ -1084,15 +1094,25 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
dpdk_options = {
'num-rx-desc': '512',
'num-tx-desc': '512',
- 'num-rx-queues': '3',
- 'num-tx-queues': '3',
+ 'num-rx-queues': '1',
+ 'num-tx-queues': '1',
}
+ main_core = '0'
+ workers = '1'
base_interface_path = base_path + ['settings', 'interface', interface]
for option, value in dpdk_options.items():
self.cli_set(base_interface_path + ['dpdk-options', option, value])
+ # rx/tx queue configuration expect VPP workers to be set
+ # expect raise ConfigError
+ with self.assertRaises(ConfigSessionError):
+ self.cli_commit()
+
+ self.cli_set(base_path + ['settings', 'cpu', 'main-core', main_core])
+ self.cli_set(base_path + ['settings', 'cpu', 'workers', workers])
+
# DPDK driver expect only dpdk-options and not xdp-options to be set
# expect raise ConfigError
self.cli_set(base_interface_path + ['xdp-options', 'no-syscall-lock'])
@@ -1112,7 +1132,7 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
def test_11_vpp_cpu_settings(self):
main_core = '2'
- workers = '2'
+ workers = '1'
skip_cores = '1'
self.cli_set(base_path + ['settings', 'cpu', 'workers', workers])
@@ -1149,7 +1169,7 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
def test_12_vpp_cpu_corelist_workers(self):
main_core = '0'
- corelist_workers = ['1', '2-3']
+ corelist_workers = ['3']
for worker in corelist_workers:
self.cli_set(base_path + ['settings', 'cpu', 'corelist-workers', worker])