autotest_regression: Too few arguments for format string

Fix TypeError: not enough arguments for format string

Found by PyCharm inspection.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
autotest_regression: replace error.ValueError with ValueError

I think we mean ValueError here, I couldn't find any error.ValueError.

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
autotest_regression: move copy of install-autotest-server*log outside try/except

We need the install log file to debug any error, so move it outside the
try/except, otherwise any errors will trigger aexpect.ShellCmdError and
skip the copy

Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
virt.test.nic_promisc : send command safely

Some times the kernel or other subsystems might print some info,
that will interfere with aexpect following command prompts and make
this case failed like cmd timeout.
This patch tried to resolve them by creating wrappers

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
libvirt: Fix a bug in virsh_change_media test and modify format

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt: fix virsh edit test.

* we can not assume the guest with 1 vcpu.
Change the pattern in sed from `1<\/vcpu>` to `[0-9]*<\/vcpu>`

* add a vcpucount function in virsh module. And use it in virsh_edit
to get the vcpucount of VM.

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
libvirt: fix virsh_edit.py from pep8

Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
virttest.staging: fix module import error

Fix ImportError when import  "error" module and drop unused module 'common'

Signed-off-by: Xu Tian <xutian@redhat.com>
virsh-schedinfo-qemu-posix: fix the cgroup path

Libvirt has changed the path where cgroups are stored and therefore
the tests fails for newer libvirt because it cannot get the value
of cgroups. To fix this, we should check if the old path exists and
eventualy change the path to new one and for sure also check it.

Also, fix incorrect imports used by the modified tests.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
libvirt: Restrict default test set

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
unattended_install: Fix problem with libvirt

In the recent unattended install patchset, we referred
to a VM attribute, serial_consoles, not present on the
libvirt implementation. So add another exception handling
to avoid libvirt installs breaking.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #695 from liyangfnst/change_media

libvirt: Fix a bug in virsh_change_media test
virttest.utils_net : modify the method of get_linux_ifname

This patch modify the method of get_linux_ifname
we can get the all the nic interface in the guest or
only get the nic interface with mac address we assigned.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
Merge pull request #710 from yangdongsheng/virsh_edit

libvirt: fix for Virsh edit test
add images before image name

Some case will try to create images in shared/data/,
but it should be in shared/data/images/, update the
cfg file of these cases, so that it can create the
images in correct directory.

Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Merge pull request #683 from rbbratta/autotest_regression_fixes

Various autotest_regression fixes
virt: Fix nic_hotplug, nic_hotunplug functions.

There was problem with send_args_cmd which broke all
commands with args
    "net_add id=xxxx,ggg=ddd" -> "net_add xxxx ddd"

Signed-off-by: Jiří Župka <jzupka@redhat.com>
qemu_disk_img: change test file path in guest

"/tmp" is mounted as tmpfs in some guest(eg, ubuntu), so if guest
reboots, files under /tmp will be deleted and qemu_disk_img fails due to
the lost file; This commit changed file path from /tmp to /var/tmp.

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest: Add basic nfs support class

This is a class used to mount nfs to your local. And it can also export local
directories for testing.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
qemu.tests.cfg: Update kernel_install configure.

Current configure not match with code.

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