qemu-devel
[Top][All Lists]
Advanced

[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: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v6 24/29] bios-tables-test: Drop dependence on global_qtest
Date: Tue, 5 Sep 2017 12:59:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

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!

 Thomas



reply via email to

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