On 05/24/2012 03:40 AM, tangchen wrote: > This patch adds 27 tests for virsh_migrate. > 1) Uni-direction migration with option --persistent. > 2) Uni-direction migration with option --undefinesource. > 3) Uni-direction migration with option --copy-storage-all. > 4) Uni-direction migration with option --copy-storage-inc. > 5) Uni-direction migration with option --change-protection. > 6) Uni-direction migration with option --verbose. > 7) Uni-direction migration with option --timeout. > 8) Uni-direction migration with option --migrateuri. > 9) Uni-direction migration with option --dname. > 10) Uni-direction migration with option --xml. > 11) Uni-direction migration with non-exist domain. > 12) Uni-direction migration without option --domain. > 13) Uni-direction migration with non-exist desturi. > 14) Uni-direction migration without option --desturi. > 15) Uni-direction migration with non-exist migrateuri. > 16) Uni-direction migration with an invalid timeout. > 17) Uni-direction migration with a very short timeout. > 18) Uni-direction offline migration with option --timeout. > 19) Uni-direction migration with an existing dname. > 20) Uni-direction migration with a non-existing xmlfile. > 21) Uni-direction offline migration. > 22) Uni-direction live migration with VM suspend. > 23) Uni-direction offline migration with VM suspend. > 24) Uni-direction live migration with VM shutdown. > 25) Uni-direction offline migration with VM shutdown. > 26) Uni-direction live migration with libvirtd stop. > 27) Uni-direction offline migration with libvirtd stop. > > Signed-off-by: Tang Chen<tangc...@cn.fujitsu.com> > --- > client/virt/subtests.cfg.sample | 261 > ++++++++++++++++++++++++++++----------- > 1 files changed, 188 insertions(+), 73 deletions(-) > > diff --git a/client/virt/subtests.cfg.sample b/client/virt/subtests.cfg.sample > index 5b9af12..3d01901 100644 > --- a/client/virt/subtests.cfg.sample > +++ b/client/virt/subtests.cfg.sample > @@ -261,6 +261,194 @@ variants: > status_error = "yes" > libvirtd = "off" > > + - virsh_migrate: install setup image_copy unattended_install.cdrom > + type = virsh_migrate > + # Migrating non-started VM causes undefined behavior > + start_vm = yes > + # Options to pass to virsh migrate command before<domain> <desturi> > + virsh_migrate_options = "--live --undefinesource --persistent" > + # Extra options to pass after<domain> <desturi> > + virsh_migrate_extra = "--timeout 60" > + # Fully qualified desturi > (qemu+ssh://other.hostname.example.com/system) > + # Remember to open ports 49152-49216 on destination and > + # NAT-based host networking will cause external connectivity-loss > + # to guest, consider a shared-bridge setup instead. > + virsh_migrate_desturi = qemu+ssh://DEST_HOSTNAME.EXAMPLE.COM/system > + # FIXME: Impliment libvirt URI connect user/password > + # virsh_migrate_destuser = root > + # virsh_migrate_destpwd = "" > + virsh_migrate_dest_state = running > + virsh_migrate_src_state = running > + virsh_migrate_libvirtd_state = 'on' > + connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > + status_error = 'no' > + virsh_migrate_delay = 60 > + virsh_migrate_back = 'no' > + variants: > + - there_and_back: > + # After migrating, migrate the guest back. > + virsh_migrate_back = 'yes' > + # By 'default', use same options and extra with the > + # virsh_migrate_back_desturi set to the original connect_uri > + # virsh_migrate_back_options = 'default' > + # virsh_migrate_back_extra = 'default' > + # virsh_migrate_back_desturi = 'default' > + - there_and_back_a_lot: > + iterations = 100 > + virsh_migrate_back = 'yes' > + # don't kill anything inbetween iterations, you'll need to > + # shut it down manually or by including a shutdown test > + kill_vm = no > + kill_vm_gracefully = no > + kill_unresponsive_vms = no > + # migrate as fast as possible > + virsh_migrate_delay = 0 > + - there_live: > + # Uni-direction migration with option --live. > + virsh_migrate_options = "--live" > + - there_p2p: > + # Uni-direction migration with option --p2p. > + virsh_migrate_options = "--live --p2p" > + - there_p2p_tunnelled: > + # Uni-direction migration with option --tunnelled. > + # --tunnelled should be used with --p2p. > + virsh_migrate_options = "--live --p2p --tunnelled" > + - there_direct: > + # Uni-direction migration with option --direct. > + virsh_migrate_options = "--live --direct" > + - there_suspend: > + # Uni-direction migration with option --suspend. > + virsh_migrate_options = "--live --suspend" > + virsh_migrate_dest_state = paused > + - there_persistent: > + # Uni-direction migration with option --persistent. > + virsh_migrate_options = "--live --persistent" > + - there_undefinesource: > + # Uni-direction migration with option --undefinesource. > + virsh_migrate_options = "--live --undefinesource" > + - there_copy-storage-all: > + # Uni-direction migration with option --copy-storage-all. > + virsh_migrate_options = "--live --copy-storage-all" > + virsh_migrate_extra = > + - there_copy-storage-inc: > + # Uni-direction migration with option --copy-storage-inc. > + virsh_migrate_options = "--live --copy-storage-inc" > + virsh_migrate_extra = > + - there_change-protection: > + # Uni-direction migration with option --change-protection. > + virsh_migrate_options = "--live --change-protection" > + - there_verbose: > + # Uni-direction migration with option --verbose. > + virsh_migrate_options = "--live --verbose" > + - there_timeout: > + # Uni-direction migration with option --timeout. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--timeout 30" > + - there_timeout_short: > + # Uni-direction migration with a very short timeout. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--timeout 1" > + virsh_migrate_dest_state = "paused" > + - there_migrateuri: > + # Uni-direction migration with option --migrateuri. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--migrateuri > PROTO://DEST_HOSTNAME.EXAMPLE.COM:PORT" > + - there_dname: > + # Uni-direction migration with option --dname. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--dname xyz" > + - there_xml: > + # Uni-direction migration with option --xml. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--xml /tmp/virsh_migrate.xml" > + virsh_migrate_xml = /tmp/virsh_migrate.xml > + - there_offline: > + # Uni-direction offline migration. > + virsh_migrate_options = "" > + virsh_migrate_extra = "" > + - there_vm_suspend_live: > + # Uni-direction live migration with VM suspend. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "" > + virsh_migrate_src_state = paused > + virsh_migrate_dest_state = paused > + - there_vm_suspend_offline: > + # Uni-direction offline migration with VM suspend. > + virsh_migrate_options = "" > + virsh_migrate_extra = "" > + virsh_migrate_src_state = paused > + virsh_migrate_dest_state = paused > + - there_vm_shutdown_live: > + # Uni-direction live migration with VM shutdown. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "" > + virsh_migrate_src_state = "shut off" > + status_error = 'yes' > + - there_vm_shutdown_offline: > + # Uni-direction offline migration with VM shutdown. > + virsh_migrate_options = "" > + virsh_migrate_extra = "" > + virsh_migrate_src_state = "shut off" > + status_error = 'yes' > + - there_libvirtd_stop: > + # Uni-direction live migration with libvirtd stop. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "" > + virsh_migrate_libvirtd_state = 'off' > + status_error = 'yes' > + - there_libvirtd_stop_offline: > + # Uni-direction offline migration with libvirtd stop. > + virsh_migrate_options = "" > + virsh_migrate_extra = "" > + virsh_migrate_libvirtd_state = 'off' > + status_error = 'yes' > + # ERROR > + - there_domain_nonexist: > + # Uni-direction migration with non-exist domain. > + virsh_migrate_options = "--live" > + vm_ref = xyz > + status_error = 'yes' > + - there_domain_missing: > + # Uni-direction migration without option --domain. > + virsh_migrate_options = "--live" > + vm_ref = "" > + status_error = 'yes' > + - there_desturi_nonexist: > + # Uni-direction migration with non-exist desturi. > + virsh_migrate_options = "--live" > + dest_uri_ref = xyz > + status_error = 'yes' > + - there_desturi_missing: > + # Uni-direction migration without option --desturi. > + virsh_migrate_options = "--live" > + dest_uri_ref = "" > + status_error = 'yes' > + - there_migrateuri_nonexist: > + # Uni-direction migration with non-exist migrateuri. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--migrateuri xyz" > + status_error = 'yes' > + - there_timeout_invalid: > + # Uni-direction migration with an invalid timeout. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--timeout -1" > + status_error = 'yes' > + - there_timeout_offline: > + # Uni-direction offline migration with option --timeout. > + virsh_migrate_options = "" > + virsh_migrate_extra = "--timeout 60" > + status_error = 'yes' > + - there_dname_exist: > + # Uni-direction migration with an existing dname. > + virsh_migrate_options = "--live" > + # Here, xxx is an existing VM name on destination. > + virsh_migrate_extra = "--dname xxx" > + status_error = 'yes' > + - there_xml_nonexist: > + # Uni-direction migration with a non-existing xmlfile. > + virsh_migrate_options = "--live" > + virsh_migrate_extra = "--xml xyz" > + status_error = 'yes' > > - module_probe: > type = module_probe > @@ -466,79 +654,6 @@ variants: > dd_of = NULL > dd_stat = 0 > > - > - - virsh_migrate: install setup image_copy unattended_install.cdrom > - type = virsh_migrate > - # Migrating non-started VM causes undefined behavior > - start_vm = yes > - # Options to pass to virsh migrate command before<domain> <desturi> > - virsh_migrate_options = "--live --undefinesource --persistent" > - # Extra options to pass after<domain> <desturi> > - virsh_migrate_extra = "--timeout 60" > - # Fully qualified desturi > (qemu+ssh://other.hostname.example.com/system) > - # Remember to open ports 49152-49216 on destination and > - # NAT-based host networking will cause external connectivity-loss > - # to guest, consider a shared-bridge setup instead. > - virsh_migrate_desturi = qemu+ssh://DEST_HOSTNAME.EXAMPLE.COM/system > - # FIXME: Impliment libvirt URI connect user/password > - # virsh_migrate_destuser = root > - # virsh_migrate_destpwd = "" > - virsh_migrate_dest_state = running > - variants: > - - there_and_back: > - virsh_migrate_delay = 60 > - # After migrating, migrate the guest back. > - virsh_migrate_back = 'yes' > - # By 'default', use same options and extra with the > - # virsh_migrate_back_desturi set to the original connect_uri > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - # virsh_migrate_back_options = 'default' > - # virsh_migrate_back_extra = 'default' > - # virsh_migrate_back_desturi = 'default' > - - there_and_back_a_lot: > - iterations = 100 > - virsh_migrate_back = 'yes' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - # don't kill anything inbetween iterations, you'll need to > - # shut it down manually or by including a shutdown test > - kill_vm = no > - kill_vm_gracefully = no > - kill_unresponsive_vms = no > - # migrate as fast as possible > - virsh_migrate_delay = 0 > - - there_live: > - # Uni-direction migration with option --live. > - virsh_migrate_options = "--live" > - virsh_migrate_delay = 60 > - virsh_migrate_back = 'no' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - - there_p2p: > - # Uni-direction migration with option --p2p. > - virsh_migrate_options = "--live --p2p" > - virsh_migrate_delay = 60 > - virsh_migrate_back = 'no' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - - there_p2p_tunnelled: > - # Uni-direction migration with option --tunnelled. > - # --tunnelled should be used with --p2p. > - virsh_migrate_options = "--live --p2p --tunnelled" > - virsh_migrate_delay = 60 > - virsh_migrate_back = 'no' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - - there_direct: > - # Uni-direction migration with option --direct. > - virsh_migrate_options = "--live --direct" > - virsh_migrate_delay = 60 > - virsh_migrate_back = 'no' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - - there_suspend: > - # Uni-direction migration with option --suspend. > - virsh_migrate_options = "--live --suspend" > - virsh_migrate_delay = 60 > - virsh_migrate_back = 'no' > - connect_uri = qemu+ssh://SOURCE_HOSTNAME.EXAMPLE.COM/system > - virsh_migrate_dest_state = paused > - > - migrate: install setup image_copy unattended_install.cdrom > type = migration > migration_test_command = help
As I said in my mail, these are great. Nice and through functionality coverage and error tests is a great bonus. I like these a lot. -- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest