diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-07-26 00:58:29 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-07-26 00:59:56 -0700 |
commit | d9b9b8970312e13f798a367439cfc2c333c7fca4 (patch) | |
tree | d30731f7b23ec6ec11373e9f48e1dfcfcb2b6de8 /yardstick | |
parent | 12ce596d02be27abf4ab2e9aebb873002c6cd6a9 (diff) |
fix sriov/ovs-dpdk unittests on systems with fewer than 10 cores
we need to wrap vcpupin modulo number of cores.
also mock time.sleep
Change-Id: I6433418a99505b469c61c81a9a023d84434fa0ee
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick')
-rw-r--r-- | yardstick/benchmark/contexts/ovsdpdk.py | 2 | ||||
-rw-r--r-- | yardstick/benchmark/contexts/sriov.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/benchmark/contexts/ovsdpdk.py b/yardstick/benchmark/contexts/ovsdpdk.py index 86610305e..cf5529d89 100644 --- a/yardstick/benchmark/contexts/ovsdpdk.py +++ b/yardstick/benchmark/contexts/ovsdpdk.py @@ -329,7 +329,7 @@ class Ovsdpdk(StandaloneContext): for i in range(0, 10): self.connection.execute( "virsh vcpupin vm1 {0} {1}".format( - i, nodes[str(num_nodes - 1)][i])) + i, nodes[str(num_nodes - 1)][i % len(nodes[str(num_nodes - 1)])])) def get_numa_nodes(self): nodes_sysfs = glob.iglob("/sys/devices/system/node/node*") diff --git a/yardstick/benchmark/contexts/sriov.py b/yardstick/benchmark/contexts/sriov.py index da143cc4b..fe27d2579 100644 --- a/yardstick/benchmark/contexts/sriov.py +++ b/yardstick/benchmark/contexts/sriov.py @@ -392,7 +392,7 @@ class Sriov(StandaloneContext): for i in range(0, 10): self.connection.execute( "virsh vcpupin vm1 {0} {1}".format( - i, nodes[str(num_nodes - 1)][i])) + i, nodes[str(num_nodes - 1)][i % len(nodes[str(num_nodes - 1)])])) def get_numa_nodes(self): nodes_sysfs = glob.iglob("/sys/devices/system/node/node*") |