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)
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>
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>
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>
qemu.test: add multi queues number change test

This patch add change queues number test for multi queues nic.
also support change queues number test under stress.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test :add max queues test for mq

Add test config for multi queues max queues

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
qemu.test: Modify multi queues tests

This patch rewrite multi queues tests, run netperf using netperf_stress
as a sub tests. using utils_netperf run netperf.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
virsh_snapshot_create_as: Adjustments from review

A review comment/suggestion from @liyangfnst after pull request #1174
was merged to master was to make the entire test use try/finally type
logic so as to only run the xml_recover from one place...

This change implements that concept.
virsh_snapshot_edit: Resolve test errors

Test was failing because the 're.search()' wasn't stripping off the
newline character from the after_xml, thus not allowing the match check
to determine if the <description> changed. Changed the error processing
to list the 15 or so relevant lines from the snapshot dump xml that
could be different if the re.search() fails.

Remove the extraneous .strip() from the after_xml creation since it's
repeated in the snap_xml_compare() method when doing the comparison
with the pre_xml. Also changed the logic on error path to just print
some different lines rather than printing both whole pre/after xml
and forcing an eyeball comparison for why the test failed.
qemu/tests/rv_audio.py: Increase default acceptable pause

Some problems with alsa and loopback devices cause
some stuttering in the audio stream. Let's make the
rv_audio test more lenient, as we're interested in
seeing if there is *some* playback, not focusing in
the quality of the stream.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
qemu/tests/rv_smartcard.py: Rename Gemplus to Gemalto

The smartcard reader is emulated with new name - Gemalto
instead of Gemplus. So check for this name.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>
client_guest_shutdown.py: Destroy VM gracefully.

If the shutdown is not successful, destroy the VM
gracefully, so It does not stay alive.

Signed-off-by: Marian Krcmarik <mkrcmari@redhat.com>