Tests for updating interface link state.

Update link state by update-device command.
Check link state in guest.
Tests for interface driver.

Supported drivers: virtio-net, e1000, rtl8139.
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>
Wait for device is ready on guest after attach-device operation.
Improve the code.
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: add new test cases for hugepage feature

including the following test,
1) static/transparent hugepage test
2) stress test
3) involving unixbench test
4) compare the usage of hugepage between host and guest
libguestfs: Add some more option test for virt-sysprep

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #364 from rbian/domif_setlink_getlink

Tests for updating interface link state.
Merge pull request #370 from rbian/attach_device

Wait for device is ready on guest after attach-device operation.
Merge pull request #354 from liyangfnst/sysprep

libguestfs: Add some more option test for virt-sysprep
Merge pull request #366 from rbian/domiflist

Tests for interface driver.
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>
Merge pull request #347 from PandaWei/master

libvirt.tests: add new test cases for hugepage feature
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>
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.