Re: [PATCH 08/18] tests: Known failing tests should never succeed

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

 



On Thu, 2015-08-06 at 11:23 +0200, Jiri Denemark wrote:
> 
> > @@ -302,6 +297,19 @@ cpuTestGuestData(const void *arg)
> >      virCPUDefFree(host);
> >      virCPUDefFree(cpu);
> >      virCPUDefFree(guest);
> > +
> > +    if (data->result < 0) {
> > +        virResetLastError();
> > +        if (ret < 0) {
> > +            ret = 0;
> > +        } else {
> > +            VIR_TEST_VERBOSE("\n%-70s... ",
> > +                             "cpuGuestData/cpuDecode was expected 
> > "
> > +                             "to fail but it succeeded");
> > +            ret = -1;
> > +        }
> > +    }
> > +
> 
> This would apply to any failure, but when, e.g., loading the XML 
> files
> or memory allocation fails, we want to fail the test even if it was
> expected to fail. This conditional statement should only be applied 
> when
> cpuDecode or cpuGuestData fails.

Right. I have changed the code so that it can tell these two kinds
of failure apart and act accordingly.

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team

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