libvirt.test: Fix bugs and remove cases from detach-device

1.Remove some cases for cdrom test
2.Check if option is supported by libvirt

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Support migration job for domjobabort test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add test module for vm disk's discard.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Support verification for migrate compcahce test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add testcase of compressed option for migrate.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add scsi disk test for virsh.migrate.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add compressed migration for stress tests.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
blockresize: Skip the qed test if not supported.

1) Skip the qed test for newer libvirt who don't support this format.

2) Fix raw checking math to fix an error.

Signed-off-by: Hao Liu <hliu@redhat.com>
Add tests for unix_socks_* in libvirtd.conf

Test unix_sock_* parameter in libvird.conf.

1) Change unix_sock_* in libvirtd.conf;
2) Restart libvirt daemon;
3) Check if libvirtd successfully started;
4) Check if libvirtd socket file changed accordingly;

Signed-off-by: Hao Liu <hliu@redhat.com>
dac_start_destroy: Add dac test cases

DAC is default enabled security driver in libvirt. In this start
and destroy test, cover per-VM DAC setting, global configuration
in qemu.conf alone testing and mix per-VM and global testing.

Signed-off-by: Wayne Sun <gsun@redhat.com>
dac_start_destroy: Replace qemu conf sync function

The utils_config module updated, the sync function is removed,
update test case to use utils_libvirtd module for restart libvirtd
after conf change.

Signed-off-by: Wayne Sun <gsun@redhat.com>
dac_start_destroy: Add case to cover security_default_confined as 0

Add case for cover unconfined DAC testing, 2 cases added to cover bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1105939

New cases with 'security_default_confined = 0' and seclabel as:
<seclabel type='none' model='dac' relabel='yes'/>

Signed-off-by: Wayne Sun <gsun@redhat.com>
dac_start_destroy: Update set_seclabel function to use list

Update according to vm_xml module change.

Signed-off-by: Wayne Sun <gsun@redhat.com>
virsh_nodeinfo: Also compare cpu topolopy with virsh capabilities output

Signed-off-by: Yanbing Du <ydu@redhat.com>
dac_start_destroy: Add cases for set_process_name as 1

When set_process_name as 1 in qemu conf, libvirt will have QEMU
set its process name to "qemu:VM_NAME", add test cases enable it
and check the qemu command.

Adjust set qemu.conf before per-VM seclabel, as seclabel will be
affected after qemu conf change.

Signed-off-by: Wayne Sun <gsun@redhat.com>
libvirt.test: Skip test if disk source is a volume

when execute undefine with '--remove-all-storage', the
associated storage volumes will be removed, it's dangerous
for domain.

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
dac_start_destroy: Use attr function when set qemu conf

Use attr functions to set values in conf.

Signed-off-by: Wayne Sun <gsun@redhat.com>
attach_device: Support more device target bus for disk attach

1. libvirt support virtio, usb and scsi device target bus for disk attach,
so move class VirtIODiskBasic to VirtualDiskBasic to support target bus
specified in cfg.
2. Add two positive cases for usb and scsi disk attach and two negative
cases.

Signed-off-by: Yanbing Du <ydu@redhat.com>
attach_device: Fail early if attach-device command return value is not
expected

If test fail at attach-device step, it's unnecessary to run
preboot_action  and postboot_action steps.

Signed-off-by: Yanbing Du <ydu@redhat.com>
attach_device: Skip serial relate test if it not supported

Signed-off-by: Yanbing Du <ydu@redhat.com>