qemu.tests.usb_basic_check: Add a step for checking dmesg msg

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.test.usb_hotplug: Add a negative test

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Add test for 8 devices on usb-hub

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.test.usb_hotplug: Get usb device type from its own params

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virt.qemu_vm: Add missing equal sign

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Merge pull request #525 from zhouqt/usb

qemu: Add 3 tests steps for usb testing

* Check dmesg output after booting with usb device.
* Negative testing for usb hotplug
* Assign max number of devices (8) to usb-hub and check if qemu works well.
virttest.qemu_vm: Remove init_pci_addr from VM.

Now vm.init_pci_addr is effected by previous vm.

We set init_pci_addr to 3 in multi_disk.max_disk, but this case still
fail for:
VMPCIOutOfRangeError: Too many PCI devices added on vm 'virt-tests-vm1',
 max supported '31'

because previous case use default value 4.

As init_pci_addr only used in get_free_pci_addr, so remove it from vm
 and only get init_pci_addr in get_free_pci_addr().
Also set default for init_pci_addr to 3.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.control.kernel-version: Bug fix for control.kernel-version

This patch fix three problems in control.kernel-version:
  - Fix the wrong variable name.
  - Remove the parse_file inside control file for host-kernel.cfg
    Just in clude it as other cfg files in your tests-example.cfg
    which is more flexible. And this also can work with the situation
    that without host-kernel.cfg.
  - Don't get the package version if there is no need for package
    version check.

Also add some docstring for how to use the package filter.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
KVM Test: Add qmp_command test.

This script have coverd following qmp command:
query-hpet, query-kvm, query-mice, query-status
query-name, query-uuid, query-version, query-chardev
query-blockstats, memsave, pmemsave, query-cpus
cpu, query-vnc, query-block, query-commands
query-balloon, balloon, cont, stop
and a negative test with wrong command.

This script will check result by following way:
cmd_result_check = equal, will compare cmd_return_value with qmp command output.
cmd_result_check = contain, will try to find cmd_return_value in qmp command output.
cmd_result_check = m_equal_q, will compare key value in monitor command output and qmp command output.
cmd_result_check = m_in_q, will try to find monitor command output's key value in qmp command output.
cmd_result_check = post_contain, will try to find cmd_return_value in post command output.

This update is base on upstream QMP patchset.

Changes from v1:
Bug fix and update according to ldoktor's comment

Signed-off-by: Feng Yang <fyang@redhat.com>
KVM-test: Add format check for qmp_command test
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests.cfg: Add config for qmp_command.py test script.

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.tests: Make qmp_command suitable for more host

List some case only Host_RHEL.6
Do not run these case in RHEL3, RHEL4 guest.
Reconfig qmp_query-mice test case.
Rename qmp_device_add to qmp_redhat_device_add.
Re-design qmp_command.qmp_query-version test case

Signed-off-by: Feng Yang <fyang@redhat.com>
net: remove redundant evaluation

Valid ifname is provided and used in open_tap(), the
evaluation in the end is redundant, just remove it.

Signed-off-by: Amos Kong <akong@redhat.com>
add definitions of multiqueue

Signed-off-by: Amos Kong <akong@redhat.com>
net: add multiqueue support

Multiqueue feature was supported by kernel/qemu upstream already,
this patch changed Autotest to support command line.

This change compat old qemu/kernel, it will still use 'fd' when
there is only one queue.

More information about multiqueue:
  http://www.linux-kvm.org/page/Multiqueue
  linux/Documentation/networking/tuntap.txt

Signed-off-by: Amos Kong <akong@redhat.com>
net: update hotplug tests

This patch just makes the cases work. I will change cases really
use multi_queue by another split patchset.

Signed-off-by: Amos Kong <akong@redhat.com>
virttest.asset: Pass on restore_image value

With the work made on the asset library, we forgot to
pass the force param to asset.download_file(), as a
result the test runner --restore-image flag stopped
working.

So fix the problem by passing the appropriate option
to that function.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
to add nodememstats function
to add configuration file for virsh nodememstats testcase
to add testcase file for virsh nodememstats command
qemu.tests.cpu_hotplug: Fix timeout issue and typo fix

Test may timeout when check guest's cpu after hotplug.
Update the timeout = 60 + total_cpus.

Update the log message when max cpu reached.
Set autotest case timeout to 2000s in add_max_cpu subcase.
run_autotest always timeout in add_max_cpu case.

Signed-off-by: Feng Yang <fyang@redhat.com>