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