-
client/tools: Remove tapfd_helper script
This tapfd_helper tool is used for virt test, and depends some virt modules, thus move it to virt-test repo. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.guest_agent: Add fsfreeze and fsthraw support
The "guest-fsfreeze-freeze" and "guest-fsfreeze-thaw" cmds are used to freeze/unfreeze all freezable, local guest filesystems. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.guest_agent: Add suspend command for qemu guest agent
The 'guest-suspend-*' tries to execute the scripts provided by the pm-utils package. If it's not available, the suspend operation will be performed by manually writing to a sysfs file. For the best results it's strongly recommended to have the pm-utils package installed in the guest. Qemu provides 3 modes to suspend guest: - "disk": Suspend guest to disk (S4) Note this "guest-suspend-disk" cmds won't return a response on success. Guest may quit with exit code 0 or return's a 'shutdown' status when querying VM status via monitor. - "ram": Suspend guest to memory (S3) guest-suspend-ram requires QEMU to support the 'system_wakeup' command. Thus, it's *required* to query QEMU for the presence of the 'system_wakeup' command before issuing guest-suspend-ram. Note: This command won't return a response on success. There are 2 ways to check guest status after issuing this command: * Wait for the SUSPEND QMP event from QEMU * Query VM status is "suspended" in QEMU monitor. - "hybird": Suspend guest to memory and disk guest-suspend-ram requires QEMU to support the 'system_wakeup' command. Thus, it's *required* to query QEMU for the presence of the 'system_wakeup' command before issuing guest-suspend-ram. Note: This command won't return a response on success. There are 2 ways to check guest status after issuing this command: * Wait for the SUSPEND QMP event from QEMU * Query VM status is "suspended" in QEMU monitor. Changes from v1: - Update random number generation method. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> -
virt.guest_agent: Add shutdown parameter to shutdown method
The 'guest-shutdown' cmd in qemu guest agent has 3 modes: - 'powerdown': The default action for this command. - 'reboot': Reboot guest. - 'halt': halt guest directly. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_monitor: Add a method to verify monitor cmd is supported by …
…qemu Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: qemu_guest_agent: Test guest agent with isa-serial device
The qemu guest agent supports both virtio serial and isa serial, but the original guest agent test only test it with virtio serial. This patch add the missing part of isa serial testing. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt: Make serial port configurable
Now autotest only support one serial port, and it's name and parameters are hardcode in script. This patch adds a parameter called 'isa_serial' in config file, let user can add more than one serials to one guest. An example for this sia_serial parameter. isa_serial = "S1 S2 S3" Changes from v1: - Raise exception if 'isa_serial' parameter is incorrect set. - Update variant name definition. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt: Remove virtio console socket files after qemu exit
This patch moves 'get_virtio_port_filename' method to virt_vm module, and create a 'get_virtio_port_filenames' method for the cleanup step in vm destroy function. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_vm: Make sure boot=on\off is added
Commit 52f94e5 attempts to search the boot option to a given drive if qemu command line supports the syntax, but it turns out it was slightly incorrect. This patch fixes it. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: Add qemu guest agent test
This test installs qemu guest agent package in guest and verify it work in guest. Because there is no pre-build guest agent binary for windows guest (qemu-ga.exe), just limit this test on Fedora guests. Changes from v2: - Rename GuestAgent to QemuAgent. Changes from v1: - Use new GuestAgent interface arguments. - Put guest agent name in config file. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.cfg: Change the fail_test order in subtests.cfg file
We use shutdown test as the mark of ending of config file, but remove_guest test need to be the last one, so change the mark to this new case.
-
virt: Add a new module for qemu agents
Now this module mainly contains the QemuAgent class, which is a wrapper for qemu guest agent. More detail about qemu guest agent: http://wiki.qemu.org/Features/QAPI/GuestAgent Qemu guest agent provides access to a system-level agent via standard QMP commands. The host communicate with guest over virtio-serial or isa-serial device. And guest uses '/dev/virtio-ports/org.qemu.guest_agent.0' device to send/ receive data from host. The QemuAgent class needs 2 arguments when initiation. * name - Guest agent name, by default in qemu it's "org.qemu.guest_agent.0" * filename - guest agent socket file path. This class contains some simple interface now: * cmd() - A low-level which can build QMP format cmd string and send to guest agent. * verify_responsive() - Make sure the guest agent is responsive by sending a command. * shutdown() - Shutdown guest via guest agent. Changes from v2: - Rename GuestAgent to QemuAgent Changes from v1: - Update GuestAgent init function and docstring. - Update supported cmd list generation/checking functions. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_vm: Fix a bug in cpu info generating code
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.cfg: Update config of phyical_resources_check
RHEL5 guest doesn't have 'lscpu' cmd, so add special cpu info checking cmd for it. This patch also fixes a typo in cpu sockets checking cmd. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_vm: Generate cpu topology info as qemu's way
The existed code for generate cpu topology info (sockets/ cores/threads) may generate a invalid config. This patch Update this part of code with qemu's way. This patch also add the support for 'maxcpus' option. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.virt_vm: Create CpuInfo struct for virt_vm class
This patch creates a CpuInfo class for virt_vm, this class stores VM's cpu information, we can access cpu info in test cases easily with it. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_monitor: Record all monitor message into a separated file
This patch record all monitor cmd/response in a seperated file, so that we can analyse them easily. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt: Run vm.pause/resume methond instead of call monitor cmd
Some cases call Monitor.cmd method directly, and they can't work with qmp monitor, we need to make them call the wrapper of monitor instead. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.cfg: update netdev_peer_re for RHEL6
The original regex pattern netdev_peer_re gets a '\r' charactor by mistake, it makes autotest framework crash when parsing error message. This patch updates this regex pattern, getting rid of the special charactor at the end of string. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> Acked-by: Feng Yang <fyang@redhat.com>
-
virt.kvm_vm: Check if qemu support 'boot' parameter for drive option
Since 'boot' parameter for 'drive' option is obsoleted, Adding some checking step to remove this parameter when using newer qemu version. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
client.tests: kernelinstall: Update control file
Update the control file for kernelinstall test: - Correct a typo in control file - Update params dict, adding some example in it. - Remove unused function. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.cfg: Update config for kernel_install
Update the default and example config for kernel_install case Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: usb_storage: Disable io_size check in RHEL5 guest
According to the doc [1], the {minimum,optimal}_io_size options are only for RHEL6 kernel, so disable them in RHEL5 guest. [1] http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/newstorage-iolimits.html Signed-off-by: Qingtang Zhou <qzhou@redhat.com> Acked-by: Feng Yang <fyang@redhat.com> -
KVM Test: usb_storage: Ignore letter case when checking removable option
The pattern string for removable option in usb_storage test script isn't suitable for RHEL5 guest. Thus ignore the letter case when checking this option. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> Acked-by: Feng Yang <fyang@redhat.com>
-
KVM Test: Add sub test seabios
This test is used for testing seabios. Now it's only can check boot menu and boot order. Chnages from V2: - Remove sub-function which gets the boot menu hint. Changes from V1: - Add some comments why start guest in test script. - Put the config of 'boot_menu_key' in config file. - Raise an Exception when failed to get boot entry. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_vm: Add sga device support
'sga' device is a type of ISA device, used to display via serial console. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt test: multicast: Correct multicast_guest.py script path
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: usb_multi_disk: Check usb disk with df cmd in linux guest
The black list for usb multi disk test can't work when using virtio devices for primary disk, it ignores disk whose name is /dev/sda. This patch checks usb disk's name with df cmd to make sure we get the correct usb disk name in guest. This patch also rename 'block_list' parameter to 'black_list' Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_vm: Make get_free_usb_port function returns string type port
Now the _add_option function only accept bool/string type value as option, thus usb port can't be generated correctly. This patch makes the get_free_usb_port function always return string type of port. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: Add config for guest kernel install test
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
KVM Test: kernel_install.py: Add a kernel installation test
This test supports 4 kinds of installation method. * rpm: install guest kernel with a local/remote rpm package. * koji/brew: download packages via koji/brew and install kernel in * guest. * git: checkout a git repo and compile kernel. * tar: compile kernel from a tarball and install it in guest. Signed-off-by: Yiqiao Pu <ypu@redhat.com> Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
client test: Add kernel install case in autotest
Autotest framework has great support in kernel compile and install. Add this case to make it easier to compile kernel in guest. This test supports 3 kinds of installation method. * rpm: install kernel with a local/remote rpm package. * git: checkout a git repo and compile kernel. * tar: compile kernel from a tarball and install it. Signed-off-by: Yiqiao Pu <ypu@redhat.com> Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt: Move PciAssignable out of virt_utils module
This PciAssignable class depends kvm_control module which will raise an exception in guest. Thus move this class to virt_test_setup module so that we can use virt_utils in client tests. Signed-off-by: Qingtang Zhou <qzhou@redhat.com> Acked-by: Yiqiao Pu <ypu@redhat.com>
-
virt.kvm_monitor: Use qmp's screendump cmd if qmp support it
New qemu-kvm version supports 'screendump' cmd in qmp monitor, thus we can use it directly. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
-
virt.kvm_monitor: Update monitor log print functions
This patch introduces 2 methods to log monitor log. - _log_command is used to log which cmd would be sent to monitor. - _log_response is used to record response from monitor. In qmp monitor, json string will be decode into multiple lines. There is a member "debug_log" in monitor class, which is used to enable/disable debug log in the whole class. Signed-off-by: Qingtang Zhou <qzhou@redhat.com>