[PATCH 13/15] tests: Add createVHBAByNodeDevice-no-parent to fchosttest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a test that allows not providing a parent in the input XML, but still
being able to create finding a VPORT capable NPIV HBA.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 tests/fchosttest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/fchosttest.c b/tests/fchosttest.c
index 715571e..15cda75 100644
--- a/tests/fchosttest.c
+++ b/tests/fchosttest.c
@@ -44,6 +44,15 @@ static const char test7_xml[] =
 "  </capability>"
 "</device>";
 
+/* virNodeDeviceCreateXML without "<parent>" to find the vport capable HBA */
+static const char test8_xml[] =
+"<device>"
+"  <capability type='scsi_host'>"
+"    <capability type='fc_host'>"
+"    </capability>"
+"  </capability>"
+"</device>";
+
 /* Test virIsVHBACapable */
 static int
 test1(const void *data ATTRIBUTE_UNUSED)
@@ -270,6 +279,9 @@ mymain(void)
     if (virTestRun("manageVHBAByNodeDevice-by-parent", manageVHBAByNodeDevice,
                    test7_xml) < 0)
         ret = -1;
+    if (virTestRun("manageVHBAByNodeDevice-no-parent", manageVHBAByNodeDevice,
+                   test8_xml) < 0)
+        ret = -1;
 
  cleanup:
     VIR_FREE(fchost_prefix);
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux