Xen Test Framework
Functions
report.h File Reference

API for reporting test status. More...

#include <xtf/types.h>
#include <xtf/compiler.h>
+ Include dependency graph for report.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void xtf_success (const char *fmt,...)
 Report test success. More...
 
void xtf_warning (const char *fmt,...)
 Report a test warning. More...
 
void xtf_skip (const char *fmt,...)
 Report a test skip. More...
 
void xtf_error (const char *fmt,...)
 Report a test error. More...
 
void xtf_failure (const char *fmt,...)
 Report a test failure. More...
 
void xtf_report_status (void)
 Print a status report. More...
 
bool xtf_status_reported (void)
 Query whether a status has already been reported. More...
 
void xtf_exit (void)
 Exit the test early. More...
 

Detailed Description

API for reporting test status.

A test is expected to report one of:

'Success' indicates that everything went well, while 'Skip' indicates that the test cannot be completed for configuration reasons. 'Error' indicates a bug in the test code or environment itself, while 'Failure' indicates a bug in the code under test.

If multiple statuses are reported, the most severe is the one which is kept.

Definition in file report.h.

Function Documentation

◆ xtf_success()

void xtf_success ( const char *  fmt,
  ... 
)

Report test success.

Definition at line 38 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_warning()

void xtf_warning ( const char *  fmt,
  ... 
)

Report a test warning.

Does not count against a test success, but does indicate that some problem was encountered.

Definition at line 52 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_skip()

void xtf_skip ( const char *  fmt,
  ... 
)

Report a test skip.

Indicates that the test cannot be completed. This may count as a success or failure, depending on the opinion of the tester.

Definition at line 66 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_error()

void xtf_error ( const char *  fmt,
  ... 
)

Report a test error.

Indicates an error with the test code, or environment, and not with the subject matter under test.

Definition at line 80 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_failure()

void xtf_failure ( const char *  fmt,
  ... 
)

Report a test failure.

Indicates that the subject matter under test has failed to match expectation.

Definition at line 94 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_report_status()

void xtf_report_status ( void  )

Print a status report.

If a report has not yet been set, an error will occur.

Definition at line 108 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xtf_status_reported()

bool xtf_status_reported ( void  )

Query whether a status has already been reported.

Definition at line 119 of file report.c.

+ Here is the caller graph for this function:

◆ xtf_exit()

void xtf_exit ( void  )

Exit the test early.

Reports the current status. Does not return.

Definition at line 124 of file report.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: