qemu.tests.cpu_hotplug: Make cpu hotplug command configurable.

cpu_set command will be removed in new qemu. So make cpu hotplug
 command configurable.

'cpu_set 1 online' will always sent out as human monitor command no matter
 qmp support cpu_set or not.

Update it to 'cpu_set cpu=1,state=online'. send_args_cmd() will transfer
it to correct human monitor command 'cpu_set 1 online'. Or correct qmp
monitor command if qmp support it.

Signed-off-by: Feng Yang <fyang@redhat.com>
tests.netperf: Update iptables stop command to ignore fail status

In some host 'service iptables stop' command exit with error code 5.
It will fail our case.

Signed-off-by: Feng Yang <fyang@redhat.com>
shared.cfg.guest-os.Windows: Ignore post_cmd status in multi_disk case

Signed-off-by: Feng Yang <fyang@redhat.com>
qemu.balloon_check: reset the memory to origin value

The memory should be reset to the origin value after
evict or enlarge. So that the next iterations tests can
pass when check memory before test

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
virttest.qemu_devices: Fix QStringDevice.cmdline problem

when False/None was set as cmdline this device always failed.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
tests: Correct the wrong import module for trans_hugepage_memory_stress

Should import utils under client but not under client.shared.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
shared.control: Update the stress_memory_heavy.control

Fix some variables missing problem and typo.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.aexpect: A work aound for new style class pickle

The new style class will not call __getinitargs__ anymore. So
this will help aexpect works as we expect.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Fix libvirt_xml/vm_xml.

This patch fix define and undefine method in VMXML class to return False
if define or undefine fail.

Fixing the comment of virsh.undefine by the way.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Fix testcases to new XML define-undefine.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
Merge pull request #641 from QiuMike/qemu.balloon_check_reset_the_memory_to_origin_value

qemu.balloon_check: reset the memory to origin value
virttest.qemu_devices: Fix in-code OrderedDict

Fix the correct implementation of itervalues() and add iteritems().

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #647 from ldoktor/add_device2

virttest.qemu_devices: Additional two fixes
virttest.libvirt_xml.vm_xml: Fix undefined variable error

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
monitor: fix pattern of float

@ netdev_add type=tap,id=id1,fds=12:13
  '12:13' would be wrongly matched as a float.

'.' matches an arbitrary char, '\.' matches a dot.

Signed-off-by: Amos Kong <akong@redhat.com>
enable mq feature in qemu cmdline/commands

MQ was disabled in qemu by default, this patch enables it
if user assigns multiple queues, hotplug cases will hotadd
MQ nics.

| commit 32ab06bcf1352848eec42629a85e20efa4e105dc
| Author: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
| Date:   Tue Feb 5 17:47:17 2013 -0600
|
|     hw/virtio-net: disable multiqueue by default
|
|     The new multiqueue feature adds fields to the virtio device config, which
|     breaks Windows guests. Disable the feature by default until the Windows
|     drivers are fixed.

Signed-off-by: Amos Kong <akong@redhat.com>
update config file to assign the queue number

Signed-off-by: Amos Kong <akong@redhat.com>
add testcase to enable MQ feature in guests

Currently MQ feature was disabled by default in guests,
it can be enabled by 'ethtool -L'

This patch added a new testcase to enable all virtio-nic
of all vms, it can be used to enable this feature before
real tests.

Signed-off-by: Amos Kong <akong@redhat.com>
shared: Add GPG keys dir

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.build_helper: Fix problem with verifying signed tags

Michael pointed out that there are 2 problems with the
current implementation of the signed tags verification:

1) If the tag is signed by Malicious.Hacker@somewhere
and you trick gpg into downloading this key, it will still
happily accept the tag as long as it's in the server.
2) If one runs this test from her/his account, it will add
random stuff to her/his .gnupg directory.

In order to bypass chain of trust issues, the user will
specify directly which keys are allowed, those keys will
be copied to a special shared location on virt test
(shared/gpg), the environment variable GNUPGHOME will be
set to a temporary directory, the specified key will be
imported and then the tag will be verified.

CC: Michael S. Tirskin <mst@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>