class LdLoadZirconProcessTestsBase

Defined at line 19 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

This is the common base class for test fixtures to launch a Zircon process.

Public Members

static optional kTestExecutableNeedsVdso
static const int64_t kRunFailureForTrap
static const int64_t kRunFailureForBadPointer

Public Methods

void ~LdLoadZirconProcessTestsBase ()

Defined at line 119 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

const char * process_name ()

Defined at line 16 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

int64_t Run ()

This just folds together Start() and Wait(), below.

Defined at line 108 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

std::pair<int64_t, zx::channel> RunWithCustomBootstrap ()

Like Run(), but tells Start() not to send the standard "main" bootstrap

message (only, possibly, the startup dynamic linker message). Instead the

sender side of the bootstrap channel is returned.

Defined at line 113 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

Protected Methods

const zx::process & process ()

Defined at line 43 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

void set_process (zx::process process)

A subclass calls this when not using CreateProcess().

Defined at line 20 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

void CreateProcess ()

A subclass calls CreateProcess() to set process(), root_vmar(), and thread().

Defined at line 25 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

const zx::vmar & root_vmar ()

These are set by CreateProcess() and used by Start() and Run().

Defined at line 52 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

const zx::thread & thread ()

Defined at line 53 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

zx::channel Start (bool custom_bootstrap)

Start the process() using all those parameters. If bootstrap() has a

pending message being built, that's completed and sent as the startup

dynamic linker's message. Then, if custom_bootstrap is false, a standard

"main" (libc) message (TODO(mcgrathr): will be) sent. Finally, the sender

side of the bootstrap channel is returned in case the test wants to either

send its own messages or read replies from the test module.

Defined at line 56 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

int64_t Wait ()

Wait for the process to die and collect its exit code.

This clears the process() so a new one can be installed.

Defined at line 38 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.cc

TestProcessArgs & bootstrap ()

This is used by Start() and Run(). If it's not empty() when they're

called, its pending startup dynamic linker message gets packed and sent.

Defined at line 57 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

uintptr_t entry ()

These are used by Start() and Run(). The subclass must set them first.

Defined at line 60 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

uintptr_t vdso_base ()

Defined at line 61 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

std::optional<size_t> stack_size ()

Defined at line 62 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

void set_entry (uintptr_t entry)

Defined at line 63 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

void set_vdso_base (uintptr_t vdso_base)

Defined at line 64 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h

void set_stack_size (std::optional<size_t> stack_size)

Defined at line 65 of file ../../sdk/lib/ld/test/ld-load-zircon-process-tests-base.h