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