On Tue, Jul 17, 2007 at 07:51:13PM +0100, Daniel P. Berrange wrote: > On Tue, Jul 17, 2007 at 02:03:12AM +0100, Daniel P. Berrange wrote: > > This patch is the first step towards supporting USB devices in libvirt > > XML format. As per the original thread some months back[1], I'm the > > grouping is being done based on device classes, rather than bus types. > > So this first patch is actually introducing the concept of 'input' > > devices. This is best illustrated by examples > > My first patch forgot to actually pass the neccessary -usbdevice arguments > to QEMU ! Attaching a revised version which fixes this. > > I've also now got test code for validating QEMU parsing. I'm not attaching > that since its basically just huge quantities of sample XML data and files > with corresponding argv for QEMU, so not really interesting to review. Looks great to me ! > @@ -1091,7 +1159,6 @@ static struct qemud_vm_def *qemudParseXM > } else if (!strcmp((char *)prop, "net")) { > def->os.bootDevs[def->os.nBootDevs++] = QEMUD_BOOT_NET; > } else { > - xmlFree(prop); > goto error; > } > xmlFree(prop); hoho :-) > --- tests/xml2sexprtest.c 16 Jul 2007 21:30:30 -0000 1.13 > +++ tests/xml2sexprtest.c 17 Jul 2007 18:47:15 -0000 > @@ -30,11 +30,11 @@ static int testCompareFiles(const char * > if (!(gotsexpr = virDomainParseXMLDesc(NULL, xmlData, &gotname, xendConfigVersion))) > goto fail; > > - if (getenv("DEBUG_TESTS")) { > - printf("Expect %d '%s'\n", (int)strlen(sexprData), sexprData); > - printf("Actual %d '%s'\n", (int)strlen(gotsexpr), gotsexpr); > - } > if (strcmp(sexprData, gotsexpr)) { > + if (getenv("DEBUG_TESTS")) { > + printf("Expect %d '%s'\n", (int)strlen(sexprData), sexprData); > + printf("Actual %d '%s'\n", (int)strlen(gotsexpr), gotsexpr); > + } > goto fail; > } > that's nicer too ! and nice test suite. I think the only think I should add is extend the rng description based on the doc update after you commit this :-) +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list