libguestfs: Add testcases for error_test of guestfs_add.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.test: Fix guestfs_add for new libguestfs version.

In new libguestfs version, all disks will be recognised with /dev/sdx.
But virtio disks of vm will be /dev/vdx in vm.So change gotten
/dev/sdx in guestfish to /dev/vdx if it is necessary.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt: Add virsh net-info command test

New testcase: virsh_net_info.py/cfg
virttest.virsh: virsh net-info function
net_info(network, extra="", **dargs)
virt:Fix a hidden bug in virt_filesystems

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
virt:Add a function to get primary disk filesystem type

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
key_event_form.py: Rewrite from wxPython to PyGTK.

Signed-off-by: Milan Barta <mbarta@redhat.com>
rv_input.py: Rewrite from wxPython to PyGTK.

Signed-off-by: Milan Barta <mbarta@redhat.com>
tests/rv_clearx.py: Removing clearx

It's a lot better to clean interface from rv_connect

Signed-off-by: Tomas Jamrisko <tjamrisk@redhat.com>
qemu/tests/smartcard_setup.py: Clear gnome session.

Clear gnome session in the beginning of the test.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
fullscreen_setup.py: Changing starting vdagent under root.

Signed-off-by: Vimal Patel <vipatel@redhat.com>
Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
libvirt-tests: Fix some emulatorpin errors

* Backup vm's xml for restoration. or the vm xml will change for
  set_emulatorpin cases.

* Move the test process into a try/finally block to ensure environment
  is cleaned up even if exception raised.

* Fix typo in cfg file causing duplicated test name: s/config/live

Signed-off-by: Hao Liu <hliu@redhat.com>
libvirt-test: numatune: Fix some bugs

* VM XML omit numa entry when the placement is auto and mode is strict.
  So we need to set numa_params manually when exception happens.

* Fix typo in cfg file which causes duplicated test name. s/config/live/

* Fix typo. s/KeyError()/KeyError/

* Move restoration of cgroup to finally section to make sure cgroup can
  be restored even when exception happens.

Signed-off-by: Hao Liu <hliu@redhat.com>
virttest: fix login refused when nettype is user

when nettype is 'user' localhost used as hostname by default, and login
windows guest via nc failed; fix it by get hostname/IP address via
socket module;

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.data_dir: add interface to get deps dir

Signed-off-by: Xu Tian <xutian@redhat.com>
virsh.schedinfo_qemu_posix: update the way we get the cgroup path

Now we have a new way how to obtain the correct cgroup path for
specific cgroup controller for a guest.

Let's use the new way also for the "schedinfo_qemu_posix" test.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
staging.utils_cgroup: change the regexp for finding correct cgroup path

The current approach will not properly find the path for "cpu"
controller. I've updated the regexp to match the correct "cpu".

In the "get_cgroup_mountpoint" we are searching the system
cgroup mountpoint from "/proc/mounts" where there could be right
now two types of mounts:

    cgroup on /sys/fs/cgroup/cpuset type cgroup (...)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (...)

The second one makes thinks a little bit harder and we have to check
if the path ends with comma or space.

In the "resolve_task_cgroup_path" the situation is similar. We are
searching the exact path of specified controller for some guest
and there are also two types of records:

    4:cpuacct,cpu:/machine/guest.libvirt-qemu/emulator
    3:cpuset:/machine/guest.libvirt-qemu/emulator

There are thins even harder then the previous case. We need to get
only the 3th part of the record with the path. For the "cpuacct"
we have to consume also the "cpu" and that's why I'm using lookahead
in the regexp instead of the simple match to be able consume always
the remaining controller part until the colon.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virttest: Make macvtap support hotplug

This patch add support of hotplug/unplug nic with macvtap

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: add pktgen stress test

This patch add pktgen stress test for nic test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: add netperf stress test

This patch add netperf stress test for nic test

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: add file copy stress test

This patch add file_copy stress test, you can run multi sessions copy
during test.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>