CS318 - Pintos
Pintos source browser for JHU CS318 course
Typedefs | Functions | Variables
tests.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void test_func(void)
 

Functions

void run_test (const char *)
 Runs the test named NAME. More...
 
void msg (const char *,...)
 Prints FORMAT as if with printf(), prefixing the output by the name of the test and following it with a new-line character. More...
 
void fail (const char *,...)
 Prints failure message FORMAT as if with printf(), prefixing the output by the name of the test and FAIL: and following it with a new-line character, and then panics the kernel. More...
 
void pass (void)
 tests/threads/tests.h More...
 

Variables

test_func test_alarm_single
 
test_func test_alarm_multiple
 
test_func test_alarm_simultaneous
 
test_func test_alarm_priority
 
test_func test_alarm_zero
 
test_func test_alarm_negative
 
test_func test_priority_change
 
test_func test_priority_donate_one
 
test_func test_priority_donate_multiple
 
test_func test_priority_donate_multiple2
 
test_func test_priority_donate_sema
 
test_func test_priority_donate_nest
 
test_func test_priority_donate_lower
 
test_func test_priority_donate_chain
 
test_func test_priority_fifo
 
test_func test_priority_preempt
 
test_func test_priority_sema
 
test_func test_priority_condvar
 
test_func test_mlfqs_load_1
 
test_func test_mlfqs_load_60
 
test_func test_mlfqs_load_avg
 
test_func test_mlfqs_recent_1
 
test_func test_mlfqs_fair_2
 
test_func test_mlfqs_fair_20
 
test_func test_mlfqs_nice_2
 
test_func test_mlfqs_nice_10
 
test_func test_mlfqs_block
 

Typedef Documentation

◆ test_func

typedef void test_func(void)

Definition at line 6 of file tests.h.

Function Documentation

◆ fail()

void fail ( const char *  ,
  ... 
)

Prints failure message FORMAT as if with printf(), prefixing the output by the name of the test and FAIL: and following it with a new-line character, and then panics the kernel.

Definition at line 40 of file lib.c.

References exit(), PANIC, printf(), putchar(), test_name, va_end, va_start, vmsg(), and vprintf().

Referenced by check_file_handle(), check_file_size(), check_tell(), compare_bytes(), main(), seq_test(), test_main(), test_mlfqs_load_1(), test_sleep(), verify(), wrap_open(), and write_some_bytes().

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

◆ msg()

void msg ( const char *  ,
  ... 
)

◆ pass()

void pass ( void  )

tests/threads/tests.h

tests/threads/tests.h

Definition at line 98 of file tests.c.

References printf(), and test_name.

Referenced by test_alarm_negative(), test_alarm_zero(), and test_mlfqs_load_1().

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

◆ run_test()

void run_test ( const char *  )

Runs the test named NAME.

Definition at line 47 of file tests.c.

References test::function, msg(), test::name, name, PANIC, strcmp(), test_name, and tests.

Referenced by run_task().

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

Variable Documentation

◆ test_alarm_multiple

test_func test_alarm_multiple

◆ test_alarm_negative

test_func test_alarm_negative

◆ test_alarm_priority

test_func test_alarm_priority

◆ test_alarm_simultaneous

test_func test_alarm_simultaneous

◆ test_alarm_single

test_func test_alarm_single

◆ test_alarm_zero

test_func test_alarm_zero

◆ test_mlfqs_block

test_func test_mlfqs_block

◆ test_mlfqs_fair_2

test_func test_mlfqs_fair_2

◆ test_mlfqs_fair_20

test_func test_mlfqs_fair_20

◆ test_mlfqs_load_1

test_func test_mlfqs_load_1

◆ test_mlfqs_load_60

test_func test_mlfqs_load_60

◆ test_mlfqs_load_avg

test_func test_mlfqs_load_avg

◆ test_mlfqs_nice_10

test_func test_mlfqs_nice_10

◆ test_mlfqs_nice_2

test_func test_mlfqs_nice_2

◆ test_mlfqs_recent_1

test_func test_mlfqs_recent_1

◆ test_priority_change

test_func test_priority_change

◆ test_priority_condvar

test_func test_priority_condvar

◆ test_priority_donate_chain

test_func test_priority_donate_chain

◆ test_priority_donate_lower

test_func test_priority_donate_lower

◆ test_priority_donate_multiple

test_func test_priority_donate_multiple

◆ test_priority_donate_multiple2

test_func test_priority_donate_multiple2

◆ test_priority_donate_nest

test_func test_priority_donate_nest

◆ test_priority_donate_one

test_func test_priority_donate_one

◆ test_priority_donate_sema

test_func test_priority_donate_sema

◆ test_priority_fifo

test_func test_priority_fifo

◆ test_priority_preempt

test_func test_priority_preempt

◆ test_priority_sema

test_func test_priority_sema