Xen Test Framework
setup.c
Go to the documentation of this file.
1
7#include <xtf/compiler.h>
8#include <xtf/hypercall.h>
9#include <xtf/framework.h>
10#include <xtf/test.h>
11#include <xtf/console.h>
12#include <xtf/report.h>
13
21{
22 arch_setup();
23
24 printk("--- Xen Test Framework ---\n");
25 printk("Environment: %s\n", environment_description);
26 printk("%s\n", test_title);
27
28 test_setup();
29
30 if ( !xtf_status_reported() )
31 {
32 test_main();
33 }
34
35 /* Report status and exit. */
36 xtf_exit();
37}
38
43{
45 BITS_PER_LONG != 64);
46}
47
48/*
49 * Local variables:
50 * mode: C
51 * c-file-style: "BSD"
52 * c-basic-offset: 4
53 * tab-width: 4
54 * indent-tabs-mode: nil
55 * End:
56 */
const char environment_description[]
Definition: setup.c:30
void test_setup(void)
Definition: setup.c:289
void arch_setup(void)
Definition: setup.c:246
static void build_assertions(void)
Some basic assertions about the compile environment.
Definition: setup.c:42
void xtf_main(void)
Entry point into C.
Definition: setup.c:20
#define __noreturn
Definition: compiler.h:10
#define __maybe_unused
Definition: compiler.h:13
void printk(const char *fmt,...)
Definition: console.c:134
Interfaces used by common code, needing to be implemented by arch/environment specific code.
#define BUILD_BUG_ON(cond)
Definition: lib.h:24
API for tests.
void test_main(void)
To be implemented by each test, as its entry point.
Definition: main.c:110
const char test_title[]
The title of the test.
Definition: main.c:24
#define BITS_PER_LONG
Definition: limits.h:12
void xtf_exit(void)
Exit the test early.
Definition: report.c:124
bool xtf_status_reported(void)
Query whether a status has already been reported.
Definition: report.c:119
API for reporting test status.