21#define STA(x) [STATUS_ ## x] = #x
111 xtf_error(
"Test did not report a status\n");
113 printk(
"Test result: %s%s\n",
116 " with warnings" :
"");
128 panic(
"xtf_exit(): hypercall_shutdown(SHUTDOWN_poweroff) returned\n");
void vprintk(const char *fmt, va_list args)
void printk(const char *fmt,...)
static long hypercall_shutdown(unsigned int reason)
void panic(const char *fmt,...)
void xtf_failure(const char *fmt,...)
Report a test failure.
void xtf_error(const char *fmt,...)
Report a test error.
static enum test_status status
Current status of this test.
static void set_status(enum test_status s)
void xtf_report_status(void)
Print a status report.
static const char * status_to_str[]
@ STATUS_RUNNING
Test not yet completed.
@ STATUS_FAILURE
Issue with the tested matter.
@ STATUS_SKIP
Test cannot be completed.
@ STATUS_ERROR
Issue with the test itself.
@ STATUS_SUCCESS
Test was successful.
static bool warnings
Whether a warning has occurred.
void xtf_exit(void)
Exit the test early.
void xtf_skip(const char *fmt,...)
Report a test skip.
bool xtf_status_reported(void)
Query whether a status has already been reported.
void xtf_warning(const char *fmt,...)
Report a test warning.
void xtf_success(const char *fmt,...)
Report test success.
API for reporting test status.
#define SHUTDOWN_poweroff
__builtin_va_list va_list