]> xenbits.xensource.com Git - xtf.git/commitdiff
Move more includes into arch/xtf.h to ease writing tests
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 14 Feb 2018 18:24:46 +0000 (18:24 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 15 Feb 2018 13:50:49 +0000 (13:50 +0000)
It is currently very hit and miss whether functionality is included, and some
current inclusions are already unnecessary.  Make it easier for tests by
putting all common includes in arch/xtf.h, so tests only have to include xtf.h

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
32 files changed:
arch/x86/include/arch/xtf.h
include/xtf.h
include/xtf/hypercall.h
tests/cpuid-faulting/main.c
tests/fpu-exception-emulation/main.c
tests/invlpg/main.c
tests/nested-vmx/util.c
tests/nmi-taskswitch-priv/main.c
tests/pv-iopl/main.c
tests/selftest/main.c
tests/swint-emulation/main.c
tests/umip/main.c
tests/xsa-170/main.c
tests/xsa-173/main.c
tests/xsa-182/main.c
tests/xsa-183/main.c
tests/xsa-185/main.c
tests/xsa-186/main.c
tests/xsa-188/main.c
tests/xsa-191/main.c
tests/xsa-192/main.c
tests/xsa-194/main.c
tests/xsa-195/main.c
tests/xsa-196/main.c
tests/xsa-200/main.c
tests/xsa-204/main.c
tests/xsa-212/main.c
tests/xsa-213/main.c
tests/xsa-224/main.c
tests/xsa-227/main.c
tests/xsa-232/main.c
tests/xsa-234/main.c

index f860b327e41e4fda97b46ae89a84ee1f4b71370d..36a0a500d6bdb90e6b62b200f0e99b223fba5749 100644 (file)
@@ -1,9 +1,15 @@
 #ifndef XTF_X86_XTF_H
 #define XTF_X86_XTF_H
 
+#include <arch/apic.h>
 #include <arch/cpuid.h>
+#include <arch/exinfo.h>
+#include <arch/idt.h>
 #include <arch/lib.h>
+#include <arch/mm.h>
 #include <arch/msr.h>
+#include <arch/pagetable.h>
+#include <arch/symbolic-const.h>
 
 extern char _end[];
 
index 288a861ca11037905a0e61311ae366b20acf564a..fef08df1f17eee230cbe4967e15c4debf9947874 100644 (file)
@@ -21,6 +21,7 @@
 /* Optional functionality */
 #include <xtf/atomic.h>
 #include <xtf/bitops.h>
+#include <xtf/elf.h>
 #include <xtf/exlog.h>
 #include <xtf/grant_table.h>
 #include <xtf/hypercall.h>
index 5143569aa3b81e004cf3702ee4c1b7d2a31b2c82..9be25da0118af6a680fd387a6f1d96bc0d413001 100644 (file)
@@ -29,6 +29,7 @@ extern uint8_t hypercall_page[PAGE_SIZE];
 
 /* All Xen ABI for includers convenience .*/
 #include <xen/callback.h>
+#include <xen/elfnote.h>
 #include <xen/errno.h>
 #include <xen/event_channel.h>
 #include <xen/grant_table.h>
index 3bab8fae77f04849aecf242c06e3a0ed9899eb4f..b10df04fca788066079c06b26cf7620f60c2a0e1 100644 (file)
@@ -21,9 +21,6 @@
  */
 #include <xtf.h>
 
-#include <arch/exinfo.h>
-#include <arch/processor.h>
-
 const char test_title[] = "Guest CPUID Faulting support";
 
 bool test_wants_user_mappings = true;
index 2e89f6148cc722c5bd144f0e8cbe3f193d07e0d2..bb4c688762daeb1f2e26f8edd97ea775ecbf08bf 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/decode.h>
-#include <arch/exinfo.h>
-#include <arch/processor.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "FPU Exception Emulation";
 
 #define CR0_SYM(...) TOK_OR(X86_CR0_, ##__VA_ARGS__)
index 2e5c5190d7b89c1797be03eccebad13e3344b9f8..55a7e6f977f48494967c1f5d1a15b2dfa663ad45 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/decode.h>
-#include <arch/desc.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "Invlpg tests";
 
 /* Swizzle to easily change all invlpg instructions to being emulated. */
index 5cf16c3bfc68ba6459b85f45e4f02d68e1825c4c..e44ae73b43370f1d9261b704975128d5dd27ad6f 100644 (file)
@@ -1,7 +1,5 @@
 #include "test.h"
 
-#include <arch/decode.h>
-
 static void decode_test_exinfo(char *str, size_t n, exinfo_t ex)
 {
     if ( ex == VMERR_SUCCESS )
index 61565cbf1da0b553b40377e8635ec7d64e1e6ef7..3b4aadf80d3523f576fcc1d3cbff1cca3fbe53ce 100644 (file)
@@ -39,8 +39,6 @@
  */
 #include <xtf.h>
 
-#include <arch/apic.h>
-
 const char test_title[] = "Test nmi-taskswitch-priv";
 
 bool test_wants_user_mappings = true;
index ead80a32b5a90722c3c1fb6719dbb4aa08be9889..f6dc5ee7c1d4ac2a25f256c00973c9e708abd6c2 100644 (file)
@@ -40,8 +40,6 @@
  */
 #include <xtf.h>
 
-#include <arch/processor.h>
-
 const char test_title[] = "PV IOPL emulation";
 
 bool test_wants_user_mappings = true;
index 321b0824be82a80728837ad6757ad5dcf3e09b0a..5bff02be40be8e62a2050f20a683a8973f754dc8 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/apic.h>
-#include <arch/idt.h>
-#include <arch/processor.h>
-#include <arch/segment.h>
-
 const char test_title[] = "XTF Selftests";
 bool has_xenstore = true;
 
index 0fb8352df07bbca575d291b6eca40235c9b4eb97..e54ceb78607e46a841b6f6507beb34c1d6f7270b 100644 (file)
@@ -46,9 +46,6 @@
  */
 #include <xtf.h>
 
-#include <arch/processor.h>
-#include <arch/symbolic-const.h>
-
 #include "lowlevel.h"
 
 const char test_title[] = "Software interrupt emulation";
index e4afe81c6895ae6c516163fd2a36127dd4368f94..3b8e17c9ef7f2afb9279ee950e24418ad5cf139d 100644 (file)
@@ -13,8 +13,6 @@
  * @see tests/umip/main.c
  */
 #include <xtf.h>
-#include <arch/exinfo.h>
-#include <arch/processor.h>
 
 const char test_title[] = "User-Mode Instruction Prevention Tests";
 bool test_wants_user_mappings = true;
index f8b4c1b7595a5825c695595eeb8cc21e336ae94b..5a98074b41ffb8ff20a837540a9898915a0b2f4a 100644 (file)
@@ -22,9 +22,6 @@
 
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-170 PoC";
 
 bool test_wants_user_mappings = true;
index 9376e172a6f27a65b9e5e556f130c1d6a5358670..d12956c711d50940da929f13f822e0321417c49f 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/processor.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-173 PoC";
 
 /* New L2 pagetable for the test to manipulate. */
index 2cbe5d99c7d557a9b63de2d623c9aac4fff55e4f..d441a761bcf23518024ed097ef36b8c3159821b7 100644 (file)
@@ -26,9 +26,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-182 PoC";
 
 void test_main(void)
index 12cc7b7865a9479689193d9bb362a376a4e08842..65c7f284a339cf84998adb9938d63e25782d7397 100644 (file)
@@ -37,9 +37,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-183 PoC";
 
 void test_main(void)
index 7a45f09c71885c4eea29a2570e418f33b4043bb6..42b67716adbb3b0ddca6701cc2aba56910b5d9f4 100644 (file)
@@ -35,9 +35,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-185 PoC";
 
 void test_main(void)
index d8766f43bec578e5ca6b21e4e1edc439cbe60b9c..47834bdb120eec9e62e23fbe30d0f23d7362aa64 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/idt.h>
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-186 PoC";
 
 bool test_needs_fep = true;
index a02059af6494184e405bf718dc49405827ba1708..697b494230c4ba2ff2c80a7f4c3ea30a0d2abc35 100644 (file)
@@ -16,7 +16,6 @@
  * @see tests/xsa-188/main.c
  */
 #include <xtf.h>
-#include <arch/mm.h>
 
 const char test_title[] = "XSA-188 PoC";
 
index 275868e65d3b7e0deeb893e14944c742e2d5e757..d446ed83c1c9beb08c551b8e8d49c6c0e8d3d0a7 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/decode.h>
-#include <arch/desc.h>
-#include <arch/exinfo.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-191 PoC";
 
 bool test_needs_fep = true;
index 28c208bb2aefaad2ca2304b757ee447b4a631d95..746e3357b8046de7a8fddb638fdbf4001fc78978 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/desc.h>
-#include <arch/exinfo.h>
-#include <arch/idt.h>
-
 const char test_title[] = "XSA-192 PoC";
 
 /* IDT handler to return from vm86 mode. */
index 5c5f59e2ec8e495776cd0e09385c7b5b7a13b96f..f7e9c672abd3089bc431ae8e33dd853db9140ac5 100644 (file)
@@ -28,9 +28,6 @@
  */
 #include <xtf.h>
 
-#include <xtf/elf.h>
-#include <xen/elfnote.h>
-
 const char test_title[] = "XSA-194 PoC";
 
 ELFNOTE(Xen, XEN_ELFNOTE_BSD_SYMTAB, ".asciz \"yes\"");
index cbf89d4df4fa9a14a4d1225a19087a301fc610e8..eba390b44f33316169faa20a2ea03b8a79676fdd 100644 (file)
  * @see tests/xsa-195/main.c
  */
 #include <xtf.h>
-#include <xen/memory.h>
-
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
 
 const char test_title[] = "XSA-195 PoC";
 
index 16d6bc5d9c243381486550657567b337682aa615..7d4a68fbef0aea225a67653f57785b747b6a78ea 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/exinfo.h>
-#include <arch/idt.h>
-#include <arch/processor.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-196 PoC";
 
 bool test_wants_user_mappings = true;
index c790d815a96aff1f5e7bd8051251fd099e1be0c3..b3e75b007dcd08e6b5dbf977df38eee5c81caf71 100644 (file)
@@ -24,8 +24,6 @@
  */
 #include <xtf.h>
 
-#include <arch/exinfo.h>
-
 const char test_title[] = "XSA-200 PoC";
 
 bool test_needs_fep = true;
index 3d1406fd2975e6890bdd661c58839855a1f0624b..ac8c3c8b2c554fb7bfbe6737a94f1cc5a7580c5e 100644 (file)
@@ -21,8 +21,6 @@
  */
 #include <xtf.h>
 
-#include <arch/processor.h>
-
 bool test_needs_fep = true;
 bool test_wants_user_mappings = true;
 const char test_title[] = "XSA-204 PoC";
index a9233a4a0aab93d1b8f18e9ca9008e35dbda4488..c4293ff9f45ffb25154b1ab8dd38333226bfdda8 100644 (file)
  */
 #include <xtf.h>
 
-#include <arch/decode.h>
-#include <arch/exinfo.h>
-#include <arch/mm.h>
-
 const char test_title[] = "XSA-212 PoC";
 
 void test_main(void)
index 6ecaf11c541c80d03ad053c1aa7217984b0fddd1..d3e713b671ac5a8461c42ed1a9d3b6e6800c6b62 100644 (file)
@@ -22,9 +22,6 @@
  */
 #include <xtf.h>
 
-#include <arch/idt.h>
-#include <arch/processor.h>
-
 const char test_title[] = "XSA-213 PoC";
 
 #define IRET_IDENTIFIER 0xdead
index d05def7e22a92e4e269f657934108018e2e5b51c..d334a53331df1e9b92625fe0b2d8f0305fdf638d 100644 (file)
@@ -18,8 +18,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-
 const char test_title[] = "XSA-224 PoC";
 
 static uint8_t frame[PAGE_SIZE] __page_aligned_bss;
index cd7e8febd54e88a549ca056f4ae4f0b004acfa2a..8bec92b1c76ae53f08a2ae1539b87df372f195ad 100644 (file)
@@ -21,9 +21,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-227 PoC";
 
 static uint8_t frame[PAGE_SIZE] __page_aligned_bss;
index 5686bd75aa2379632c5f57a2ee84b3c536937701..2f649f9ba8cb70d6261e0978db42b2b3fbcf094b 100644 (file)
@@ -17,9 +17,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-232 PoC";
 
 void test_main(void)
index 917455ca5bdb33bcae9972865d8944789a561689..f28a7e3dc3ea8fc654c3b0b8fe84d0e2358e7ce0 100644 (file)
@@ -14,9 +14,6 @@
  */
 #include <xtf.h>
 
-#include <arch/pagetable.h>
-#include <arch/symbolic-const.h>
-
 const char test_title[] = "XSA-234 PoC";
 
 static uint8_t frame1[PAGE_SIZE] __page_aligned_bss;