[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 24/29] bios-tables-test: Drop dependence on g
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v6 24/29] bios-tables-test: Drop dependence on global_qtest |
Date: |
Thu, 7 Sep 2017 16:30:25 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/05/2017 05:59 AM, Thomas Huth wrote:
> On 01.09.2017 20:03, Eric Blake wrote:
>> As a general rule, we prefer avoiding implicit global state
>> because it makes code harder to safely copy and paste without
>> thinking about the global state. Although bios-tables-test does
>> not maintain parallel qtest connections, it's just as easy to be
>> explicit about the state; once all tests have been cleaned up, a
>> later patch can then get rid of global_qtest and a layer of
>> wrappers in libqtest.
>>
>> Signed-off-by: Eric Blake <address@hidden>
>> ---
>> tests/bios-tables-test.c | 78
>> +++++++++++++++++++++++++-----------------------
>> 1 file changed, 40 insertions(+), 38 deletions(-)
>>
>> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
>> index 75b29df493..976792f2c5 100644
>> --- a/tests/bios-tables-test.c
>> +++ b/tests/bios-tables-test.c
>> @@ -38,6 +38,7 @@ typedef struct {
>> struct smbios_21_entry_point smbios_ep_table;
>> uint8_t *required_struct_types;
>> int required_struct_types_len;
>> + QTestState *qts;
>> } test_data;
>
> Ah, well, ok, here it is. Please merge this with the previous patch!
Sure, I'll merge the two.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-devel] [PATCH v6 26/29] fw_cfg-test: Drop dependence on global_qtest, Eric Blake, 2017/09/01