class TestThread

Defined at line 22 of file ../../zircon/system/utest/core/pager/test_thread.h

Class which executes the specified function on a test thread.

Public Methods

void TestThread (fit::function<bool ()> fn)

Defined at line 25 of file ../../zircon/system/utest/core/pager/test_thread.cc

void ~TestThread ()

Defined at line 27 of file ../../zircon/system/utest/core/pager/test_thread.cc

bool Start ()

Starts the test thread's execution.

Defined at line 34 of file ../../zircon/system/utest/core/pager/test_thread.cc

bool WaitForBlocked ()

Block until the test thread is blocked against a pager.

NOTE: It is only valid to call this in an environment where there is no interference from an

external pager. More specifically, if the test is meant to be run as a component, the caller

cannot rely on a true return value since the thread might be blocked against a system pager.

Defined at line 43 of file ../../zircon/system/utest/core/pager/test_thread.h

bool WaitForTerm ()

Block until the thread terminates.

Defined at line 45 of file ../../zircon/system/utest/core/pager/test_thread.h

bool WaitForSuspend ()

Wait until the thread suspends.

Defined at line 49 of file ../../zircon/system/utest/core/pager/test_thread.h

void Suspend ()

Issue a suspend without waiting for it to complete.

Defined at line 54 of file ../../zircon/system/utest/core/pager/test_thread.h

bool Wait ()

Block until the test thread successfully terminates.

Defined at line 55 of file ../../zircon/system/utest/core/pager/test_thread.cc

void SuspendSync ()

Issue a suspend and wait until the thread successfully suspends.

Defined at line 56 of file ../../zircon/system/utest/core/pager/test_thread.h

bool WaitForFailure ()

Block until the test thread terminates with a validation error.

Defined at line 57 of file ../../zircon/system/utest/core/pager/test_thread.cc

bool WaitForCrash (uintptr_t crash_addr, zx_status_t error_status)

Block until the test thread crashes due to an access to |crash_addr|. The exception report's

|synth_code| field should be set to |error_status|.

Defined at line 59 of file ../../zircon/system/utest/core/pager/test_thread.cc

bool WaitForAnyCrash ()

Block until the test thread crashes for any reason.

Defined at line 63 of file ../../zircon/system/utest/core/pager/test_thread.cc

void Resume ()

Defined at line 63 of file ../../zircon/system/utest/core/pager/test_thread.h

void Run ()

Defined at line 162 of file ../../zircon/system/utest/core/pager/test_thread.cc

bool WaitForBlockedOnPager (zx::thread & thread)

Defined at line 146 of file ../../zircon/system/utest/core/pager/test_thread.cc