class RuntimeDirHelper

Defined at line 25 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.h

A class that can emulate multiple component runtime directories by constructing a flat namespace

of directories named by given job koids, which will each contain a nested file at the relative

path elf/job_id, which contains the same job koid as the parent directory, but is readable by

entities expecting to have a handle to the "root" of a component's namespaced runtime directory.

Tests may use this to emulate any number of mocked component runtime directories. All directories

that are to be serviced by this helper must be created before calling |Start|.

Public Methods

void RuntimeDirHelper ()

Defined at line 27 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.h

void ~RuntimeDirHelper ()

Defined at line 49 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.cc

void Start (async_dispatcher_t * client_dispatcher)

Starts serving the VFS instance on a separate thread. |client_dispatcher| will service the

client end of the connection. Any calls that attempt to add a new directory after calling this

method will assert.

Defined at line 51 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.cc

void Cleanup ()

Cleans up the VFS instance and shuts down the dedicated message loop thread.

Defined at line 64 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.cc

void AddJobIdFile (zx_koid_t job)

Adds a new top-level directory for |job|, containing a file with a path "elf/job_id" containing

the same job koid.

Defined at line 73 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.cc

fidl::ClientEnd<fuchsia_io::Directory> GetScopedDirectoryHandle (zx_koid_t job)

Defined at line 82 of file ../../src/developer/debug/debug_agent/testing/runtime_dir_helper.cc