67msg (
const char *format, ...) 
 
   83fail (
const char *format, ...) 
 
   93  PANIC (
"test failed");
 
#define PANIC(...)
Halts the OS, printing the source file name, line number, and function name, plus a user-specific mes...
 
int vprintf(const char *format, va_list args)
The standard vprintf() function, which is like printf() but uses a va_list.
 
int putchar(int c)
Writes C to the vga display and serial port.
 
int printf(const char *format,...)
Writes formatted output to the console.
 
#define va_start(LIST, ARG)
 
__builtin_va_list va_list
GCC has <stdarg.h> functionality as built-ins, so all we need is to use it.
 
int strcmp(const char *a_, const char *b_)
Finds the first differing characters in strings A and B.
 
void run_test(const char *name)
Runs the test named NAME.
 
void pass(void)
Prints a message indicating the current test passed.
 
void fail(const char *format,...)
Prints failure message FORMAT as if with printf(), prefixing the output by the name of the test and F...
 
void msg(const char *format,...)
Prints FORMAT as if with printf(), prefixing the output by the name of the test and following it with...
 
static const struct test tests[]
 
static const char * test_name
 
test_func test_priority_donate_chain
 
test_func test_priority_fifo
 
test_func test_alarm_multiple
 
test_func test_priority_donate_nest
 
test_func test_priority_donate_lower
 
test_func test_alarm_zero
Tests timer_sleep(0), which should return immediately.
 
test_func test_alarm_negative
Tests timer_sleep(-100).
 
test_func test_priority_condvar
 
test_func test_mlfqs_fair_20
 
test_func test_alarm_simultaneous
 
test_func test_mlfqs_nice_2
 
test_func test_priority_change
 
test_func test_priority_preempt
 
test_func test_mlfqs_nice_10
 
test_func test_priority_donate_one
 
test_func test_alarm_single
 
test_func test_priority_donate_multiple2
 
test_func test_priority_sema
 
test_func test_priority_donate_sema
 
test_func test_mlfqs_fair_2
 
test_func test_mlfqs_block
 
test_func test_mlfqs_load_avg
 
test_func test_mlfqs_load_60
 
test_func test_mlfqs_load_1
Verifies that a single busy thread raises the load average to 0.5 in 38 to 45 seconds.
 
test_func test_mlfqs_recent_1
Checks that recent_cpu is calculated properly for the case of a single ready process.
 
test_func test_priority_donate_multiple
 
test_func test_alarm_priority