Merge "numa: Fixes NUMA topology related unit tests"

This commit is contained in:
Jenkins 2016-10-03 16:57:20 +00:00 committed by Gerrit Code Review
commit dfb2af0f8e
2 changed files with 5 additions and 7 deletions

View File

@ -743,8 +743,8 @@ def _pack_instance_onto_cores(available_siblings,
usable_cores = map(lambda s: list(s)[:threads_no], sibling_set)
return zip(sorted(instance_cores),
itertools.chain(*usable_cores))
return list(zip(sorted(instance_cores),
itertools.chain(*usable_cores)))
if (instance_cell.cpu_thread_policy ==
fields.CPUThreadAllocationPolicy.REQUIRE):
@ -801,8 +801,8 @@ def _pack_instance_onto_cores(available_siblings,
if (instance_cell.cpu_thread_policy !=
fields.CPUThreadAllocationPolicy.REQUIRE and
not pinning):
pinning = zip(sorted(instance_cell.cpuset),
itertools.chain(*sibling_set))
pinning = list(zip(sorted(instance_cell.cpuset),
itertools.chain(*sibling_set)))
threads_no = _threads(instance_cell, threads_no)
@ -810,7 +810,7 @@ def _pack_instance_onto_cores(available_siblings,
return
topology = objects.VirtCPUTopology(sockets=1,
cores=len(pinning) / threads_no,
cores=len(pinning) // threads_no,
threads=threads_no)
instance_cell.pin_vcpus(*pinning)
instance_cell.cpu_topology = topology

View File

@ -64,8 +64,6 @@ nova.tests.unit.virt.libvirt.test_imagebackend.RbdTestCase
nova.tests.unit.virt.libvirt.test_imagecache.ImageCacheManagerTestCase
nova.tests.unit.virt.libvirt.test_imagecache.VerifyChecksumTestCase
nova.tests.unit.virt.libvirt.test_vif.LibvirtVifTestCase
nova.tests.unit.virt.test_hardware.CPUPinningCellTestCase
nova.tests.unit.virt.test_hardware.CPUPinningTestCase
nova.tests.unit.virt.test_virt_drivers.FakeConnectionTestCase
nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase
nova.tests.unit.virt.vmwareapi.test_images.VMwareImagesTestCase