]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Add createVHBAByNodeDevice-parent-wwn to fchosttest
authorJohn Ferlan <jferlan@redhat.com>
Tue, 24 Jan 2017 18:49:35 +0000 (13:49 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Sun, 19 Feb 2017 11:45:09 +0000 (06:45 -0500)
Add a test that allows providing the parent wwnn/wwpn in the input XML
in order to create the vHBA.

tests/fchosttest.c

index 15cda753a030c99b53732d8da3f173dd178c9587..d083104dcb70d42d9644d2dc85038ee92ca9f7ec 100644 (file)
@@ -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);