[PATCH 14/15] tests: Add createVHBAByNodeDevice-parent-wwn to fchosttest

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

 



Add a test that allows providing the parent wwnn/wwpn in the input XML
in order to create the vHBA.

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

diff --git a/tests/fchosttest.c b/tests/fchosttest.c
index 15cda75..d083104 100644
--- a/tests/fchosttest.c
+++ b/tests/fchosttest.c
@@ -53,6 +53,17 @@ static const char test8_xml[] =
 "  </capability>"
 "</device>";
 
+/* virNodeDeviceCreateXML using "<parent wwnn='%s' wwpn='%s'/>" to find
+ * the vport capable HBA */
+static const char test9_xml[] =
+"<device>"
+"  <parent wwnn='2000000012341234' wwpn='1000000012341234'/>"
+"  <capability type='scsi_host'>"
+"    <capability type='fc_host'>"
+"    </capability>"
+"  </capability>"
+"</device>";
+
 /* Test virIsVHBACapable */
 static int
 test1(const void *data ATTRIBUTE_UNUSED)
@@ -282,6 +293,9 @@ mymain(void)
     if (virTestRun("manageVHBAByNodeDevice-no-parent", manageVHBAByNodeDevice,
                    test8_xml) < 0)
         ret = -1;
+    if (virTestRun("manageVHBAByNodeDevice-parent-wwn", manageVHBAByNodeDevice,
+                   test9_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