Skip to content

Commit

Permalink
Adding testcases for the compat migration tests between P10 & P11
Browse files Browse the repository at this point in the history
Adding testcases for the compatibility tests between P10 & P11 systems
while doing migration! Enhanced the code and 1545 new testcases will
be added to the migration test bucket.
Signed-off-by: Anushree Mathur <[email protected]>
  • Loading branch information
Anushree-Mathur committed Jan 17, 2025
1 parent 672ee07 commit f992f19
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
19 changes: 17 additions & 2 deletions libvirt/tests/cfg/virsh_cmd/domain/virsh_migrate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
variants:
- compat_migration:
variants:
- ppc_compat_migration:
- ppc_compat_migration_p9:
only ppc64le,ppc64
only there_live,there_live_with_numa,there_and_back,there_and_back_with_numa
compat_mode = "yes"
compat_mode_P9 = "yes"
power9_compat = "yes"
power9_compat_remote = "yes"
restore_smt = "yes"
Expand All @@ -66,6 +66,21 @@
- from_power9:
# Test P8 compat mode guest between P9 <-> P9 host
host_arch = POWER9
- ppc_compat_migration_p11:
only ppc64le,ppc64
only there_live,there_live_with_numa,there_and_back,there_and_back_with_numa
compat_mode = "yes"
power11_compat = "yes"
power11_compat_remote = "yes"
restore_smt = "yes"
cpu_model = "power10"
variants:
- from_power10:
# Test P10 compat mode guest between P10 <-> P11 host
host_arch = POWER10
- from_power11:
# Test P10 compat mode guest between P11 <-> P11 host
host_arch = POWER11
- non_compat_migration:
variants:
- with_cpu_hotplug:
Expand Down
9 changes: 6 additions & 3 deletions libvirt/tests/src/virsh_cmd/domain/virsh_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,8 @@ def check_vm_state_dest():
hotunplug_after_migrate = "yes" == params.get("virsh_hotunplug_cpu_after",
"no")
compat_guest_migrate = get_compat_guest_migrate(params)
compat_mode = "yes" == params.get("compat_mode", "no")
compat_mode_P9 = "yes" == params.get("compat_mode_P9", "no")
compat_mode_P11 = "yes" == params.get("compat_mode_P11", "no")
remote_dargs = {'server_ip': server_ip, 'server_user': server_user,
'server_pwd': server_pwd,
'file_path': "/etc/libvirt/libvirt.conf"}
Expand All @@ -653,7 +654,7 @@ def check_vm_state_dest():
libvirt.add_controller(vm.name, contr_xml)

# Configurations for cpu compat guest to boot
if compat_mode:
if (compat_mode_P9 or compat_mode_P11):
if compat_guest_migrate:
if not libvirt_version.version_compare(3, 2, 0):
test.cancel("host CPU model is not supported")
Expand All @@ -671,8 +672,10 @@ def check_vm_state_dest():
actual_cpu_model))
logging.debug("Configured cpu model successfully! Guest booted "
"with CPU model: %s", actual_cpu_model)
else:
elif compat_mode_P9:
test.cancel("Host arch is not POWER9")
else:
test.cancel("Host arch is not POWER11")
# Configurations for cpu hotplug and cpu hotunplug
if cpu_hotplug:
# To check cpu hotplug is supported or not
Expand Down

0 comments on commit f992f19

Please sign in to comment.