virttest.utils_test: Add BackgroundTest class back.

We need this class in some test script.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_test: Add function get_driver_hardware_id to utils_test

Add function get_driver_hardware_id for virt_win driver related cases.
This function reads hardware_id from the info files of Windows drivers.

changes from v1:
  - update the docstring
  - update the mount and umount part and other small mistakes

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
utils_test.file_tranfer: Update test step info

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=955597

Changes from v1:
 * Fix a syntax problem.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Yiqiao Pu <ypu@redhat.com>
virttest.utils_test: Add a helper function dump_command_output

This helper function is used for dumping output of command executed in guest
to a file that specified.

Signed-off-by: Ken Cao <kcao@redhat.com>
Signed-off-by: Yolkfull Chow <yzhou@redhat.com>

Update interface to date

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
virttest.utils_test: Add fix_atest_cmd() to utils_test

utils_test.fix_atest_cmd() fixes the command
autotest/cli/atest for the external server tests.

e.g.
1. adding -w autotest server argument;
2. adding .../cli prefix/basedir;
and etc..

Signed-off-by: Chen Cao <kcao@redhat.com>
virttest.utils_test: Add get_svr_session()

Signed-off-by: Chen Cao <kcao@redhat.com>
virttest.utils_test: Add get_readable_cdroms function

changes from v1:
 - add function description.
 - improve this function, make it support win/linux guest.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_test: Try to login with serial port if failed to login though net

Signed-off-by: Feng Yang <fyang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_test: Ignore Monitor exception

It's normal that we could not connect qemu monitor during migration.
This patch just ignore the Monitor exception, because the real
check will be done by checking the output.

Signed-off-by: Amos Kong <akong@redhat.com>
virttest.utils_test: Log status if migration end status is not finish or fail.

Signed-off-by: Feng Yang <fyang@redhat.com>
virttest.utils_test: Ignore exception when failing to remove file in guest

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
virttest.utils_test: Workaround for creating guest result dir

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>