Add offline-cpu-vcpu plug_unplug-kdump test variant - #35
Open
Anushree-Mathur wants to merge 1 commit into
Open
Conversation
Offline a guest CPU, run virsh setvcpus (hotplug or unplug), then
trigger kdump to verify guest kernel stability with an offline CPU
under a changing vCPU count.
libvirt/tests/cfg/libvirt_vcpu_plug_unplug.cfg:
Add offline_cpu_kdump variant inside positive_test.vcpu_set as a
peer of with_maxvcpu, restricted to live + ppc64le/ppc64.
Three sub-variants:
- offline_hotplug_kdump: offline cpu1, plug 4->8, kdump, vmcore
- offline_unplug_kdump: offline cpu1, unplug 8->4, kdump, vmcore
- offline_plug_and_unplug_kdump: both in sequence
on_crash=restart so the guest reboots after kdump capture and the
test can log back in to verify the new vmcore.
libvirt/tests/src/libvirt_vcpu_plug_unplug.py:
- Import utils_kdump for trigger_crash() and get_vmcores().
- Read offline_cpu_before_setvcpus, offline_cpu_list,
kdump_after_plug_unplug and crash_dir params.
- Add offline_guest_cpus() helper: for each CPU id in
offline_cpu_list, writes 0 to
/sys/devices/system/cpu/cpuN/online inside the guest.
- Before plug setvcpus: call offline_guest_cpus() if requested.
- Before unplug setvcpus: same.
- Reduce expected online CPU count by offline_count when CPUs are
offlined, so check_if_vm_vcpu_match() does not false-fail
(offlined CPUs are not counted by /proc/cpuinfo).
- After hotplug and after unplug: call
utils_kdump.trigger_crash(session, wait_time=120) with an explicit
session (timeout=240) so the internal session.cmd() has enough
time on ppc64le for the guest to die cleanly. Verify vmcore via
utils_kdump.get_vmcores().
- Guard uptime reboot check with 'if not kdump_after_plug_unplug'
since kdump intentionally reboots the guest.
Signed-off-by: Anushree-Mathur <anushree.mathur@linux.ibm.com>
Signed-off-by: Anushree-Mathur <anushree.mathur@linux.ibm.com>
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Offline a guest CPU, run virsh setvcpus (hotplug or unplug), then trigger kdump to verify guest kernel stability with an offline CPU under a changing vCPU count.
libvirt/tests/cfg/libvirt_vcpu_plug_unplug.cfg:
Add offline_cpu_kdump variant inside positive_test.vcpu_set as a
peer of with_maxvcpu, restricted to live + ppc64le/ppc64.
Three sub-variants:
on_crash=restart so the guest reboots after kdump capture and the
test can log back in to verify the new vmcore.
libvirt/tests/src/libvirt_vcpu_plug_unplug.py:
Signed-off-by: Anushree-Mathur anushree.mathur@linux.ibm.com