qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/6] tests/libqtest: Make qmp_assert_success() i


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 6/6] tests/libqtest: Make qmp_assert_success() independent from global_qtest
Date: Tue, 13 Aug 2019 10:24:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 8/13/19 4:30 AM, Thomas Huth wrote:
> The normal libqtest library functions should never depend on global_qtest.
> Pass in the test state via parameter instead. And while we're at it,
> also rename this function to qtest_qmp_assert_success() to make it clear
> that it is part of libqtest.
> 
> Signed-off-by: Thomas Huth <address@hidden>
> ---
>  tests/libqtest.c         | 4 ++--
>  tests/libqtest.h         | 6 ++++--
>  tests/virtio-scsi-test.c | 3 ++-
>  3 files changed, 8 insertions(+), 5 deletions(-)
> 

> +++ b/tests/virtio-scsi-test.c
> @@ -225,7 +225,8 @@ static void test_iothread_attach_node(void *obj, void 
> *data,
>      mkqcow2(tmp_path, 64);
>  
>      /* Attach the overlay to the null0 node */
> -    qmp_assert_success("{'execute': 'blockdev-add', 'arguments': {"
> +    qtest_qmp_assert_success(scsi_pci->pci_vdev.pdev->bus->qts,
> +                       "{'execute': 'blockdev-add', 'arguments': {"
>                         "   'driver': 'qcow2', 'node-name': 'overlay',"
>                         "   'backing': 'null0', 'file': {"
>                         "     'driver': 'file', 'filename': %s}}}", tmp_path);
> 

Indentation is now off.  Minor, so:

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]