From: Andrew Cooper Date: Fri, 8 Jan 2016 18:18:19 +0000 (+0000) Subject: Rearrange includes X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5b83fd0b6b5bd04b9f9a43edf2d00510541e4300;p=people%2Froyger%2Fxen-test-framework.git Rearrange includes For simplicity, tests should just include and get all the common infrastructure for free. All type definitions should come from . Fix one declaration vs definition mismatch uncovered. Signed-off-by: Andrew Cooper --- diff --git a/include/arch/x86/div.h b/include/arch/x86/div.h index 1985b2d..8e44898 100644 --- a/include/arch/x86/div.h +++ b/include/arch/x86/div.h @@ -1,7 +1,7 @@ #ifndef XTF_X86_DIV_H #define XTF_X86_DIV_H -#include +#include /* * Divide a 64bit number by 32bit divisor without software support. diff --git a/include/arch/x86/lib.h b/include/arch/x86/lib.h index 0ebbe90..1bd0161 100644 --- a/include/arch/x86/lib.h +++ b/include/arch/x86/lib.h @@ -1,7 +1,7 @@ #ifndef XTF_X86_LIB_H #define XTF_X86_LIB_H -#include +#include static inline uint64_t rdmsr(uint32_t idx) { diff --git a/include/arch/x86/mm.h b/include/arch/x86/mm.h index 900468f..59c941e 100644 --- a/include/arch/x86/mm.h +++ b/include/arch/x86/mm.h @@ -1,7 +1,7 @@ #ifndef XTF_X86_MM_H #define XTF_X86_MM_H -#include +#include #include diff --git a/include/xtf/lib.h b/include/xtf/lib.h index d18ac2b..8991db2 100644 --- a/include/xtf/lib.h +++ b/include/xtf/lib.h @@ -4,7 +4,12 @@ #include #include #include +#include +#include #include +#include +#include +#include #include diff --git a/include/xtf/test.h b/include/xtf/test.h index f7ef95e..d28aac9 100644 --- a/include/xtf/test.h +++ b/include/xtf/test.h @@ -17,7 +17,7 @@ void test_main(void); * Boolean indicating whether generic Force Emulation Prefix support is * available for the test to use. */ -extern const bool xtf_has_fep; +extern bool xtf_has_fep; #endif /* XTF_TEST_H */ diff --git a/tests/example/main.c b/tests/example/main.c index e3bc288..c07e934 100644 --- a/tests/example/main.c +++ b/tests/example/main.c @@ -1,6 +1,4 @@ -#include -#include -#include +#include void test_main(void) { diff --git a/tests/selftest/main.c b/tests/selftest/main.c index adae1de..83f7281 100644 --- a/tests/selftest/main.c +++ b/tests/selftest/main.c @@ -1,10 +1,4 @@ -#include -#include -#include - #include -#include -#include #include #include