qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-next 1/5] tests: Add e1000 qtest


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-next 1/5] tests: Add e1000 qtest
Date: Fri, 07 Feb 2014 19:06:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Am 07.02.2014 16:48, schrieb Stefan Hajnoczi:
> On Wed, Feb 05, 2014 at 06:01:13PM +0100, Andreas Färber wrote:
>> +#include "libqtest.h"
>> +
>> +#include <glib.h>
>> +#include <string.h>
>> +#include "qemu/osdep.h"
> 
> Please put <system.h> includes before "user.h" includes.  That way we
> can be sure our macros don't mess up system headers.

You are right in this case, but to my defense I copied this from another
file. ;) You'll find the "libqtest.h"-first pattern in:

endianness-test.c
fw_cfg-test.c
i440fx-test.c
m48t59-test.c
qom-test.c
rtc-test.c
tmp105-test.c

To make it clearer which example to copy from, feel free to submit a
patch cleaning those up.

NB in general it can be a valid technique to place a single "user.h" in
user.c before the usual <system> and "user" headers to assure that it
does not depend on external includes, but clearly that's not the case here.

>> +
>> +static void nop(void)
>> +{
>> +}
> 
> I suggest a comment here to explain the point of this test:
> /* The point of this test case is just to instantiate the device */

Thanks, will add a TODO.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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