qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 5/6] tests/libqtest: Move global_test wrapper


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v2 5/6] tests/libqtest: Move global_test wrapper function into a separate header
Date: Thu, 5 Sep 2019 09:06:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 04/09/2019 21.09, Eric Blake wrote:
> On 9/4/19 1:51 PM, Stefan Hajnoczi wrote:
>> On Wed, Sep 04, 2019 at 03:00:46PM +0200, Thomas Huth wrote:
>>> diff --git a/tests/libqtest-single.h b/tests/libqtest-single.h
>>> new file mode 100644
>>> index 0000000000..49259558a5
>>> --- /dev/null
>>> +++ b/tests/libqtest-single.h
> 
>>> +static inline QTestState *qtest_start(const char *args)
>>> +{
>>> +    global_qtest = qtest_init(args);
>>
>> Where are global_qtest and qtest_init() declared?  I would expect
>> compilation to fail if a .c file included just "libqtest-single.h".
> 
> In patch 5, "libqtest.h" declares global_qtest, then includes
> "libqtest-single.h"; no file includes it standalone.  Then in patch 6,
> the roles are swapped; "libqtest-single.h" declares global_qtest and
> includes "libqtest.h".  But yes, the commit message could do better in
> explaining this.

Right. Let me add something like this to the patch description here:

"The new header is only included from libqtest.h for now, so that there
is no difference to the users of libqtest.h yet. In the next patch, we
will switch this, so that the users of the global_qtest-related
functions will be using libqtest-single.h directly and libqtest.h
becomes completely independent of this."

 Thomas

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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