Commit Graph

4 Commits

Author SHA1 Message Date
Andrea Bolognani
8df2f1d874 tests: scsihost: Use fakerootdir instead of fakesysfsdir
This updates the test program to make it consistent with recent changes
to the mock libraries, and also opens up the possibility of mocking more
than just /sys in the future.
2015-12-09 15:22:59 +01:00
Andrea Bolognani
8e3122faf5 tests: scsihost: Don't set LIBVIRT_FAKE_SYSFS_DIR
The test program is not preloading any of the mock libraries that read
that environment variable, so setting it is pointless.
2015-12-09 15:22:58 +01:00
John Ferlan
ef48a1b613 scsi_host: Introduce virFindSCSIHostByPCI
Introduce a new function to parse the provided scsi_host parent address
and unique_id value in order to find the /sys/class/scsi_host directory
which will allow a stable SCSI host address

Add a test to scsihosttest to lookup the host# name by using the PCI address
and unique_id value
2014-07-21 12:55:11 -04:00
John Ferlan
fbd91d496e virutil: Introduce virReadSCSIUniqueId
Introduce a new function to read the current scsi_host entry and return
the value found in the 'unique_id' file.

Add a 'scsihosttest' test (similar to the fchosttest, but incorporating some
of the concepts of the mocked pci test library) in order to read the
unique_id file like would be found in the /sys/class/scsi_host tree.
2014-07-21 12:55:11 -04:00