Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions libvirt/tests/cfg/memory/memory_hotplug_virshdump.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Memory Hotplug with Virsh Dump Test Configuration

- memory_hotplug_virshdump:
type = memory_hotplug_virshdump
start_vm = yes
kill_vm = yes
kill_vm_gracefully = yes

# Memory configuration
mem = 2097152
current_mem = 2097152
max_mem = 20971520
max_mem_rt = 20971520
mem_unit = "KiB"

# Memory device parameters
tg_size = 524288
tg_sizeunit = "KiB"
tg_node = 0
mem_model = "dimm"
slots = 40

# VM configuration
vcpu_cores = 4
vcpu_threads = 1
vcpu_sockets = 1
numa_cells = 1

variants:
- continuous_hotplug:
variants:
- virshdump:
variants:
- positive:
variants:
- basic_test:
mem_hotplug_iterations = 16
mem_hotplug_delay = 10
virshdump_iterations = 16
virshdump_delay = 2
dump_path = "./virsh_dumps"
dump_options = "--memory-only --bypass-cache"
Comment on lines +37 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

This variant will write roughly 100 GiB of dump data per run.

With mem=2097152, tg_size=524288, and 16 attach+dump cycles, the guest grows from ~2.5 GiB to ~10 GiB before each --memory-only dump. The implementation keeps every file under ./virsh_dumps, so this single case ends up around 100 GiB of disk writes. That is likely to fill many test workers and fail unrelated jobs. Please either delete each dump after validating it or reduce the iteration/count sizing here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@libvirt/tests/cfg/memory/memory_hotplug_virshdump.cfg` around lines 37 - 42,
The memory hotplug virshdump test configuration is causing excessive disk usage
because the dump files accumulate under the dump directory across many
attach+dump cycles. Update the memory_hotplug_virshdump scenario to either clean
up each generated dump after verification or reduce the iteration/count settings
in the memory_hotplug_virshdump config so the run does not produce ~100 GiB of
output. Keep the fix localized to the virshdump/memory hotplug test
configuration and any related cleanup logic that handles dump_path and
dump_options.

169 changes: 169 additions & 0 deletions libvirt/tests/cfg/storage/virsh_pool_vol.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
- virsh.pool_vol:
type = virsh_pool_vol
vms = ''
main_vm = ''
start_vm = no
vol_capacity = "10G"
status_error = "no"
test_attach = "no"
at_options = "--live"
dt_options = "--live"
test_attach_device = "no"
ad_options = ""
dd_options = ""
disk_bus = "virtio"
disk_slot = "0x09"

variants:
- dirpool:
pool_name = "dirpool"
pool_type = "dir"
pool_target = "/var/lib/libvirt/images/dirpool"
variants:
- vol_qcow2:
vol_name = "vol1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "vol1.raw"
vol_format = "raw"
- attach_disk_qcow2:
vol_name = "vol1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "vol1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "dir-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "dir-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- fspool:
pool_name = "fspool"
pool_type = "fs"
pool_source_format = "ext4"
pool_target = "/mnt/fs-pool"
vol_capacity = "20G"
variants:
- vol_qcow2:
vol_name = "fsv1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "fsv1.raw"
vol_format = "raw"

- attach_disk_qcow2:
vol_name = "fsv1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "fsv1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "fs-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "fs-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- defaultpool:
pool_name = "defaultpool"
pool_type = "dir"
pool_target = "/var/lib/libvirt/images/defaultpool"
variants:
- vol_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
- attach_disk_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"
25 changes: 25 additions & 0 deletions libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_detach_disk.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,37 @@
at_dt_disk_serial = "test"
at_dt_disk_at_options = "--driver qemu --config"
at_dt_disk_pre_vm_state = "shut off"
- vm_running_live:
at_dt_disk_at_options = "--driver qemu --subdriver raw --live"
at_dt_disk_dt_options = "--live"
at_dt_disk_detach_after_attach = "yes"
- vm_running_config:
at_dt_disk_at_options = "--driver qemu --subdriver raw --config"
at_dt_disk_dt_options = "--config"
at_dt_disk_detach_after_attach = "yes"
- vm_shutdown_persistent:
at_dt_disk_at_options = "--driver qemu --subdriver raw --persistent --cache writeback"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_pre_vm_state = "shut off"
- vm_running_persistent:
at_dt_disk_at_options = "--driver qemu --subdriver raw --persistent --cache writethrough"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_detach_after_attach = "yes"
- vm_running_live_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --live"
at_dt_disk_dt_options = "--live"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- vm_running_config_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --config"
at_dt_disk_dt_options = "--config"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- vm_running_persistent_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --persistent"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- twice_diff_target:
at_dt_disk_test_twice = 'yes'
at_dt_disk_device_target2 = vdx
Expand Down Expand Up @@ -224,6 +245,10 @@
- file_disk_type:
- block_disk_type:
at_dt_disk_iscsi_device = "yes"
- block_disk_type_by_id:
at_dt_disk_use_disk_by_id = "yes"
at_dt_disk_skip_iscsi_setup = "yes"
at_dt_disk_detach_after_attach = "yes"
- block_disk_type_lun:
at_dt_disk_at_options = "--driver qemu --rawio --type lun"
at_dt_disk_iscsi_device = "yes"
Expand Down
99 changes: 98 additions & 1 deletion libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_device.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
variants:
- persistent:
vadu_extra = "--persistent"
- config:
# Test --config flag on running VM
vadu_config_option = "yes"
# Functional check should fail before rebooting
vadu_preboot_function_error = "yes"
- live_config:
# Avoid driver-dependant default behavior
vadu_extra = "--live"
Expand Down Expand Up @@ -250,6 +255,66 @@
vadu_dev_obj_alias_Controller = "ua-controller"
- block:
vadu_dev_objs = "VirtualDiskBasic"
variants:
- block_attach_detach_disk_qcow2:
only single_virtio_file
no cold_attach_hot_vm
no cold_attach_cold_vm
no with_alias
no id_ref
no uuid_ref
no error_test
no file_argument
no domain_argument
no hot_attach_hot_vm_current
#type = virsh_attach_device
#start_vm = "yes"
#status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
#vadu_dom_ref = "name"
#vadu_domain_positional = "yes"
#vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "qcow2"
config:
vadu_preboot_function_error = "yes"
- block_attach_detach_disk_raw:
only single_virtio_file
no cold_attach_hot_vm
no cold_attach_cold_vm
no with_alias
no id_ref
no uuid_ref
no error_test
no file_argument
no domain_argument
no hot_attach_hot_vm_current
#type = virsh_attach_device
#start_vm = "yes"
#status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
#vadu_config_option = "no"
#vadu_dom_ref = "name"
#vadu_domain_positional = "yes"
#vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "raw"
config:
vadu_preboot_function_error = "yes"
variants:
- without_alias:
- with_alias:
Expand Down Expand Up @@ -284,7 +349,39 @@
# Avoid running out of PCI slots on hot-attach
vadu_dev_obj_count_VirtualDiskBasic = 16
vadu_dev_obj_meg_VirtualDiskBasic = 10
vadu_dev_obj_targetbus_VirtualDiskBasic = "virtio"
- block_attach_detach_disk_formats:
# Test block device attach+detach with qcow2 and raw disk formats
# Uses join to bypass parent variant multiplication
join domain_positional file_positional normal_test name_ref
start_vm = "yes"
status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
vadu_config_option = "no"
vadu_dom_ref = "name"
vadu_domain_positional = "yes"
vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
variants disk_format:
- qcow2:
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "qcow2"
- raw:
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "raw"
variants attach_flags:
- persistent:
vadu_extra = "--persistent"
- config:
vadu_config_option = "yes"
vadu_preboot_function_error = "yes"
- live_config:
vadu_extra = "--live"
vadu_config_option = "yes"
- multiple:
variants:
- VirtualDiskBasic_SerialFile_SerialPipe:
Expand Down
Loading