aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/contexts/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/tests/unit/benchmark/contexts/standalone')
-rw-r--r--yardstick/tests/unit/benchmark/contexts/standalone/test_model.py5
-rw-r--r--yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
index d880b4169..e76a3ca27 100644
--- a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
+++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
@@ -55,7 +55,7 @@ class ModelLibvirtTestCase(unittest.TestCase):
numa_cpus=0 - 10,
socket=1, threads=1,
vm_image="/var/lib/libvirt/images/yardstick-nsb-image.img",
- cpuset=2 - 10, cputune='')
+ cpuset=2 - 10, cputune='', machine='pc')
def setUp(self):
self.pci_address_str = '0001:04:03.2'
@@ -352,7 +352,8 @@ class ModelLibvirtTestCase(unittest.TestCase):
xml_ref = model.VM_TEMPLATE.format(vm_name='vm_name',
random_uuid=_uuid, mac_addr=mac, memory='1024', vcpu='8', cpu='4',
numa_cpus='0-7', socket='3', threads='2',
- vm_image='qemu_image', cpuset='4,5', cputune='cool')
+ vm_image='qemu_image', cpuset='4,5', cputune='cool',
+ machine='pc-i440fx-xenial')
xml_ref = model.Libvirt.add_cdrom(cdrom_img, xml_ref)
self.assertEqual(xml_out, xml_ref)
mock_get_mac_address.assert_called_once_with(0x00)
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
index 190e83d5f..413bb68b7 100644
--- a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
+++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
@@ -160,6 +160,13 @@ class OvsDpdkContextTestCase(unittest.TestCase):
}
self.ovs_dpdk.wait_for_vswitchd = 0
self.assertIsNone(self.ovs_dpdk.setup_ovs_bridge_add_flows())
+ self.ovs_dpdk.ovs_properties.update(
+ {'dpdk_pmd-rxq-affinity': {'0': "0:1"}})
+ self.ovs_dpdk.ovs_properties.update(
+ {'vhost_pmd-rxq-affinity': {'0': "0:1"}})
+ self.NETWORKS['private_0'].update({'port_num': '0'})
+ self.NETWORKS['public_0'].update({'port_num': '1'})
+ self.ovs_dpdk.setup_ovs_bridge_add_flows()
@mock.patch("yardstick.ssh.SSH")
def test_cleanup_ovs_dpdk_env(self, mock_ssh):
@@ -430,7 +437,8 @@ class OvsDpdkContextTestCase(unittest.TestCase):
self.assertEqual([vnf_instance_2],
self.ovs_dpdk.setup_ovs_dpdk_context())
- mock_setup_hugepages.assert_called_once_with(self.ovs_dpdk.connection, 1024 * 1024)
+ mock_setup_hugepages.assert_called_once_with(self.ovs_dpdk.connection,
+ (1024 + 4096) * 1024) # ram + dpdk_socket0_mem + dpdk_socket1_mem
mock__check_hugepages.assert_called_once()
mock_create_vm.assert_called_once_with(
self.ovs_dpdk.connection, '/tmp/vm_ovs_0.xml')