[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 12/14] tests/test-logging: Fix test for -dfilter 0..0xffff
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 12/14] tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff |
Date: |
Wed, 22 Apr 2020 17:19:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Philippe Mathieu-Daudé <address@hidden> writes:
> Hi Markus,
>
> On 4/22/20 3:07 PM, Markus Armbruster wrote:
>> Fixes: 58e19e6e7914354242a67442d0006f9e31684d1a
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> tests/test-logging.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/test-logging.c b/tests/test-logging.c
>> index 6387e4933f..8580b82420 100644
>> --- a/tests/test-logging.c
>> +++ b/tests/test-logging.c
>> @@ -73,10 +73,10 @@ static void test_parse_range(void)
>> g_assert(qemu_log_in_addr_range(UINT64_MAX));
>> g_assert_false(qemu_log_in_addr_range(UINT64_MAX - 1));
>> - qemu_set_dfilter_ranges("0..0xffffffffffffffff", &err);
>> + qemu_set_dfilter_ranges("0..0xffffffffffffffff", &error_abort);
>
> Why sometime use this form, ...
>
>> g_assert(qemu_log_in_addr_range(0));
>> g_assert(qemu_log_in_addr_range(UINT64_MAX));
>> -
>> +
>> qemu_set_dfilter_ranges("2..1", &err);
>> error_free_or_abort(&err);
>
> ... and then this other form?
The first form crashes when the function sets an error.
The second from crashes when the function doesn't set an error, or else
frees the error.
All clear?
[PATCH v2 06/14] fdc: Fix fallback=auto error handling, Markus Armbruster, 2020/04/22
[PATCH v2 03/14] cpus: Fix configure_icount() error API violation, Markus Armbruster, 2020/04/22
[PATCH v2 10/14] io: Fix qio_channel_socket_close() error handling, Markus Armbruster, 2020/04/22
[PATCH v2 11/14] migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling, Markus Armbruster, 2020/04/22
[PATCH v2 07/14] bochs-display: Fix vgamem=SIZE error handling, Markus Armbruster, 2020/04/22
[PATCH v2 13/14] qga: Fix qmp_guest_get_memory_blocks() error handling, Markus Armbruster, 2020/04/22
[PATCH v2 08/14] virtio-net: Fix duplex=... and speed=... error handling, Markus Armbruster, 2020/04/22