forked from autotest/tp-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into migrate_with_external_vtpm
- Loading branch information
Showing
76 changed files
with
4,758 additions
and
44 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
libvirt/tests/cfg/chardev/connection_and_operation/data_transfer.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
- chardev.data_transfer: | ||
type = data_transfer | ||
port = "0" | ||
speed = "115200" | ||
device = "ttyS${port}" | ||
audit_log = "ausearch --start today -m VIRT_RESOURCE -i " | ||
audit_log_msg = "['chardev','old-chardev','new-chardev=%s']" | ||
boot_prompt = '["^Red Hat Enterprise Linux \S+ \S+ \S+","Kernel [0-9]\S+. [a-z]+ \S+ \S+","localhost login:"]' | ||
host_msg = "host_msg" | ||
guest_msg = "guest_msg" | ||
variants: | ||
- file: | ||
chardev_type = "file" | ||
file_path = "/var/log/libvirt/qemu/testfile" | ||
host_cmd = "tail -f %s | grep ${guest_msg} " | ||
- pipe: | ||
chardev_type = "pipe" | ||
pipe_path = "/tmp/mypipe" | ||
pipe_in = "${pipe_path}.in" | ||
pipe_out = "${pipe_path}.out" | ||
host_cmd = "cat < %s " | ||
variants: | ||
- console: | ||
chardev = "console" | ||
variants: | ||
- virtio_target: | ||
target_type = "virtio" | ||
device = "hvc0" | ||
target_path = "/dev/hvc" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '%s'}}],'target_type':'%s', 'alias': {'name': '%s'},'target_port':'${port}'}" | ||
- serial_target: | ||
target_type = "serial" | ||
target_path = "/dev/ttyS" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '%s'}}],'target_type':'%s', 'alias': {'name': '%s'},'target_port':'${port}'}" | ||
- serial: | ||
chardev = "serial" | ||
target_path = "/dev/ttyS" | ||
variants: | ||
- pci_target: | ||
target_type = "pci-serial" | ||
target_model = "pci-serial" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '%s'}}],'target_type':'%s', 'target_model':'${target_model}','target_port':'${port}','alias': {'name': '%s'}}" | ||
- isa_target: | ||
target_type = "isa-serial" | ||
target_model = "isa-serial" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '%s'}}],'target_type':'%s', 'target_model':'${target_model}','target_port':'${port}','alias': {'name': '%s'}}" | ||
- channel: | ||
chardev = "channel" | ||
target_name = "org.chardev.test" | ||
target_path = "/dev/virtio-ports/" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '%s'}}],'target':{'type':'%s' ,'name':'${target_name}','state':'connected'}, 'alias': {'name': '%s'}}" | ||
variants: | ||
- virtio_target: | ||
target_type = "virtio" |
22 changes: 22 additions & 0 deletions
22
libvirt/tests/cfg/chardev/connection_and_operation/file_append_option.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- chardev.file_append: | ||
type = file_append_option | ||
speed = "115200" | ||
device = "ttyS0" | ||
dev_index = 1 | ||
boot_prompt = '["Kernel [0-9]\S+. [a-z]+ \S+ \S+","localhost login:"]' | ||
chardev_type = 'file' | ||
file_path = "/var/log/libvirt/qemu/testfile" | ||
variants: | ||
- append_on: | ||
append_value = "on" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '${file_path}','append':'${append_value}'}}], 'target_port':'0'}" | ||
- append_off: | ||
append_value = "off" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '${file_path}','append':'${append_value}'}}], 'target_port':'0'}" | ||
- append_default: | ||
append_value = "default" | ||
device_dict = "{'type_name':'${chardev_type}','sources': [{'attrs': {'path': '${file_path}'}}], 'target_port':'0'}" | ||
variants: | ||
- serial: | ||
chardev = "serial" | ||
|
1 change: 1 addition & 0 deletions
1
libvirt/tests/cfg/conf_file/libvirtd_conf/processing_controls.cfg
This file contains 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
68 changes: 68 additions & 0 deletions
68
libvirt/tests/cfg/domain_life_cycle/create_destroy_domain.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
- domain_life_cycle: | ||
type = create_destroy_domain | ||
status_error = "no" | ||
start_vm = "no" | ||
variants test_operation: | ||
- create_domain: | ||
variants: | ||
- negative: | ||
variants test_scenario: | ||
- same_name_with_existed_guest: | ||
error_msg = "already exists with uuid" | ||
- 248_characters_name: | ||
dom_new_name = "11111111" | ||
error_msg = "File name too long" | ||
- not_existed_network: | ||
dom_new_name = "not_existed_network_domain" | ||
dom_new_network = "defaultno" | ||
error_msg = "Network not found" | ||
- overwritten_domain_xml: | ||
dom_new_name = "overwritten_domain_name" | ||
error_msg = "already exists with uuid" | ||
- define_domain: | ||
variants: | ||
- positive: | ||
variants test_scenario: | ||
- not_existed_network: | ||
dom_new_name = "not_existed_network" | ||
- negative: | ||
variants test_scenario: | ||
- 248_characters_name: | ||
dom_new_name = "11111111" | ||
error_msg = "File name too long" | ||
- undefine_domain: | ||
variants: | ||
- positive: | ||
variants test_scenario: | ||
- wipe_storage: | ||
target_device = "vdb" | ||
source_file_path = "/var/lib/libvirt/images/wipe_storage.qcow2" | ||
- convert_persistent_to_transient: | ||
- reset_domain: | ||
variants: | ||
- negative: | ||
variants test_scenario: | ||
- shut_off_state_guest: | ||
dom_new_name = "reset_domain_name" | ||
error_msg = "domain is not running" | ||
- start_domain: | ||
variants: | ||
- negative: | ||
variants test_scenario: | ||
- memory_bigger_than_allocated: | ||
status_error = "yes" | ||
memory_factor = "4" | ||
error_msg = "Cannot allocate memory" | ||
- destroy_domain: | ||
variants: | ||
- positive: | ||
variants test_scenario: | ||
- paused_state_guest: | ||
dom_new_name = "paused_guest" | ||
fake_disk = "yes" | ||
- shutdown_domain: | ||
variants: | ||
- negative: | ||
variants test_scenario: | ||
- paused_state_guest: | ||
error_msg = "domain is not running" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- capabilities.output: | ||
type = capabilities_output | ||
start_vm = no | ||
variants test_case: | ||
- machine_types: |
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions
44
libvirt/tests/cfg/memory/memory_allocation/memory_invalid_value.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
- memory.allocation.invalid_value: | ||
type = memory_invalid_value | ||
mem_value = 2097152 | ||
mem_unit = 'KiB' | ||
current_mem = 2097152 | ||
current_mem_unit = 'KiB' | ||
max_mem_slots = 16 | ||
max_mem = 15242880 | ||
max_mem_unit = 'KiB' | ||
numa_mem = 1048576 | ||
start_vm = no | ||
variants num: | ||
- zero: | ||
value = 0 | ||
- minus: | ||
value = -1 | ||
status_error = "yes" | ||
minus_error_msg = "Invalid value '${value}' for element or attribute " | ||
variants mem_config: | ||
- memory: | ||
vm_attrs = {'memory':${value},'memory_unit':'${mem_unit}','current_mem':${current_mem},'current_mem_unit':"${current_mem_unit}"} | ||
error_msg = "Memory size must be specified via <memory> or in the <numa> configuration" | ||
status_error = "yes" | ||
- current_memory: | ||
start_vm_error = "no" | ||
status_error = "no" | ||
xpaths_list = [{'element_attrs':[".//currentMemory[@unit='${current_mem_unit}']"],'text':'${current_mem}'}] | ||
vm_attrs = {'current_mem':${value},'current_mem_unit':"${current_mem_unit}",'memory':${mem_value},'memory_unit':'${mem_unit}'} | ||
- mam_memory: | ||
vm_attrs = {'max_mem_rt': ${value}, 'max_mem_rt_slots': ${max_mem_slots}, 'max_mem_rt_unit': "${max_mem_unit}",'memory_unit':"${mem_unit}",'memory':${mem_value},'current_mem':${current_mem},'current_mem_unit':'${current_mem_unit}','vcpu': 4,'cpu': {'numa_cell': [{'id': '0', 'cpus': '0-1', 'memory': '${numa_mem}', 'unit': 'KiB'},{'id':'1','cpus': '2-3','memory':'${numa_mem}','unit':'KiB'}]}} | ||
error_msg = "both maximum memory size and memory slot count must be specified" | ||
status_error = "yes" | ||
- numa: | ||
xpaths_list = [{'element_attrs':[".//cell[@id='0']"], 'text':'${value}'}, {'element_attrs':[".//memory[@unit='${mem_unit}']"], 'text':'${numa_mem}'}, {'element_attrs':[".//currentMemory[@unit='${current_mem_unit}']"], 'text':'${numa_mem}'}] | ||
vm_attrs = {'max_mem_rt': ${max_mem}, 'max_mem_rt_slots': ${max_mem_slots}, 'max_mem_rt_unit': "${max_mem_unit}",'memory_unit':"${mem_unit}",'memory':${mem_value},'current_mem':${current_mem},'current_mem_unit':'${current_mem_unit}','vcpu': 4,'cpu': {'numa_cell': [{'id': '0', 'cpus': '0-1', 'memory': '${value}', 'unit': 'KiB'},{'id':'1','cpus': '2-3','memory':'${numa_mem}','unit':'KiB'}]}} | ||
start_vm_error = "yes" | ||
status_error = "no" | ||
start_error_msg = "property 'size' of memory-backend-ram doesn't take value '${value}'" | ||
- mixed_mem: | ||
xpaths_list = [{'element_attrs':[".//memory[@unit='${mem_unit}']"], 'text':'${mem_value}'}, {'element_attrs':[".//currentMemory[@unit='${current_mem_unit}']"], 'text':'${current_mem}'}] | ||
vm_attrs = {'memory':${value},'current_mem':${value},'max_mem_rt': ${max_mem}, 'max_mem_rt_slots': ${max_mem_slots}, 'max_mem_rt_unit': "${max_mem_unit}",'memory_unit':"${mem_unit}",'current_mem_unit':'${current_mem_unit}','vcpu': 4,'cpu': {'numa_cell': [{'id': '0', 'cpus': '0-1', 'memory': '${numa_mem}', 'unit': 'KiB'},{'id':'1','cpus': '2-3','memory':'${numa_mem}','unit':'KiB'}]}} | ||
start_vm_error = "no" | ||
status_error = "no" | ||
|
41 changes: 41 additions & 0 deletions
41
libvirt/tests/cfg/memory/memory_devices/lifecycle_of_mixed_memory_devices.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
- memory.devices.lifecycle: | ||
type = lifecycle_of_mixed_memory_devices | ||
start_vm = no | ||
numa_mem = 1048576 | ||
numa_num = 2 | ||
default_unit = "KiB" | ||
vm_attrs = {'max_mem_rt': 52428800, 'max_mem_rt_slots': 16, 'max_mem_rt_unit': 'KiB','vcpu': 4,'cpu': {'numa_cell': [{'id': '0', 'cpus': '0-1', 'memory': '${numa_mem}', 'unit': 'KiB'},{'id':'1','cpus': '2-3','memory':'${numa_mem}','unit':'KiB'}]}} | ||
nvdimm_path_1 = "/tmp/nvdimm1" | ||
nvdimm_path_2 = "/tmp/nvdimm2" | ||
save_file = "/tmp/guest.save" | ||
nr_hugepages = 256 | ||
kernel_hp_file = "/proc/sys/vm/nr_hugepages" | ||
truncate_cmd = "truncate -s 512M ${nvdimm_path_1} && truncate -s 512M ${nvdimm_path_2}" | ||
kernel_params_remove = "memhp_default_state" | ||
kernel_params_add = "memhp_default_state=online_movable" | ||
page_size = 2048 | ||
dimm_1 = [262144, 262144, 1, "", 1, "dimm_dict_1"] | ||
nvdimm_1 = [524288, 0, 2, "", "", "nvdimm_dict_1"] | ||
virtio_mem_1 = [2097152, 1048576, 3, "", "", "virtio_mem_dict_1"] | ||
dimm_2 = [262144, 262144,"", 1, "", "dimm_dict_2"] | ||
nvdimm_2 = [524288, 0, "", 2, "", "nvdimm_dict_2"] | ||
virtio_mem_2 = [262144, 262144, "", 3, "","virtio_mem_dict_2"] | ||
set_items = ["memory_affected", "current_mem_affected","init_seq","hotplug_seq","hotunplug_seq", "dev_dict"] | ||
set_value = [${dimm_1}, ${nvdimm_1}, ${virtio_mem_1}, ${dimm_2}, ${nvdimm_2}, ${virtio_mem_2}] | ||
dimm_target_dize = 262144 | ||
nvdimm_target_dize = 524288 | ||
virtio_mem_target_size = 2097152 | ||
dimm_dict_1 = {'mem_model': 'dimm', 'mem_access':'private','mem_discard':'no','source': {"pagesize":${page_size}, "pagesize_unit":"KiB"},'target': {'size': ${dimm_target_dize}, 'size_unit': 'KiB','node':0}} | ||
nvdimm_dict_1 = {'mem_model': 'nvdimm', 'source': {"path":"${nvdimm_path_1}"}, 'target': {'size': ${nvdimm_target_dize}, 'size_unit': 'KiB','node':1 }} | ||
virtio_mem_dict_1 = {'mem_model': 'virtio-mem', 'target': {'size': ${virtio_mem_target_size}, 'size_unit': 'KiB','node':0, 'block_unit':'KiB','block_size':2048,'requested_size':1048576, 'requested_unit':'KiB'}} | ||
variants: | ||
- mutiple_mem: | ||
dimm_dict_2 = {'mem_model': 'dimm', 'mem_access':'shared','mem_discard':'yes','target': {'size': ${dimm_target_dize}, 'size_unit': 'KiB','node':1}} | ||
nvdimm_dict_2 = {'mem_model': 'nvdimm', 'source': {"path":"${nvdimm_path_2}"}, 'target': {'size': ${nvdimm_target_dize}, 'size_unit': 'KiB','node':1, 'label':{'size':128, 'size_unit':'KiB'} }} | ||
virtio_mem_dict_2 = {'mem_model': 'virtio-mem','source': {"pagesize":${page_size}, "pagesize_unit":"KiB"}, 'target': {'size': 262144, 'size_unit': 'KiB','node':0, 'block_unit':'KiB','block_size':2048,'requested_size':262144, 'requested_unit':'KiB'}} | ||
xpath_basic = {'element_attrs': [".//memory[@unit='${default_unit}']"],'text': '%s'},{'element_attrs': [".//currentMemory[@unit='${default_unit}']"],'text': '%s'},{'element_attrs': [".//alias[@name='dimm0']"]},{'element_attrs': [".//address[@slot='0']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='nvdimm1']"]},{'element_attrs': [".//address[@slot='1']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='virtiomem0']"]} | ||
xpath_after_start = [${xpath_basic}] | ||
xpath_after_attached = [${xpath_basic},{'element_attrs': [".//alias[@name='dimm2']"]},{'element_attrs': [".//address[@slot='2']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='nvdimm3']"]}, {'element_attrs': [".//address[@slot='3']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='virtiomem1']"]}] | ||
xpath_after_detached = [${xpath_basic}, {'element_attrs': [".//alias[@name='dimm2']"]},{'element_attrs': [".//address[@slot='2']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='nvdimm3']"]},{'element_attrs': [".//address[@slot='3']",".//address[@type='dimm']"]},{'element_attrs': [".//alias[@name='virtiomem1']"]}] | ||
del_head = 2 | ||
del_tail = 4 |
This file contains 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
This file contains 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
39 changes: 39 additions & 0 deletions
39
libvirt/tests/cfg/numa/guest_numa_topology/various_numa_topology_settings.cfg
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
- guest_numa_topology.various_numa_topology_settings: | ||
type = various_numa_topology_settings | ||
take_regular_screendumps = no | ||
start_vm = "no" | ||
vcpu = 4 | ||
memory_backing = {'hugepages': {}} | ||
qemu_monitor_option = '--hmp' | ||
qemu_monitor_cmd = 'info memdev' | ||
cpu_mode = 'host-model' | ||
target_hugepages = 1024 | ||
hugepage_size = 2048 | ||
numa_cell_0 = {'id': '0', 'memory': '1048576', 'cpus': '0-1'} | ||
numa_cell_1 = {'id': '1', 'memory': '1048576', 'cpus': '2-3'} | ||
numa_cells = [${numa_cell_0}, ${numa_cell_1}] | ||
variants: | ||
- memaccess_none: | ||
pattern_share_in_qmp_output = 'share:\s*false' | ||
- memaccess_shared: | ||
memAccess = 'shared' | ||
pattern_share_in_qmp_output = 'share:\s*true' | ||
- memaccess_private: | ||
memAccess = 'private' | ||
pattern_share_in_qmp_output = 'share:\s*false' | ||
- memaccess_invalid: | ||
memAccess = 'invalid' | ||
status_error = yes | ||
err_msg = "Invalid value for attribute '%s' in element 'cell': 'invalid'" | ||
variants: | ||
- discard_none: | ||
- discard_yes: | ||
discard = 'yes' | ||
pattern_in_qemu_cmdline = '"?discard-data"?(=|:)(yes|true|on)' | ||
- discard_no: | ||
discard = 'no' | ||
pattern_in_qemu_cmdline = '"?discard-data"?(=|:)(no|false|off)' | ||
- discard_invalid: | ||
discard = 'invalid' | ||
status_error = 'yes' | ||
err_msg = "Invalid value for attribute '%s' in element 'cell': 'invalid'" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- save_and_restore.save_with_formats: | ||
type = save_with_formats | ||
start_vm = no | ||
libvirtd_debug_level = 1 | ||
libvirtd_debug_file = /var/log/libvirt/virtqemud.log | ||
variants: | ||
- positive_test: | ||
status_error = no | ||
save_formats = raw lzop gzip bzip2 xz | ||
- negative_test: | ||
status_error = yes | ||
variants save_format: | ||
- abc: | ||
error_msg = Invalid save image format specified in configuration file |
Oops, something went wrong.