libguestfs: Add testcases for error_test of guestfs_add.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.test: Fix guestfs_add for new libguestfs version.

In new libguestfs version, all disks will be recognised with /dev/sdx.
But virtio disks of vm will be /dev/vdx in vm.So change gotten
/dev/sdx in guestfish to /dev/vdx if it is necessary.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virt:Fix a hidden bug in virt_filesystems

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt:Add a function to get primary disk filesystem type

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
tests: Add a case to install hck client in Windows guest

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
device_bit_check.cfg: replace scsi_extra_params_hda with blk_extra_params

change the parameter name scsi_extra_params_hda to blk_extra_params.

Signed-off-by: Xiangmin Han <xhan@redhat.com>
qemu.test: make migration_with_netperf support windows guest

This patch make migration_with_netperf test support windows guest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.utils_netperf: make the remote netperf path independent

This patch make the netperf path independent, the script will
re-geting the netperf package name when decompress the compressed
package.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
test.qemu.test: Refactor the code of netperf_udp

This patch refactor the code of netperf_udp using utils_netperf.
also make this test support windows guest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: modify the configration of virtual_nic_send_buffer

We need update the configration of virtual_nic_send_buffer, sinece
refactor the netperf_udp

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virsh: Add options in virsh.restore() fucntion.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt-tests: Use tmp_file for virsh restore

Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
virttest: Destory pre vm in env_process

Destory the pre vm in preprocess_vm. otherwise some strange error
will be produced as some vm object options is different.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
libvirt: Add virsh dompmsuspend command test

New testcase:virsh_dompmsuspend.py/cfg
dompmsuspend(name, target, duration=0, **dargs)
dompmwakeup(name, **dargs)
tests.mac_change: Support file transfer test after mac changing

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.cfg.device_assignment: Add new device_assignment sub case configure.

Signed-off-by: Feng Yang <fyang@redhat.com>
share.cfg.guest-os: Limit pf_mac_change test case on guest.

pf_mac_change case could not work on WinXP.
Set change_cmd parameter for Windows/Linux guest.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests.pci_hotunplug: Support sub test before/after unplugging.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests: Bug fix about drift for timedrift_with_stop

kvm guests CLOCK_MONOTONIC not count when guest is paused,
so drift need to subtract stop_time.

starting from Win2012 Windows no longer relies on number of
injected RTC interrupts for time keeping, and the time drift
is seen because "stop" monitor command also stops PM timer,
so this is unsupported scenario from Win2012 and disabled this
case from Win2012.

changes from v1:
    add some comments for windows guest.
changes from v2:
    add check rtc_clock for windows
changes from v3:
    add new scenario rtc_clock = host and rtc_clock = vm for this case.

Signed-off-by: Shuping Cui <scui@redhat.com>
qemu.tests: bug fix for timedrift_with_cpu_offline

add stop_time after set cpu offline, and update "smp_min" to "smp"
in config file.

changes from v1:
    drift_threshold type fix

Signed-off-by: Shuping Cui <scui@redhat.com>