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>
run: Make safe behavior the default, change options

In order to save time in virt-test:

1) The JeOS image is uncompressed once and reused
   every test, unless it is explicitly asked with
   --restore-image

2) After a test is done, the VMs won't be shut down
   unless it is explicitly asked with --restart-vm

3) After a test is done, the pristine image won't
   be restored, unless it is explicitly asked with
   --restore-image-between-tests

All of those behaviors, while might bring speed ups
to the test process, they are not safe. As users
frequently don't have the visibility of that when
using the test suite, we found out that it's in the
best interest of users and developers that the
defaults are changed to safer options.

With this, the options mentioned above changed to

--keep-guest-running
--keep-image
--keep-image-between-tests

The wording 'guest' was chose over 'vm' due to the
fact we already have --guest-os. So, mostly an attempt
to keep consistency.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@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>
Merge pull request #1227 from autotest/change-defaults-runner

run: Introduce new options, change virt-test default behavior
qemu.tests.cpuinfo_query: Fix #1198

The test is wired up to check RHEL machine types, that
will not be present on anything that is not strictly
RHEL 6.4, so restrict the test to those hosts.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1237 from autotest/fix-1198

qemu.tests.cpuinfo_query: Fix #1198
virsh_migrate_stress: SKIP test if src and dest URI not defined

Issue #1014.  Skip this test if we haven't redefined the source and
destination URI's.
tools/run_pylint.py: Handle unforseen exceptions running pylint

In some testing scenarios, such as daily pylint checking
on py 2.4, we noticed the attempt to inspect some pygtk
code generated problems such as:

RuntimeError: could not open display

Making the rest of the checks to be aborted. Let's handle
the exceptions and print the messages as we should.

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

tools/run_pylint.py: Handle unforseen exceptions running pylint
code checking: Drop exception handling for run_pylint

As we moved the check down the stack (given that we might
want to simply run run_pylint.py instead of the full blown
check_patch.py script).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #1239 from jferlan/virsh_migrate_stress

virsh_migrate_stress: SKIP test if src and dest URI not defined
 guest-os: add RHEL5.10 config

Signed-off-by: Shuping Cui <scui@redhat.com>
virsh_edit: Resolve random/obscure timing failure

Periodically I was getting a failure when the first of the sequence
of virsh_edit's are run in one my long runs using the "--tests virsh"
option. The failing test is/was 'virsh.edit.normal_test.id_option'.
When run alone using "--tests virsh.edit" - the error didn't occur.
After looking at the test for a while I noticed that part of the
processing is to shutdown the guest prior to the last modify_vcpu()
call. Doing that means the 'id' is no longer valid - thus a failure
could occur that wasn't expected. Even after changing that I got a few
more failures and after an attempt to change the sleep() time from 1 to 2
I was directed to the remote.handle_prompts() call which should work.
Merge pull request #1245 from spcui/add_rhel.5.10

 guest-os: add RHEL5.10 config
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>