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>
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>
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>
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>
qemu.tests.cfg: Update main monitor in qmp_basic test

As this case define the monitors with its owner name. Need also
update the main_monitor to fit the monitor name change. Otherwise
function monitor() in qemu_vm will return None.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests.cfg: Use image_snapshot for enable snapshot for each guest

Use image_snapshot = yes to cfg file instead of set extra_params. To ignore
the problem that this parameter is set to no in other cfg files which will
corrupte the image.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.libvirt_vm: Fix one line cond-expr

Fix the one line conditional expression which is against PEP8.

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt.get_started: Added non-interactive option

* Added option —-non-interactive to disable yes/no prompt and suppress
  verbose output.

* Added option —-setup-selinux to force setup SELinux contexts for
  shared/data directory and restore them to defaults.

When running libvirt.get_started from scripts such as CI.  It is necessary
to make it non-interactive and keep things under control by using options.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #1124 from spcui/qemu_guest_agent

qemu.tests: add enable s3/s4 params for qemu_guest_agent.cfg
Wrap command domfstrim

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Add config for domfstrim

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
Add test for domfstrim

Signed-off-by: Kyla Zhang <weizhan@redhat.com>
libvirt-tests: virsh_domfstrim, remove global using.

Not necessary to use global variable, just adding a new get_diskmap_size()
call outside can make it work well.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #1139 from ypu/bugfix1

Some small bug fix for qemu tests  1
Merge pull request #1127 from FengYang/update7

Some update and fix master tree - Update7