virttest: fix login refused when nettype is user

when nettype is 'user' localhost used as hostname by default, and login
windows guest via nc failed; fix it by get hostname/IP address via
socket module;

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.data_dir: add interface to get deps dir

Signed-off-by: Xu Tian <xutian@redhat.com>
Enable AHCI booting and sync Win2008-32 unattended file format

As NT 6.X OS has a limitation that install on non-AHCI hard drive
would result further booting on AHCI BSOD, this is the solution
to fix, per http://support.microsoft.com/kb/922976
and found that Win2008-32 lacks some cmd to update registry(64 has)
so sync it to same as 64bits, replaced some cmd(software install).

Signed-off-by: Xiaoqing Wei <xwei@redhat.com>
qemu.tests: new case for timedrift testing

changes from V1:
    1. fix typo and update doc strings

Signed-off-by: Xu Tian <xutian@redhat.com>
libguestfs.tests.guestfs_operated_disk: Fix illegal py 2.4 construct

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tests.multi_queues_test: Fix py 2.4 incompatible construct

Rather than using '0b1', a representation not valid in
python 2.4, use 1, which should go for the same effect.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests.pktgen: Fix py 2.4 incompatible construct

For now, try/except/finally blocks shouldn't be used.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu.tests.baloon_check: Fix test exit condition

Here, the author called out to exit(), which is not
the intended effect. The actual exit condition is
`return`.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1246 from autotest/pylint-fixes

Pylint fixes
Merge pull request #1202 from xiaoqing-wei/ahci-booting

Enable AHCI booting and sync Win2008-32 unattended file format
virttest.libvirt_network_unittest: Fix method valid only on py >= 2.7

Use a more generic method, that will work in older
python implementations.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest unittests: Fix method valid only on py >= 2.7

Use older constructs that will make the tests possible
to work on older python versions.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
lvsb: Fix a bug of binary name for sandbox service.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #1247 from yangdongsheng/lvsbs

lvsb: Fix a bug of binary name for sandbox service.
virttest.utils_conn: Fix wrong arguments passed to exception

According to the constructor of ConnPrivKeyError, such
exceptions should be passed a key file and a stderr.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.utils_conn_unittest: Fix method only valid on py >= 2.7

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1249 from autotest/more-pylint-fixes

More pylint fixes
qemu.tests: configuration for new timedrift testing

changes from v1:
    fix typo and add image_snapshot = no for s4

Signed-off-by: Xu Tian <xutian@redhat.com>
shared.deps: script to adjust host/guest time

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.env_process: try to catch windows guest bsod

This patch add bsod images catch when do crash check.
script will check whether the screendump image looks like a
bsod image by calculate the screendump image hamming distance
from the reference image(bsod image). if two images hamming
distance is less than the threshold(10), will mark this
screendump image as suspect, and raise guest BSOD error.
Configuration:
    check_guest_bsod = yes
    bsod_reference_img = XX.jpg (if not configure will use
    all the image under "share/deps/bsod_img")

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>