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>
Add test for virt-win-reg.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
libvirt.tests: Add virsh sysinfo test case

Add virsh sysinfo case and cfg file.

As sysinfo output varies on different platform (ARMv7, s390x, PowerPC,
!WIN32 && x86), only check processor part which each platform sysinfo
output contain, and compare cpu version from processor node xml in
sysinfo with dmidecode output, skip check if dmidecode command fail.

Signed-off-by: Wayne Sun <gsun@redhat.com>
Add new testcase virsh_save_image_define

The testcase virsh_save_image_define make a test for
virsh subcommand: save-image-dumpxml save-image-define

Signed-off-by: Guannan Ren <gren@redhat.com>
iface_trans: Need to check for required utility

The test uses the 'locate' utility to find the network-scripts, but
does not first determine if it's installed resulting in FAILures rather
than SKIP's.
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.
lvsb.tests: add network options test cases for the virt-sandbox cmdline

Signed-off-by: Alex Jia <ajia@redhat.com>
Tests.vol_create_from: Replace pool operations with libvirt_storage module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Move nfs/iscsi setup&cleanup to utils_test module.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
libvirt.tests: Replace volume operations with libvirt_storage.PoolVolume.

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>
attach_device: Change SKIP into PASS/FAIL

If a failure is expected for an unsupported option, then we should return
PASS not SKIP. Likewise, if it wasn't expected we should return FAIL.
Since expectedly failing is a return of True, analyze_negative_results()
also needs to adjust its expectations with respect to return status.
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.
libvirt-test: Add test for libvirt pci passthrough.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #46 from yangdongsheng/pci_passthrough

libvirt: Add test for pci passthrough for libvirt guest.
libvirt-test/pci_passthrough: Add a case in pcipassthrough to test SRIOV.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>