tools.check_patch: Use working dir for project checking

Search LICENSE file from the current working dir instead of the
../check_patch.py file directory, which makes it possible to use
one script to check any autotest-like project.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.virsh: Add blockresize() API

Add new API to support the libvirt test
virsh_blockresize

Signed-off-by: Guannan Ren <gren@redhat.com>
Fix parameters for LibvirtXMLError calls

Initially seen in vm_xml/sync() - the raising of the exception passed
3 paramters instead of the __init__ required 2:

   File "/home/virt-test/virttest/libvirt_xml/vm_xml.py", line 376, in sync
     raise xcepts.LibvirtXMLError("Failed to undefine %s.", self.vm_name)
 TypeError: __init__() takes at most 2 arguments (3 given)

Since I was fixing this one - I looked for others. Found the pool_xml/
pool_rename() condition as well, so I modified it too.
virt: Fix bug in removing of remote_sessions.

It is not possible remove items from list which is
iterated in one cycle.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virttest.standalone_test: Close file handler at the end of test

Free up resources at the end of each test, as we should
have done anyway.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1450 from autotest/fd-problem

virttest.standalone_test: Close file handler at the end of test
Merge pull request #1448 from jzupka/fix_remove_sessions

virt: Fix bug in removing of remote_sessions.
Merge pull request #1427 from ldoktor/framework

tools.check_patch: Use working dir for project checking
virttest.virsh: Add wrapper for migrate-compcache

Add standard wrapper function in virsh.py for calling virsh command
migrate-cimpcache.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt_xml: remove the import of utils_test in devices.

There is a cycle import chain as below:

utils_test->VMXML->librarian->utils_test.

Then we will get a error when we use libvirt_xml:
    from virttest.libvirt_xml import vm_xml
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/__init__.py", line 45, in <module>
    from virttest.libvirt_xml.vm_xml import VMXML
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/vm_xml.py", line 10, in <module>
    from virttest.libvirt_xml.devices import librarian
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/libvirt_xml/devices/librarian.py", line 6, in <module>
    import virttest.utils_test
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/utils_test/__init__.py", line 38, in <module>
    import libvirt
  File "/home/yds/github-autotest/github-autotest/client/tests/virt/virttest/utils_test/libvirt.py", line 25, in <module>
    from virttest.libvirt_xml import vm_xml
ImportError: cannot import name vm_xml

This patch remove this unnecessary import line in librarian.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt_xml: fix issues from run_pep8 tool.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
virttest: Mass indentation fix

This time, brought to you by the program inspektor.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virtio-win: reorganize restrictions

Place the "unattended_install.cdrom, whql.support_vm_install" clause
on top, and avoid repeating it throughout.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: commonize virtio_network_installer_path settings

These only depend on 32- vs. 64-bit.  Do not repeat it for all tuples.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: commonize virtio driver path settings

They do not depend on the service path.  The aim is to match the
CD paths to the cartesian config file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: automatically add virtio cd for virtio installs

Use the defines in guest-hw.cfg to find out.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: automatically add virtio floppy for XP and 2k3

Can do it, now that virtio-win.cfg is only sourced for virtio
installs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: update default paths for latest virtio-win.iso

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: add virtio_scsi_path

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-win: remove unused variable

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>