From: John Ferlan Date: Tue, 24 Jan 2017 18:45:48 +0000 (-0500) Subject: tests: Add createVHBAByNodeDevice-no-parent to fchosttest X-Git-Tag: CVE-2017-2635~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5319c49ce9beb4f871da23a6b6310e737b9eb013;p=thirdparty%2Flibvirt.git tests: Add createVHBAByNodeDevice-no-parent to fchosttest 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. --- diff --git a/tests/fchosttest.c b/tests/fchosttest.c index 715571e32b..15cda753a0 100644 --- a/tests/fchosttest.c +++ b/tests/fchosttest.c @@ -44,6 +44,15 @@ static const char test7_xml[] = " " ""; +/* virNodeDeviceCreateXML without "" to find the vport capable HBA */ +static const char test8_xml[] = +"" +" " +" " +" " +" " +""; + /* 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);