Re: [PATCH 01/14] Add test case for virURIPtr classs

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

 



On Thu, Mar 22, 2012 at 11:54:07AM +0800, Osier Yang wrote:
> On 2012年03月21日 01:33, Daniel P. Berrange wrote:
> >From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>
> >
> >To ensure we properly escape&  unescape IPv6 numeric addresses,
> >add a test case
> >
> >* tests/Makefile.am, tests/viruritest.c: URI parsing test
> >---
> >  tests/Makefile.am  |    7 ++-
> >  tests/viruritest.c |  139 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 145 insertions(+), 1 deletions(-)
> >  create mode 100644 tests/viruritest.c
> >


> >+static int testURIParse(const void *args)
> >+{
> >+    int ret = -1;
> >+    virURIPtr uri = NULL;
> >+    const struct URIParseData *data = args;
> >+    char *uristr;
> >+
> >+    if (!(uri = virURIParse(data->uri))) {
> >+        virReportOOMError();
> 
> 
> It's not neccessary to be out of memory error, perhaps
> VIR_DEBUG with a msg is better here.

libxml doesn't do any usefull error reporting here so we
can't find out what is actually wrong :-(


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]