virt.tests : add watchdog device test support

this patch add watchdog device test support.

Signed-off-by: Yunping Zheng <yunzheng@redhat.com>
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>
qemu.tests.cdrom: Add a cdrom locked case

Lock status should only works for tray open. So the
cdrom should can be closed under locked status.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cfg: Add cdrom locked case in cfg files

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests: cdrom.py: Add sub test support

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.cfg: Update config files for cdrom with acpi testing

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.qemu_vm: Support cdrom device without iso filename

This patch make qemu_vm module work with a cdrom device
without assigning an iso file to it.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cdrom: Add lock check case when media is not present

Add the case that check if the cdrom can be locked without the media
presend.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
qemu.tests.cdrom: make cdrom test compatible with rhel6 and rhel7

RHEL6 qmp monitor uses "tray_open" string to identify cdrom tray
status, but rhel7 uses "tray-open" string.
This patch is about to make cdrom test script compatible with
rhel6 and rhel7 qmp monitor output.

This patch also makes script print steps to INFO log file.

Signed-off-by: Xu Tian <xutian@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Yiqiao Pu <ypu@redhat.com>