virttest.env_process: Tcpdump is stopped too early

Tcpdump is required to get ARP ip when calling wait_for_login.
Stopping it before wait_for_login will make wait_for_login hang for 240s

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt-tests: Backup inactive domain XML

* Added option to toggle saving active or inactive domain XML for
  libvirt_vm.backup_xml

* Added '--inactive' option when dumping xml for backup when calling
  virsh.dumpxml or libvirt_vm.backup_xml. Without this option, the new
  domain restored will change its inactive xml like following diff permanently.

* using vmXML.new_from_inactive_xml instead of vmXML.new_from_xml to
  backup domain.

```diff
@@ -41,7 +41,9 @@
       <target type='serial' port='0'/>
     </console>
     <input type='mouse' bus='ps2'/>
-    <graphics type='vnc' port='-1' autoport='yes'/>
+    <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
+      <listen type='address' address='127.0.0.1'/>
+    </graphics>
     <video>
       <model type='cirrus' vram='9216' heads='1'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x0'/>
@@ -50,4 +52,5 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
     </memballoon>
   </devices>
+  <seclabel type='dynamic' model='selinux' relabel='yes'/>
 </domain>
```

Signed-off-by: Hao Liu <hliu@redhat.com>
virsh_secret_set_get: Prepare for upstream change

An upstream change to libvirt:

https://www.redhat.com/archives/libvir-list/2013-November/msg00400.html

results in the output starting with a single space rather than
at the beginning of the line - this change will account for that
with an appropriately placed '.lstrip()'.

Also, if fail the check for the existence of the base64_file, then
indicate that's what the failure is rather than what would be a
false message of "The secret value mismatch with result" because
the secret_decoded_string is empty.
virsh_volume: Adjust for upstream change

Upstream change adjusted the output of the virsh vol-list command
output to have a space in the front of the line, see:

https://www.redhat.com/archives/libvir-list/2013-November/msg00380.html

Add a strategic ".lstrip()" to the re.search() on the output
qemu.tests: add enable s3/s4 params for qemu_guest_agent.cfg

since miss the enable s3/s4 params when create the qemu-kvm command
for qemu_guest_agent..check_suspend test.

Signed-off-by: Shuping Cui <scui@redhat.com>
qemu.test: add test case for guest suspend under nic stress

This patch add test case of guest suspend under nic stress

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virt.test: modify vhost config for file_transfer test

Currently for non-MSIX guest, qemu will disable vhost_net automatically,
even vhost is enabled. using vhostfoce=on to force enable vhost-net.
This patch modify the test configuration, only test "vhostforce=on"
on non-MSIX guest.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virttest.utils_test.__init__: Add detail error log in get_time()

Also PEP8 fixes in get_time function

Signed-off-by: Feng Yang <fyang@redhat.com>
shared.cfg.guest-hw: Add raw_dd variant.

This variant test raw image which created by dd command.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.cfg.virtual_nic_send_buffer: Update configure for netperf_udp sub case.

We change to use netperf under shard/deps folder by default in netperf_udp.
So update virtual_nic_send_buffer.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.cfg.host-kernel: Set nettype to bridge when vhost used

vhost only works nettype = bridge

Signed-off-by: Feng Yang <fyang@redhat.com>
tests: Update test cases use vm_arch_name instead of platform

platform is an old parameter we used. Should use vm_arch_name now.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Use parameter vm_arch_name to judge guest os arch

image_name may be customized and not end with 64.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Calculate fill timeout based on the ksm size

As the ksm size is calculate based on guest and host memory status,
when we run tests in big host, we need fill very big size of memory.
With current set up, it will failed with timeout to wait the results.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Add flags for add_flag test

Some flags need to be added depends on the host type for the add_flag
test of boot_cpu_model.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Correct the timeoout type to float

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Merge pull request #1113 from jferlan/virsh_volume

virsh_volume: Adjust for upstream change
Merge pull request #1130 from ldoktor/add_device3

qemu.tests.pci_devices: Support for lspci verification
Merge pull request #1129 from ypu/ksm

Enlarge ksm overcommit test time
Merge pull request #1121 from humanux/vhostforce

virt.test: modify vhost config for file_transfer test