Selftest - Sanity tests for the XTF environment.
More...
#include <xtf.h>
Go to the source code of this file.
Selftest - Sanity tests for the XTF environment.
Definition in file main.c.
◆ anonymous enum
Enumerator |
---|
USER_not_seen | |
USER_seen | |
USER_bad_cs | |
Definition at line 52 of file main.c.
◆ test_xenstore()
static void test_xenstore |
( |
void |
| ) |
|
|
static |
◆ test_extable()
static void test_extable |
( |
void |
| ) |
|
|
static |
◆ test_exec_user_cpl3()
static unsigned long test_exec_user_cpl3 |
( |
void |
| ) |
|
|
static |
◆ test_exec_user()
static void test_exec_user |
( |
void |
| ) |
|
|
static |
◆ test_NULL_unmapped()
static void test_NULL_unmapped |
( |
void |
| ) |
|
|
static |
◆ do_unhandled_exception()
bool do_unhandled_exception |
( |
struct cpu_regs * |
regs | ) |
|
May be implemented by a guest to provide custom exception handling.
Definition at line 105 of file main.c.
◆ test_unhandled_exception_hook()
static void test_unhandled_exception_hook |
( |
void |
| ) |
|
|
static |
◆ test_extable_handler_handler()
static bool test_extable_handler_handler |
( |
struct cpu_regs * |
regs, |
|
|
const struct extable_entry * |
ex |
|
) |
| |
|
static |
◆ test_extable_handler()
static void test_extable_handler |
( |
void |
| ) |
|
|
static |
◆ test_idte_handler()
void test_idte_handler |
( |
void |
| ) |
|
◆ asm()
asm |
( |
"test_idte_handler:;" "mov |
$0x1e51c0de, |
|
|
%eax;" "jmp HYPERCALL_iret;" |
|
|
) |
| |
◆ test_custom_idte()
static void test_custom_idte |
( |
void |
| ) |
|
|
static |
◆ test_driver_init()
static void test_driver_init |
( |
void |
| ) |
|
|
static |
◆ test_vsnprintf_crlf_one()
static void test_vsnprintf_crlf_one |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
◆ test_vsnprintf_crlf()
static void test_vsnprintf_crlf |
( |
void |
| ) |
|
|
static |
◆ test_main()
To be implemented by each test, as its entry point.
- Todo:
- Implement better command line infrastructure, but this will do for now.
Definition at line 281 of file main.c.
◆ asm_checks()
static void asm_checks |
( |
void |
| ) |
|
|
static |
◆ test_title
const char test_title[] = "XTF Selftests" |
The title of the test.
Definition at line 14 of file main.c.
◆ has_xenstore
◆ test_hook_active
volatile bool test_hook_active |
|
static |
◆ test_extable_handler_handler_run
bool test_extable_handler_handler_run |
|
static |
◆ idte
Initial value:= {
.cs = __KERN_CS,
}
#define IS_DEFINED(x)
Evalute whether the CONFIG_ token x is defined.
#define _u(v)
Express an arbitrary value v as unsigned long.
void test_idte_handler(void)
Definition at line 170 of file main.c.