Permalink
Commits on Oct 30, 2012
  1. client/tools: Remove tapfd_helper script

    zhouqt committed with lmr Oct 22, 2012
    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>
Commits on Sep 18, 2012
  1. virt.guest_agent: Add fsfreeze and fsthraw support

    zhouqt committed with lmr Sep 4, 2012
    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>
  2. virt.guest_agent: Add suspend command for qemu guest agent

    zhouqt committed with lmr Sep 4, 2012
    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>
  3. virt.guest_agent: Add shutdown parameter to shutdown method

    zhouqt committed with lmr Sep 4, 2012
    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>
  4. virt.kvm_monitor: Add a method to verify monitor cmd is supported by …

    zhouqt committed with lmr Sep 4, 2012
    …qemu
    
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
  5. KVM Test: qemu_guest_agent: Test guest agent with isa-serial device

    zhouqt committed with lmr Aug 30, 2012
    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>
  6. virt: Make serial port configurable

    zhouqt committed with lmr Aug 30, 2012
    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>
  7. virt: Remove virtio console socket files after qemu exit

    zhouqt committed with lmr Aug 28, 2012
    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>
Commits on Aug 21, 2012
  1. virt.kvm_vm: Make sure boot=on\off is added

    zhouqt committed with lmr Aug 21, 2012
    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>
Commits on Aug 10, 2012
  1. KVM Test: Add qemu guest agent test

    zhouqt committed with lmr Aug 7, 2012
    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>
  2. virt.cfg: Change the fail_test order in subtests.cfg file

    zhouqt committed with lmr Aug 7, 2012
    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.
  3. virt: Add a new module for qemu agents

    zhouqt committed with lmr Jul 19, 2012
    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>
Commits on Jul 26, 2012
  1. virt.kvm_vm: Fix a bug in cpu info generating code

    zhouqt committed with lmr Jul 23, 2012
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
  2. virt.cfg: Update config of phyical_resources_check

    zhouqt committed with lmr Jul 23, 2012
    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>
  3. virt.kvm_vm: Generate cpu topology info as qemu's way

    zhouqt committed with lmr Jul 13, 2012
    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>
  4. virt.virt_vm: Create CpuInfo struct for virt_vm class

    zhouqt committed with lmr Jul 12, 2012
    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>
Commits on Jul 10, 2012
  1. virt.kvm_monitor: Record all monitor message into a separated file

    zhouqt committed with lmr Jul 4, 2012
    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>
  2. virt: Run vm.pause/resume methond instead of call monitor cmd

    zhouqt committed with lmr Jun 7, 2012
    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>
Commits on Jul 6, 2012
  1. virt.cfg: update netdev_peer_re for RHEL6

    zhouqt committed with lmr Jun 20, 2012
    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>
  2. virt.kvm_vm: Check if qemu support 'boot' parameter for drive option

    zhouqt committed with lmr Jul 6, 2012
    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>
  3. client.tests: kernelinstall: Update control file

    zhouqt committed with lmr Jul 6, 2012
    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>
  4. virt.cfg: Update config for kernel_install

    zhouqt committed with lmr Jul 6, 2012
    Update the default and example config for kernel_install case
    
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
  5. KVM Test: usb_storage: Disable io_size check in RHEL5 guest

    zhouqt committed with lmr Jun 15, 2012
    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>
  6. KVM Test: usb_storage: Ignore letter case when checking removable option

    zhouqt committed with lmr Jun 15, 2012
    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>
Commits on Jul 2, 2012
  1. KVM Test: Add sub test seabios

    zhouqt committed with lmr Jun 29, 2012
    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>
  2. virt.kvm_vm: Add sga device support

    zhouqt committed with lmr Jun 28, 2012
    'sga' device is a type of ISA device, used to display via serial
    console.
    
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Commits on Jun 12, 2012
  1. virt test: multicast: Correct multicast_guest.py script path

    zhouqt committed with lmr Jun 11, 2012
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Commits on Jun 11, 2012
  1. KVM Test: usb_multi_disk: Check usb disk with df cmd in linux guest

    zhouqt committed with lmr Jun 11, 2012
    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>
  2. virt.kvm_vm: Make get_free_usb_port function returns string type port

    zhouqt committed with lmr Jun 11, 2012
    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>
  3. KVM Test: Add config for guest kernel install test

    zhouqt committed with lmr Jan 14, 2012
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
  4. KVM Test: kernel_install.py: Add a kernel installation test

    zhouqt committed with lmr Jan 14, 2012
    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>
  5. client test: Add kernel install case in autotest

    zhouqt committed with lmr Jan 14, 2012
    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>
Commits on Jun 6, 2012
  1. virt: Move PciAssignable out of virt_utils module

    zhouqt committed with lmr Apr 20, 2012
    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>
Commits on Jun 5, 2012
  1. virt.kvm_monitor: Use qmp's screendump cmd if qmp support it

    zhouqt committed with lmr May 28, 2012
    New qemu-kvm version supports 'screendump' cmd
    in qmp monitor, thus we can use it directly.
    
    Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
  2. virt.kvm_monitor: Update monitor log print functions

    zhouqt committed with lmr May 31, 2012
    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>