virttest.virsh: Add wrapper for nodesuspend

Add standard wrapper function in virsh.py for calling virsh command
`nodesuspend`.

Signed-off-by: Hao Liu <hliu@redhat.com>
virttest.qemu_devices: Support aliases in has_device

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_vm: Utilize aliases support in add_pcidevice

qemu_devices support aliases so we can just ask for the desired device.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
virttest.qemu_vm: add_pcidevice bugfixes

* check params of the desired device_driver instead of pci-assign
* log the fail_params instead of the last used param

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
add support extra_cdrom_ks installation for WinNT6.0 guest

Signed-off-by: Xu Tian <xutian@redhat.com>
update ks to execute finish.bat from root partition

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.virsh: Fix API nodedev_list

This commit makes nodedev_list according with other APIs.
(Use virsh optional option name as API keyword argument name)

Signed-off-by: Hao Liu <hliu@redhat.com>
Disable strict host key checking for ssh session

Because of StrictHostKeyChecking=ask is the default setting in ssh config,
If there is no host key for the server, it will show the fingerprint and
ask to confirm, And because of we already set /dev/null as the user host
key database, the ssh connection always waits for the test scripts answers
"yes" for confirmation. So the test scripts will be blocked at this stage.
(unless the option StrictHostKeyChecking has been disabled in command-line
or /etc/ssh/ssh_config or ~/.ssh/config)

Signed-off-by: Lin Ma <lma@suse.com>
virt: Modify return value of virsh.version() function
data_dir: Add target parameter fo get_deps_dir()

With this parameter, get_deps_dir() will only deps folder
which contains target file/folder.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest: Make Numa related functions can work on host have disabled node

Now the functions and classes caculate node id by nodes number. And
in a host have disabled node, it may give scripts the disabled node
id. This patch will fix this problem by use available nodes to decide
the node scripts should use.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
utils_misc: Update mount check function and fix a wrong arg in umount

When checking mountpoints, the nfs type displays 'nfs4' if mount
version 4 NFS server, so use a regex to search the mount items.
NFS not mounted is not an error, so change the message to debug
level.

Remove umount step as it doesn't make sense to umount in a mount
function.

In the umount function, the second arg in utils.system() is timeout,
so fix it as well. Also, disable verbose by default for
mount/umount/is_mount functions.

Signed-off-by: Yanbing Du <ydu@redhat.com>
fix extra_cdrom_ks installation params

Signed-off-by: Xu Tian <xutian@redhat.com>
virttest.env_process: move close serial_console session step

move close serial_console session in the end of postprocess as it'll help
keeping the number of filedescriptors used by virt test.

Signed-off-by: Xu Tian <xutian@redhat.com>
regression.py: don't round in compute average for integers

Signed-off-by: Amos Kong <akong@redhat.com>
regression.py: adjust round bit in calculating rate

Display 4 decimal digits of the rate is less than 100,
display 2 decimal digits of the rate is more than 100.

Signed-off-by: Amos Kong <akong@redhat.com>
regression.py: don't round in middle stage of calculations

For improving the precision, we don't round in the middle stage of
calculations, we just use rounding for the display.

Signed-off-by: Amos Kong <akong@redhat.com>
regression.py: do rounding in display stage

We don't round in middle stage of calculations, this patch
do rounding in display stage.

Display 4 decimal digits of the value is less than 100,
display 2 decimal digits of the value is more than 100.

Signed-off-by: Amos Kong <akong@redhat.com>
regression.py: still display Significance line that contains 'nan' value

T-test might returns 'nan' p-value, Significance line will wrongly miss.

Signed-off-by: Amos Kong <akong@redhat.com>
regression.py: still display Significance line that contains 'nan' value

T-test might returns 'nan' p-value, Significance line will wrongly miss.

Signed-off-by: Amos Kong <akong@redhat.com>