qemu.tests: update max_memory to keep guest from oom in ksm_base

As the scripts will use some extra memory in guest. So include that when
calculate the max memory can be used for test.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests: Remove unreadable codes from linux console in seabios

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest: Record command output for compare_image in qemu_storage

Record the compare command in debug file for further analyse.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests.cfg: Make floppy_test support Windows guests

As already have the command for Window guests in guest-os cfg files,
remove the only Linux in floppy_test.cfg. And the mount_dir is
a parameter only for Linux guest. So remove the force requirement
for the parameter.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virsh.emulatorpin: fix the way we get a cgroup path

There is a proper method in virttest.staging.utils_cgroup called
"resolve_task_cgroup_path" which is the best way to resolve
a cgroup path for current vm and cgroup controller.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
qemu.test: make set_link test support multiple queues

This patch make set_link test support multiple queues.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: Add vhost_net zero copy test

This patch add vhost_net zero copy test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
util_test.libguestfs: Support choosing disk or domain in VirtTools.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Supplements for guestmount test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
qemu.test: add qemu device options check

This patch add a test for qemu nic device options check

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virt: Fix filesystem type in mtab don't have to be same like fs in mount cmd

example:
   mount -t glusterfs server1:/vol_test /tmp/gmount-dMZ4hf

   cat mtab
     server1:/vol_test /tmp/gmount-dMZ4hf fuse.glusterfs rw,...

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virt: Allows get_net_if filter interfaces by state.

Adds possibility to filter network interface with
if_state == state (UP, DOWN, ...).

Signed-off-by: Jiří Župka <jzupka@redhat.com>
share.cfg.guest-os.Windows.cfg : Modify the regex of e1000 Description

This patch modify the regex of e1000 Description for windowns guest
nic_hotplug test.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virt: Fix import error when AUTOTEST_PATH is relative and work dir is changed.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
virttest: Close and re-establish serial console every test

In order to not pickle Expect and ShellSession objects,
that will lead to one fd leak average per test, make
sure they are closed and reopened at each test, making
the average fd leak on virt-tests to be effectively 0.

With this we've came a long way since the work of fixing
resource leakage on virt-test started. There are more
places to work on, let's keep on working.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.aexpect: Put shell files on aexpect process dir

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.aexpect: Remove the entire aexpect tmp dir on close()

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_vm: Bugfix - make seabios file to be deleted on destroy

Turns out we were clearing self.logs even when there was
a previous vm state. This made the seabios file to not
be deleted during vm cleanup. Let's fix this by moving
initialization of the variable to the right block.

With this, now virt-test won't leave tons of /tmp/seabios*
sockets around even when it is done.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.qemu_vm: Better naming and management of vm create lock file

First of all, the lock file wasn't updated since this
test suite was known as kvm-autotest, second, it wasn't
being properly cleaned up at the end of the creation
process, when it should. So let's fix both problems
at once.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.aexpect: Simplify base dir name

The _spawn suffix is reminiscent of an implementation
detail, so it shouldn't be there.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>