[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] tests/acceptance/migration: test to migrate
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] tests/acceptance/migration: test to migrate will all machine types |
Date: |
Mon, 16 Sep 2019 15:50:06 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
* Balamuruhan S (address@hidden) wrote:
> add migration test to query machine types supported by qemu binary
> and migrate vm will all supported type.
>
> Signed-off-by: Balamuruhan S <address@hidden>
Depending on the architecture you might find that some machine types
aren't migratable while some are.
Dave
> ---
> tests/acceptance/migration.py | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 0f3553c8f0..74416ccc21 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -49,3 +49,29 @@ class Migration(Test):
> self.assertEqual(dest_vm.command('query-status')['status'],
> 'running')
> self.assertEqual(source_vm.command('query-status')['status'],
> 'postmigrate')
> +
> +
> + def test_migration_with_machine_types(self):
> + migration_port = self._get_free_port()
> + for machine in self.get_machine_types():
> + if 'pseries' in machine:
> + print("migrating with machine type - {}".format(machine))
> + source_vm = self.get_vm('-M',
> '{},cap-htm=off'.format(machine))
> + dest_uri = 'tcp:localhost:%u' % migration_port
> + dest_vm = self.get_vm('-M', '{},cap-htm=off'.format(machine),
> + '-incoming', dest_uri)
> + dest_vm.launch()
> + source_vm.launch()
> + source_vm.qmp('migrate', uri=dest_uri)
> + wait.wait_for(
> + self.migration_finished,
> + timeout=self.timeout,
> + step=0.1,
> + args=(source_vm,)
> + )
> +
> self.assertEqual(source_vm.command('query-migrate')['status'],
> + 'completed')
> + self.assertEqual(dest_vm.command('query-status')['status'],
> + 'running')
> + self.assertEqual(source_vm.command('query-status')['status'],
> + 'postmigrate')
> --
> 2.14.5
>
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK