virsh.pool_edit: Rewrite case to cover more scenarios

Signed-off-by: Yanbing Du <ydu@redhat.com>
virsh.cpu_compare: Case update and bug fix

1. Add a host feature to VM if it has no cpu feature, avoid skip related
cases.
2. For 'host-model', as libvirt does not model every aspect of each CPU,
so the guest CPU will not match the host CPU exactly. So, after start
guest, just check if the new add cpu features of guest exist on host.
3. Always re-define VM after case finished.

Signed-off-by: Yanbing Du <ydu@redhat.com>
Add time sleep between two attachment commands.
virsh.volume: Case extend and update

Signed-off-by: Yanbing Du <ydu@redhat.com>
Check directory pool permission

Signed-off-by: Yanbing Du <ydu@redhat.com>
nwfilter_define: Update case under update_exist_filter

Since bug 1077009 fixed, the logic updated to not allow update
filter with same name after 1.2.7, so decide the status_error
according to libvirt version for work around this.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.tests: Default to use unsafe for migration testcases.

If there is not 'cache=none' for vm disks, migration will be failed:
error: Unsafe migration: Migration may lead to data corruption if disks use cache != none
So for those cases that do not care about safe, we can pass --unsafe by default.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
migration.tests: Limit some tests to Linux only.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
timer_management: Deal with different date format.

Date&Time format of windows may be Week Month/Day/Year or
Year/Month/Day Week. Now dealing with it in different way.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
tests.multifunction: Search prompt without specified start(^) and end($).

 For some commands, the output may not in normal format:
 nonempty_lines=['parted /dev/vdb "mklabel msdos"',
 'Information: You may need to update /etc/fstab.',
 '                                                [root@atest-guest ~]# ']
 But the shell_prompt defined in configurations will cause unmatched
 to catch the last line for prompt.

 So remove the symbol "^" and "$" to match it in this condition.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
timer.windows: Fix test problems for Windows.

* Filter some testcases that need to change clocksource out
  for Windows.
* Fix parameter error: operation should be stress_type in
  configuration file.
* Windows OS use localtime as hardware time, while Unix is UTC.
  So they should have different checking way.
  TimeZone time in windows should compare with 'UTC time' on host
  for different clock type in XML.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
virsh.edit: New cases for editing memory value and memory unit

Signed-off-by: Yanbing Du <ydu@redhat.com>
avoid risk caused by using count() check user-define-value.

In some scripts,
we use count() to check if the value of self-variable,
needed by special circumstances, has been set or not.
But, it will bring some problem. for example,

 The self-variable declared at the corresponding config file.

 iface_name = "ENTER.BRIDGE.NAME"

 If the user just delete the prompt message and keep it "none".
 the following code will regard 'none' as a valid value without
 any error.

 iface_name = params.get("iface_name")
 if iface_name.count("ENTER"):
     raise error.TestNAError("Please input a existing bridge/ethernet name")

This patch fixes the problem.
libvirt.tests: Add tests for vcpu plug/unplug with different scenarios

Signed-off-by: Yanbing Du <ydu@redhat.com>
Add hybrid support of dompmsuspend command.

For dompmsuspend hybrid configuration,
both 'suspend-to-disk' and 'suspend-to-disk' should be enabled in xml.
Merge pull request #367 from will-Do/pool

virsh.pool_edit: Rewrite case to cover more scenarios
Merge pull request #368 from will-Do/cpu_compare_fix

virsh.cpu_compare: Case update and bug fix
libvirt: remove useless code about guest_unixbench_pids[]

the variable guest_unixbench_pids keeps None all the time,
so utils_misc.kill_process_tree(pid) never be called.
this patch used to remove these useless code.
test.migrate_multi_vms: Check connectivity during migration.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #332 from will-Do/vcpu

libvirt.tests: Add tests for vcpu plug/unplug with different scenarios