Re: [PATCH 2/3] tests: invert the return logic in storagepoolcapstest

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

 



On Thu, Mar 07, 2019 at 09:11:45AM +0100, Peter Krempa wrote:
> On Wed, Mar 06, 2019 at 19:16:47 +0100, Pavel Hrdina wrote:
> > This way if the first test "full" fails we will run the second test as
> > well.
> > 
> > Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> > ---
> >  tests/storagepoolcapstest.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> ACK, that's the way almost all our test files use.
> 
> Alternatively by using VIR_AUTOUNREF for both 'fullCaps' and 'fsCaps'
> you can get rid of the whole cleanup label and just return -1 if any of
> the virCapabilitiesNew calls fails. Then use 'ret' only in DO_TEST.

Good point, I'll post a followup patch that will use VIR_AUTOUNREF for
the whole file.

Thanks

Pavel

Attachment: signature.asc
Description: PGP signature

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

  Powered by Linux