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>
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>
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)
qemu.tests.virtual_nic_send_buffer: Update the way used to checkout md5 in guest

md5 command in guest may have different output format. It is a little difficult to
filter out the md5 value from the output. So just checkout whether correct md5 value
is in the output is enough.

Signed-off-by: Feng Yang <fyang@redhat.com>
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>
qemu.tests: Add pf hotplug test case.

Signed-off-by: Feng Yang <fyang@redhat.com>
Merge pull request #1290 from FengYang/virtual_nic_send_buffer

qemu.tests.virtual_nic_send_buffer: Update the way used to checkout md5 ...
tests.jumbo: Modify cfg of jumbo tests.

For windows guest when using e1000 the max icmp size is not
"jumbopacket - 28", but "jumbopacket - 42", so modify the cfg.

This patch also modify the coding style to up to the pep8.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
tests.jumbo: make jumbo test support macvtap

This patch make jumbo test support macvtap. when using macvtap nic,
before chang the mtu of the macvtap, must change the base interface
mtu.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
block_resize.cfg: RHEL5 need reboot step in block_resize case

Guest RHEL5 could not detect disk change, assign need_reboot
as yes in the cfg file. And disable RHEL.4 guest.

history:
  V3:
    add no filter for RHEL.4 guest
  V2:
    change to RHEL.5 condition
  V1:
    add RHEL and 5 condition lines

Signed-off-by: Xiangmin Han <xhan@redhat.com>