diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migration-test.c | 4 | ||||
| -rw-r--r-- | tests/pxe-test.c | 6 | ||||
| -rwxr-xr-x | tests/qemu-iotests/169 | 22 | ||||
| -rw-r--r-- | tests/qemu-iotests/169.out | 4 |
4 files changed, 22 insertions, 14 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c index ac780dffda..ebd77a581a 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -614,7 +614,7 @@ static int test_migrate_start(QTestState **from, QTestState **to, end_address = S390_TEST_MEM_END; } else if (strcmp(arch, "ppc64") == 0) { extra_opts = use_shmem ? get_shmem_opts("256M", shmem_path) : NULL; - cmd_src = g_strdup_printf("-machine accel=%s -m 256M -nodefaults" + cmd_src = g_strdup_printf("-machine accel=%s,vsmt=8 -m 256M -nodefaults" " -name source,debug-threads=on" " -serial file:%s/src_serial" " -prom-env 'use-nvramrc?=true' -prom-env " @@ -623,7 +623,7 @@ static int test_migrate_start(QTestState **from, QTestState **to, "until' %s %s", accel, tmpfs, end_address, start_address, extra_opts ? extra_opts : "", opts_src); - cmd_dst = g_strdup_printf("-machine accel=%s -m 256M" + cmd_dst = g_strdup_printf("-machine accel=%s,vsmt=8 -m 256M" " -name target,debug-threads=on" " -serial file:%s/dest_serial" " -incoming %s %s %s", diff --git a/tests/pxe-test.c b/tests/pxe-test.c index 948b0fbdc7..aaae54f755 100644 --- a/tests/pxe-test.c +++ b/tests/pxe-test.c @@ -46,15 +46,15 @@ static testdef_t x86_tests_slow[] = { static testdef_t ppc64_tests[] = { { "pseries", "spapr-vlan", - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken" }, + "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, { "pseries", "virtio-net-pci", - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken" }, + "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, { NULL }, }; static testdef_t ppc64_tests_slow[] = { { "pseries", "e1000", - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken" }, + "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, { NULL }, }; diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169 index 8c204caf20..9656a7f620 100755 --- a/tests/qemu-iotests/169 +++ b/tests/qemu-iotests/169 @@ -134,7 +134,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.check_bitmap(self.vm_a, sha256 if persistent else False) def do_test_migration(self, persistent, migrate_bitmaps, online, - shared_storage): + shared_storage, pre_shutdown): granularity = 512 # regions = ((start, count), ...) @@ -142,15 +142,13 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): (0xf0000, 0x10000), (0xa0201, 0x1000)) - should_migrate = migrate_bitmaps or persistent and shared_storage + should_migrate = \ + (migrate_bitmaps and (persistent or not pre_shutdown)) or \ + (persistent and shared_storage) mig_caps = [{'capability': 'events', 'state': True}] if migrate_bitmaps: mig_caps.append({'capability': 'dirty-bitmaps', 'state': True}) - result = self.vm_a.qmp('migrate-set-capabilities', - capabilities=mig_caps) - self.assert_qmp(result, 'return', {}) - self.vm_b.add_incoming(incoming_cmd if online else "defer") self.vm_b.add_drive(disk_a if shared_storage else disk_b) @@ -166,6 +164,14 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): self.vm_a.hmp_qemu_io('drive0', 'write %d %d' % r) sha256 = self.get_bitmap_hash(self.vm_a) + if pre_shutdown: + self.vm_a.shutdown() + self.vm_a.launch() + + result = self.vm_a.qmp('migrate-set-capabilities', + capabilities=mig_caps) + self.assert_qmp(result, 'return', {}) + result = self.vm_a.qmp('migrate', uri=mig_cmd) while True: event = self.vm_a.event_wait('MIGRATION') @@ -210,11 +216,13 @@ def inject_test_case(klass, name, method, *args, **kwargs): mc = operator.methodcaller(method, *args, **kwargs) setattr(klass, 'test_' + method + name, lambda self: mc(self)) -for cmb in list(itertools.product((True, False), repeat=4)): +for cmb in list(itertools.product((True, False), repeat=5)): name = ('_' if cmb[0] else '_not_') + 'persistent_' name += ('_' if cmb[1] else '_not_') + 'migbitmap_' name += '_online' if cmb[2] else '_offline' name += '_shared' if cmb[3] else '_nonshared' + if (cmb[4]): + name += '__pre_shutdown' inject_test_case(TestDirtyBitmapMigration, name, 'do_test_migration', *list(cmb)) diff --git a/tests/qemu-iotests/169.out b/tests/qemu-iotests/169.out index 3a89159833..5c26d15c0d 100644 --- a/tests/qemu-iotests/169.out +++ b/tests/qemu-iotests/169.out @@ -1,5 +1,5 @@ -.................... +.................................... ---------------------------------------------------------------------- -Ran 20 tests +Ran 36 tests OK |