sendkey: Check for and install required guest utility

The test assumed that 'rsyslog' was installed on the guest as a
way to log whether the running of command resulted in output going
to /var/log/messages.

Since other tests install guest utilities, have this code follow that
same patter to check and install the rsyslog package.  Along the way
fix a couple of other issues...

- The log file checked is /var/log/messages not /var/log/message
- We need to ensure that rsyslog is actually running before using
  NOTE: Using the service command is more "modern" - this test could
        still fail on older OS's that don't use systemd.  I'm not quite
        sure what check would be made there, but this at least works
        for the more modern ones.
- No need to send an "rm -rf None" if "create_file" is None
- Output to /var/log/messages is actually done to a system buffer first,
  then to /var/log/messages.  This can result in test failure if the
  expected text wasn't yet present.  Follow the other example in the
  code and try for 60 seconds before giving up.  I did try to add code
  that would modify the rsyslog config files to change some configuration
  value to require immediate writes, but that got messy - this was just
  simpler.
- Remove 'sendkey_params' / params_test as it really wasn't necessary
  as either this test uses sysrq or not.  Besides the only time the
  create_file_name is used is for the params_test - so use that.
libguestfs.tests: Add test module for partition operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add test module for volume operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libguestfs.tests: Add test module for virt_inspect_operations.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
pool_create: Resolve test errors

Originally posted to virt-test before the commit as PR 1236:

https://github.com/autotest/virt-test/pull/1236

This replaces and resolves issues mentioned from review. The main
difference between this version and the last one posted previously
is that the code now handles the transient 'default' storage pool
not being started prior to the test being run in the "error" case.
I also cleaned up and commented more the finally logic.
snapshot: Catch the VMDeadError while removing snapshots

Catch/handle the VMDeadError while removing snapshots in hopes that by
doing so we won't cause other tests run afterwards to fail because there
are still snapshots present.
find_storage_pool_sources_as: Check for required utilities

In order to run the iscsi and logical tests, the 'tgtadm' and
'iscsiadm' utilities must be installed; otherwise, tests fail.
Add check and skip if not installed.
Add try/except for login_iscsi and create_vg failure

Add a try/except for login_iscsi or create_vg failure.  If the login_iscsi
fails, then we leave with the iscsiadm still logged in if the creation
of the vg fails.  If either fails, then use the exception to propagate
the error.
Merge pull request #51 from jferlan/snapshot

snapshot: Catch the VMDeadError while removing snapshots
Merge pull request #26 from jferlan/sendkey

sendkey: Check for and install required guest utility
Merge pull request #17 from waynesun09/virsh_sysinfo

libvirt.tests: Add virsh sysinfo test case
libvirt.tests: Add test for virsh find-storage-pool-sources

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #18 from will-Do/find_pool_sources

libvirt.test: Add test for virsh find-storage-pool-sources
Merge pull request #33 from jferlan/storage_pool_sources_as

find_storage_pool_sources_as: Check for required utility
Merge pull request #25 from jferlan/pool_create

pool_create: Resolve test errors
Merge pull request #35 from yumingfei/virt_part_oper

libguestfs.tests: Add testcases.
libvirt.tests: Add test for virsh blockjob

Signed-off-by: Yanbing Du <ydu@redhat.com>
Merge pull request #31 from will-Do/blockjob

libvirt.tests: Add test for virsh blockjob
libvirt.tests: Fix blockjob test.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Add virsh domcontrol test case

Check domain control interface state while with or without job (dump,
save, restore, managedsave) on domain. When with job on domain, "occupied"
or "background job" is expected, "ok" is also expected since state is in
change. When without job on domain, 'ok' is expected.

In the test case, use subprocess to create job on domain, while run
domcontrol in loop to check domain control interface state, no strict
check on state as it is changing, only check the command status.

Signed-off-by: Wayne Sun <gsun@redhat.com>