* [Qemu-devel] [PATCH] qtest: include system headers before user headers
@ 2014-02-08 10:41 Stefan Hajnoczi
2014-02-14 14:32 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-02-08 10:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Faerber
It is dangerous to include user headers before system headers since user
macros can affect system headers.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/endianness-test.c | 2 +-
tests/fw_cfg-test.c | 7 +++----
tests/i440fx-test.c | 11 +++++------
tests/m48t59-test.c | 3 ++-
tests/qom-test.c | 3 ++-
tests/rtc-test.c | 5 +++--
tests/tmp105-test.c | 5 +++--
7 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/tests/endianness-test.c b/tests/endianness-test.c
index 646df7d..92e17d2 100644
--- a/tests/endianness-test.c
+++ b/tests/endianness-test.c
@@ -10,7 +10,6 @@
* See the COPYING file in the top-level directory.
*
*/
-#include "libqtest.h"
#include <glib.h>
#include <stdio.h>
@@ -18,6 +17,7 @@
#include <stdlib.h>
#include <unistd.h>
+#include "libqtest.h"
#include "qemu/bswap.h"
typedef struct TestCase TestCase;
diff --git a/tests/fw_cfg-test.c b/tests/fw_cfg-test.c
index e4f355c..5c8f8d6 100644
--- a/tests/fw_cfg-test.c
+++ b/tests/fw_cfg-test.c
@@ -10,15 +10,14 @@
* See the COPYING file in the top-level directory.
*/
-#define NO_QEMU_PROTOS
+#include <string.h>
+#include <glib.h>
#include "libqtest.h"
+#define NO_QEMU_PROTOS
#include "hw/nvram/fw_cfg.h"
#include "libqos/fw_cfg.h"
-#include <string.h>
-#include <glib.h>
-
static uint64_t ram_size = 128 << 20;
static uint16_t nb_cpus = 1;
static uint16_t max_cpus = 1;
diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c
index fa3e3d6..e398b83 100644
--- a/tests/i440fx-test.c
+++ b/tests/i440fx-test.c
@@ -12,12 +12,6 @@
* See the COPYING file in the top-level directory.
*/
-#include "libqos/pci.h"
-#include "libqos/pci-pc.h"
-#include "libqtest.h"
-
-#include "hw/pci/pci_regs.h"
-
#include <glib.h>
#include <string.h>
#include <stdio.h>
@@ -26,6 +20,11 @@
#include <sys/mman.h>
#include <stdlib.h>
+#include "libqtest.h"
+#include "libqos/pci.h"
+#include "libqos/pci-pc.h"
+#include "hw/pci/pci_regs.h"
+
#define BROKEN 1
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
diff --git a/tests/m48t59-test.c b/tests/m48t59-test.c
index 6abc4c8..71b4f28 100644
--- a/tests/m48t59-test.c
+++ b/tests/m48t59-test.c
@@ -11,7 +11,6 @@
* See the COPYING file in the top-level directory.
*
*/
-#include "libqtest.h"
#include <glib.h>
#include <stdio.h>
@@ -19,6 +18,8 @@
#include <stdlib.h>
#include <unistd.h>
+#include "libqtest.h"
+
#define RTC_SECONDS 0x9
#define RTC_MINUTES 0xa
#define RTC_HOURS 0xb
diff --git a/tests/qom-test.c b/tests/qom-test.c
index 5e5af7a..c979a89 100644
--- a/tests/qom-test.c
+++ b/tests/qom-test.c
@@ -6,10 +6,11 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#include "libqtest.h"
#include <glib.h>
#include <string.h>
+
+#include "libqtest.h"
#include "qemu/osdep.h"
static void test_nop(gconstpointer data)
diff --git a/tests/rtc-test.c b/tests/rtc-test.c
index f1b123f..4243624 100644
--- a/tests/rtc-test.c
+++ b/tests/rtc-test.c
@@ -10,8 +10,6 @@
* See the COPYING file in the top-level directory.
*
*/
-#include "libqtest.h"
-#include "hw/timer/mc146818rtc_regs.h"
#include <glib.h>
#include <stdio.h>
@@ -19,6 +17,9 @@
#include <stdlib.h>
#include <unistd.h>
+#include "libqtest.h"
+#include "hw/timer/mc146818rtc_regs.h"
+
static uint8_t base = 0x70;
static int bcd2dec(int value)
diff --git a/tests/tmp105-test.c b/tests/tmp105-test.c
index 5ac48e2..0834219 100644
--- a/tests/tmp105-test.c
+++ b/tests/tmp105-test.c
@@ -6,12 +6,13 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
+
+#include <glib.h>
+
#include "libqtest.h"
#include "libqos/i2c.h"
#include "hw/misc/tmp105_regs.h"
-#include <glib.h>
-
#define OMAP2_I2C_1_BASE 0x48070000
#define N8X0_ADDR 0x48
--
1.8.5.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qtest: include system headers before user headers
2014-02-08 10:41 [Qemu-devel] [PATCH] qtest: include system headers before user headers Stefan Hajnoczi
@ 2014-02-14 14:32 ` Stefan Hajnoczi
2014-02-14 14:42 ` Andreas Färber
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-02-14 14:32 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Peter Maydell, qemu-devel, Anthony Liguori, Andreas Faerber
On Sat, Feb 08, 2014 at 11:41:07AM +0100, Stefan Hajnoczi wrote:
> It is dangerous to include user headers before system headers since user
> macros can affect system headers.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> tests/endianness-test.c | 2 +-
> tests/fw_cfg-test.c | 7 +++----
> tests/i440fx-test.c | 11 +++++------
> tests/m48t59-test.c | 3 ++-
> tests/qom-test.c | 3 ++-
> tests/rtc-test.c | 5 +++--
> tests/tmp105-test.c | 5 +++--
> 7 files changed, 19 insertions(+), 17 deletions(-)
Ping?
Is anyone willing to be qtest maintainer, i.e. you understand qtest, can
review patches, and will send pull requests?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qtest: include system headers before user headers
2014-02-14 14:32 ` Stefan Hajnoczi
@ 2014-02-14 14:42 ` Andreas Färber
2014-02-14 15:46 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2014-02-14 14:42 UTC (permalink / raw)
To: Stefan Hajnoczi, Stefan Hajnoczi
Cc: Peter Maydell, qemu-devel, Anthony Liguori
Am 14.02.2014 15:32, schrieb Stefan Hajnoczi:
> On Sat, Feb 08, 2014 at 11:41:07AM +0100, Stefan Hajnoczi wrote:
>> It is dangerous to include user headers before system headers since user
>> macros can affect system headers.
>>
>> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>> ---
>> tests/endianness-test.c | 2 +-
>> tests/fw_cfg-test.c | 7 +++----
>> tests/i440fx-test.c | 11 +++++------
>> tests/m48t59-test.c | 3 ++-
>> tests/qom-test.c | 3 ++-
>> tests/rtc-test.c | 5 +++--
>> tests/tmp105-test.c | 5 +++--
>> 7 files changed, 19 insertions(+), 17 deletions(-)
>
> Ping?
I felt it wasn't long enough on the list before my v1 PULL. I can pick
it up for v2, now that no one has objected.
> Is anyone willing to be qtest maintainer, i.e. you understand qtest, can
> review patches, and will send pull requests?
I don't feel like the official qtest maintainer, but I care and am
actively working on it. I would consider it best to have individual
tests maintained by subsystem maintainers and only define a maintainer
for the core libqtest.c/qtest.c code.
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qtest: include system headers before user headers
2014-02-14 14:42 ` Andreas Färber
@ 2014-02-14 15:46 ` Stefan Hajnoczi
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-02-14 15:46 UTC (permalink / raw)
To: Andreas Färber
Cc: Stefan Hajnoczi, qemu-devel, Anthony Liguori, Peter Maydell
On Fri, Feb 14, 2014 at 03:42:41PM +0100, Andreas Färber wrote:
> Am 14.02.2014 15:32, schrieb Stefan Hajnoczi:
> > On Sat, Feb 08, 2014 at 11:41:07AM +0100, Stefan Hajnoczi wrote:
> > Is anyone willing to be qtest maintainer, i.e. you understand qtest, can
> > review patches, and will send pull requests?
>
> I don't feel like the official qtest maintainer, but I care and am
> actively working on it. I would consider it best to have individual
> tests maintained by subsystem maintainers and only define a maintainer
> for the core libqtest.c/qtest.c code.
Yes, that makes sense. Do you want to add yourself to MAINTAINERS?
I just want to have someone specific to ping when libqtest.c/qtest.c
patches aren't moving :).
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-14 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-08 10:41 [Qemu-devel] [PATCH] qtest: include system headers before user headers Stefan Hajnoczi
2014-02-14 14:32 ` Stefan Hajnoczi
2014-02-14 14:42 ` Andreas Färber
2014-02-14 15:46 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).