Add 4 cases to test following guestfish commands

blockdev-getbsz
blockdev-getsize64
blockdev-getss
blockdev-getsz
libvirt.test: Add 'mode' test(agent) for virsh reboot

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
libvirt.tests: Add test for vol-resize

Signed-off-by: Yanbing Du <ydu@redhat.com>
lvsb: Add simple cases for complex options testing

Signed-off-by: Alex Jia <ajia@redhat.com>
lvsb: sync security options cases with latest sandbox framework

Signed-off-by: Alex Jia <ajia@redhat.com>
Merge pull request #105 from yumingfei/lvsb_complex_options

LVSB: Lvsb complex options
guestfish_block_dev: fix a minior issue

1.Modify the way of parsing the string, it can be sutiable for more
situtation
2.Remove the fs type from cfg file, it's useless to block_dev test
Merge pull request #98 from vanbogithub/bfan-dev

Add 4 cases to test following guestfish commands
Merge pull request #73 from will-Do/vol_resize

libvirt.tests: Add test for vol-resize
virsh.list: When setting title, add proper option to virsh.desc

Commit id '58fd81a8' added the --title testing for virsh.list; however,
the add of the title was done to the --config and for a running domain
that didn't have expected results. Adjust the add of the title to be
based on the expected state of the domain.

Signed-off-by: John Ferlan <jferlan@redhat.com>
virsh.attach_device: Skip login if vm is not alive

For the case where the vm is not alive, then skip doing the login() call
since there are multiple timeouts in play. One in particular - the call
to wait_for_get_address() has a 300 second timeout. If we fall into that
timeout, we can wait for up to 6 minutes per test run. When there's 16
devices that adds up to 96 minutes of waiting for no good reason.

Signed-off-by: John Ferlan <jferlan@redhat.com>
update_device: Add changes from prior to split

When tp-libvirt was split from virt-test, all PR's were closed - this
PR is adding back the changes made by myself and cevich from PR #1171.

Adjust the test to use the newer --live option rather than --persistent.

Also fix issue with shut_off_option testing.  When a guest is off, the
failure should only be if someone passed the --live flag.  Add the
shut_off_option testing to the normal_test list and use the diff_file
check to ensure that a shutdown guest would be updated.  The --live
option processing should only affect the running guest and not the
configuration after shutdown

Signed-off-by: John Ferlan <jferlan@redhat.com>
update_device: version-specific behavior

* Added --persistent and --config version-specific behavior checks.
* Updated test to use disk device XML class.
* Re-worked result checking logic to be easier to read

jferlan added cevich's change plus the suggested disk.xmltreefile.write()
call from code review

Signed-off-by: John Ferlan <jferlan@redhat.com>
update_device: Fixes to get things to work

Adjust prior set of changes to make things work.

1. Add a cdrom device to guest
   Not sure if somewhere along the way when the code was first developed
   if the cdrom was part of the guest or not or if some previous test just
   happened to leave one around... In any case, the current code doesn't
   have one for the guest - so I added code to add one

2. Adjust create_attach_xml
   Rather than rely on hardcoded device and bus, pass it along.  Some one
   in the future can do the work to make them more configurable to have
   virtio instead of ide, but for now go with the ide bus & hde device

3. Adjust is_attached
   Pass the device name and fix the indention on the return True; otherwise,
   it was never hit.

4. libvirt_library_version
   Remove the code from here - I actually moved this version of how to parse
   the 'virsh version' output into the provider code (see PR #82). Thus this
   code also makes use of that new code.

5. Moved the state/setup closer to where it's used

6. Modified the flag_list setup code - I found that doing a flag.split("--")
   of an empty flag list (eg. "".split("--")) returned [''] instead of [],
   so I adjusted the logic slightly to account for that.

7. Create the cdrom device in order for it to be updated.  Initial device
   will be "orig.iso" and it'll be changed to "test.iso" or "test_diff.iso".

8. Fix the "diff_iso" logic - it's a boolean not a value

9. Fix the 'inactive_attached' logic to look at the inactive_device

Signed-off-by: John Ferlan <jferlan@redhat.com>
libvirt.test: Add mode(agent) test for shutdown

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
schedinfo_qemu_posix: Add cases change schedinfo by xml

This patch changed cputune info in domain xml and then restart the
domain to validate it with cgroup observation. This is a regression
test base on a known bug.

Also the emulatorpin test is changed to fit new vm_xml.

Signed-off-by: Hao Liu <hliu@redhat.com>
Merge pull request #81 from Hao-Liu/fix_schedinfo

schedinfo_qemu_posix: Add cases change schedinfo by xml
guestfish_block_dev: Add two cases for test API

1. blockdev-rereadpt
2. canonical-device-name
guestfish_block_dev: Add three cases for test API

1. device-index
2. list-devices
3. disk-format
guestfish_block_dev: Add three cases to test API

1. max-disks
2. nr-devices
3. list-partitions