Re: [PATCH v1 36/37] Adapt to VIR_ALLOC and virAsprintf in tests/*

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

 



On 07/04/2013 02:06 PM, Michal Privoznik wrote:
> ---
>  tests/commandtest.c              |  8 ++------
>  tests/libvirtdconftest.c         |  4 +---
>  tests/qemumonitortestutils.c     | 17 +++++------------
>  tests/securityselinuxlabeltest.c | 21 +++++----------------
>  tests/securityselinuxtest.c      |  8 +++-----
>  tests/virnetmessagetest.c        | 20 +++++---------------
>  tests/virstoragetest.c           |  5 +----
>  7 files changed, 22 insertions(+), 61 deletions(-)

tests/commandhelper.c:80:    if (VIR_ALLOC_N(newenv, n) < 0)
tests/commandhelper.c-81-        return EXIT_FAILURE;

tests/testutils.c:106:                if (virVasprintf(&str, msg, vargs) == 0) {
tests/testutils.c-107-                    fprintf(stderr, "%s", str);
tests/testutils.c-108-                    VIR_FREE(str);
tests/testutils.c-109-                }


tests/virhashtest.c:21:        if (virAsprintf(&str, __VA_ARGS__) == 0) {
         \
tests/virhashtest.c-22-            fprintf(stderr, "%s", str);
         \
tests/virhashtest.c-23-            VIR_FREE(str);
         \
tests/virhashtest.c-24-        }

These don't need to log an error (and this list isn't exhaustive).

I'm looking forward to v2.

Jan

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