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.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>
virttest.iscsi: Fix a regex and log level

As the newly updated of iscsi related packages, the output of iscsi
session is different from the past, so update the regex when
searching iscsi device name to adapt the update.

If no iscsi device, it should report error instead of debug msg.

Signed-off-by: Yanbing Du <ydu@redhat.com>
setup_or_cleanup_iscsi: Robust assumptions and pep8 fix

When reviewing jferlan's PR(tp-libvirt#47) to fix vol_create_from case,
i found the problems also exist in setup_or_cleanup_iscsi(), so pick up
the fixes:

When setup iscsi env, the function assumed that the iscsi tools
'tgtadm' and 'iscsiadm' were present on the host which may cause
all sorts of errors and failures. So before running these commands,
make sure the tools exist.

Additionally within iscsi_login, extended testing found that the SCSI
/dev/sdxx device didn't instantaneously appear. Sometimes it took an
extra second or two to appear, so added a loop for get_device_name().

Meanwhile, a pep8 fix to make sure no more combined module imports.

Signed-off-by: Yanbing Du <ydu@redhat.com>
Add a parameter to make using a custom path for the env file optional.

The parameter 'other_tests_dirs' is already used for defining
alternative directory for virt tests and using it as a custom
path for the env file is ambiguous. It also forces the file in
that directory for every user with custom virt tests. This commit
separates the parameters allowing for custom env directory and
custom virt tests directory.

Signed-off-by: Plamen Dimitrov <pdimitrov@pevogam.com>
Make guest Autotest verbosity configurable.

Signed-off-by: Plamen Dimitrov <pdimitrov@pevogam.com>
Move any libvirt related warnings that appear even when using solely qemu to a more appropriate place.

The warnings about missing libvirtd come from a check during
importing of the utils_libvirtd module. The module is imported
in env_process and therefore the warnings appear regardless of
whether we use libvirt or qemu. With this commit, the check will
still be performed but the warning will appear only if the user
actually intends to use the libvirtd control system.

Signed-off-by: Plamen Dimitrov <pdimitrov@pevogam.com>
Update network configuration together with all other parameters on QEMU VM creation.

The expected VM behavior is that with the creation of a VM, its
parameters will be updated. This is indeed how it works, however,
with the exception of network configuration which for some reasons
remains the old one and can be updated only if the entire VM object
is reinitialized.

Since in a virt test the VM is generally retrieved from the
environment, we should keep this well defined practice and avoid
reinitializing the VM object ourselves.

Signed-off-by: Plamen Dimitrov <pdimitrov@pevogam.com>
Allow fetching results from multiple guest Autotest runs during one virt test.

This is one of the upgrades necessary for running Autotest on
multiple guests and expanding the original idea of running only
on one main guest (main_vm). There are use cases (e.g. a networking
test) where more than one virtual machines are necessary. In such
cases the guest_autotest_results folder is overwritten by each
following Autotest run on a guest and as a result the folder
contains only the results from the last guest. This patch allows
for generating multiple guest result folders ordered by time of
execution.

Signed-off-by: Plamen Dimitrov <pdimitrov@pevogam.com>
virsh: Add a cellno parameter for virsh.freecell().

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
guest-os: Add JeOS 20 config file and kickstart

Here we have the newest version of the minimal OS used
in virt-test default tests, as well as the asset
file, used to download the iso conveniently with
tools/download_manager.py.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run: Make JeOS 20 the default guest os in the runner

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>