23# define COND(_32, _64) _32
25# define COND(_32, _64) _64
35 printk(
" Got %pe as expected\n",
_p(got));
static void ltr(unsigned int sel)
void printk(const char *fmt,...)
void test_main(void)
To be implemented by each test, as its entry point.
const char test_title[]
The title of the test.
user_desc gdt[NR_GDT_ENTRIES]
#define EXINFO_SYM(exc, ec)
unsigned int exinfo_t
Packed exception and error code information.
#define X86_VEC_AVAIL
Available for test use.
#define _ASM_EXTABLE_HANDLER(fault, fixup, handler)
Create an exception table entry with custom handler.
static void exec_user_void(void(*fn)(void))
static bool check_ts(struct cpu_regs *regs, const struct extable_entry *ex)
#define STR(x)
Stringise an expression, expanding preprocessor tokens.
#define _p(v)
Express an abitrary integer v as void *.
void xtf_success(const char *fmt,...)
Report test success.
unsigned long fixup
Fixup address.
#define SEL_EC_SYM(sel,...)
Create a selector based error code using X86_EC_ mnemonics.
#define GDTE_SYM(base, limit,...)
As INIT_GDTE_SYM(), but creates a user_desc object.
void check(const char *func, exinfo_t got, exinfo_t exp)
Compare an expectation against what really happenend, printing human-readable information in case of ...
static void pack_intr_gate(env_gate *g, unsigned int sel, unsigned long offset, unsigned int dpl, unsigned int other)