]> xenbits.xensource.com Git - people/liuw/xtf.git/commitdiff
Create xtf.h and avoid using xtf/lib.h as the include-all header
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 1 Apr 2016 18:00:45 +0000 (19:00 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 28 Apr 2016 10:37:37 +0000 (11:37 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
13 files changed:
common/exlog.c
include/xtf.h [new file with mode: 0644]
include/xtf/lib.h
tests/cpuid/main.c
tests/example/main.c
tests/msr/main.c
tests/pv-iopl/main.c
tests/selftest/main.c
tests/swint-emulation/main.c
tests/xsa-122/main.c
tests/xsa-123/main.c
tests/xsa-167/main.c
tests/xsa-168/main.c

index b347a493c4a13950df0829b9b4c71f87e613e668..80efba7b6fa62880fec6b7dfac157ae5203a3c26 100644 (file)
@@ -1,5 +1,7 @@
 #include <xtf/lib.h>
+#include <xtf/console.h>
 #include <xtf/exlog.h>
+#include <xtf/numbers.h>
 
 static bool logging = false;
 static unsigned int log_entries;
diff --git a/include/xtf.h b/include/xtf.h
new file mode 100644 (file)
index 0000000..35c5b44
--- /dev/null
@@ -0,0 +1,37 @@
+/**
+ * @file include/xtf.h
+ *
+ * Convenience header for tests.
+ */
+#ifndef XTF_H
+#define XTF_H
+
+/* Primitives */
+#include <xtf/compiler.h>
+#include <xtf/types.h>
+#include <xtf/numbers.h>
+
+#include <xtf/lib.h>
+#include <xtf/libc.h>
+
+/* Core test functionality */
+#include <xtf/report.h>
+#include <xtf/test.h>
+
+/* Optional functionality */
+#include <xtf/console.h>
+#include <xtf/exlog.h>
+#include <xtf/hypercall.h>
+#include <xtf/traps.h>
+
+#endif /* XTF_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
index ab0df446d6c326deb083dfec3729329c60fc8db3..6da9d1472177512642f38fc67ba4fbee653acddc 100644 (file)
@@ -1,16 +1,7 @@
 #ifndef XTF_LIB_H
 #define XTF_LIB_H
 
-#include <xtf/types.h>
 #include <xtf/compiler.h>
-#include <xtf/console.h>
-#include <xtf/exlog.h>
-#include <xtf/hypercall.h>
-#include <xtf/libc.h>
-#include <xtf/numbers.h>
-#include <xtf/report.h>
-#include <xtf/test.h>
-#include <xtf/traps.h>
 
 #include <arch/x86/lib.h>
 
index f89ad6c9e5afa6c5cf8da883ad6dd4c2160e9476..adb5bc1c31862e61c7a9fa0cff1096de12336310 100644 (file)
@@ -9,7 +9,7 @@
  *
  * @sa tests/cpuid/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 static void dump_leaves(
     void (*cpuid_fn)(uint32_t leaf, uint32_t subleaf,
index 1a34726cbbe3eefce13e387285bb1c1e36817299..9b1e5b0c753d2c791cdb8be816d9c0d60a4ddd39 100644 (file)
@@ -8,7 +8,7 @@
  *
  * @sa tests/example/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 void test_main(void)
 {
index 391a320e4964f5be6fc63ed9cb877707d53af83d..2685420b20e736ebfcb787c85cd1449f92d25c47 100644 (file)
@@ -11,7 +11,7 @@
  *
  * @sa tests/msr/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 static int rdmsr_safe(uint32_t msr, uint64_t *val)
 {
index 91e4b6bedcb47f46502fa7c9617b437263406fd7..c446071940b55fcf63cb9513d637ac079094a72f 100644 (file)
@@ -38,7 +38,7 @@
  *
  * @sa tests/pv-iopl/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 #include <arch/x86/processor.h>
 
index 7181bf47b82bc0a6024d4c63deb70a0051ec5870..553b05a04270496761c09e9bed9a502d129cb410 100644 (file)
@@ -9,7 +9,7 @@
  *
  * @sa tests/selftest/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 #include <arch/x86/processor.h>
 #include <arch/x86/segment.h>
index b266c5a1602b9e9aaf9e9416a568662c79f575fe..f570f4d3fe89891c820ffc20ad61485d0647197b 100644 (file)
@@ -44,7 +44,7 @@
  *
  * @sa tests/swint-emulation/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 #include <arch/x86/processor.h>
 #include <arch/x86/symbolic-const.h>
index 3ae47972bfc1f2e6bd1404ea61dd77273c20462e..bdd7685d7f1d6546f92684bdbd0cbe58a85889bd 100644 (file)
@@ -20,7 +20,7 @@
  *
  * @sa tests/xsa-122/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 /*
  * Check a buffer of a specified size for non-NUL bytes following the string
index 67479b5ee6af1a94985f7acab96f584eaba21a66..2542b41841082c8dadcd1061f15a3ea05b44d2e7 100644 (file)
@@ -27,7 +27,7 @@
  *
  * @sa tests/xsa-123/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 void test_main(void)
 {
index e9cda6e168dc650bac6d4e9efbc683ebf8fd0ca3..d4bd4e3562f6352211458faf41d2af0e47777f26 100644 (file)
@@ -25,7 +25,7 @@
  *
  * @sa tests/xsa-167/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 void test_main(void)
 {
index d473b4f60fec4b47a85770230d07f9366c733a08..c049b8ddfc755788375d9cb08d83dd25e1d30fb7 100644 (file)
@@ -29,7 +29,7 @@
  *
  * @sa tests/xsa-168/main.c
  */
-#include <xtf/lib.h>
+#include <xtf.h>
 
 void test_main(void)
 {