class DriverRunnerTestBase

Defined at line 497 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

Public Methods

void DriverRunnerTestBase ()

Defined at line 267 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void TearDown ()

Defined at line 500 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

Protected Methods

fidl::ClientEnd<fuchsia_component::Realm> ConnectToRealm ()

Defined at line 271 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

fidl::ClientEnd<fuchsia_component::Introspector> ConnectToIntrospector ()

Defined at line 278 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

fidl::ClientEnd<fuchsia_component_sandbox::CapabilityStore> ConnectToCapabilityStore ()

Defined at line 285 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

fidl::ClientEnd<fuchsia_driver_token::Debug> ConnectToDebug ()

Defined at line 293 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

FakeDriverIndex CreateDriverIndex ()

Defined at line 299 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void SetupDriverRunner (FakeDriverIndex driver_index)

Defined at line 360 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void SetupDriverRunnerWithDynamicLinker (async_dispatcher_t * loader_dispatcher, std::unique_ptr<driver_manager::DriverHostRunner> driver_host_runner, FakeDriverIndex fake_driver_index, std::optional<uint32_t> wait_for_num_drivers)

If |wait_for_num_drivers| is set , the driver host will be sent a message to exit after that

many drivers have been loaded. This only needs to be set if the test is explicitly waiting for

the driver host process to exit, usually to verify the exit value.

Defined at line 372 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void SetupDriverRunnerWithDynamicLinker (async_dispatcher_t * loader_dispatcher, std::unique_ptr<driver_manager::DriverHostRunner> driver_host_runner, std::optional<uint32_t> wait_for_num_drivers)

Defined at line 407 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void SetupDriverRunner ()

Defined at line 415 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void PrepareRealmForDriverComponentStart (const std::string & name, const std::string & url)

Defined at line 416 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void PrepareRealmForSecondDriverComponentStart ()

Defined at line 425 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void PrepareRealmForStartDriverHost (bool use_next_vdso)

Defined at line 428 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void PrepareRealmForStartDriverHostDynamicLinker ()

Defined at line 456 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

StopListener & ServeStopListener (fidl::ClientEnd<fuchsia_component_runner::ComponentController> component, fidl::AnyTeardownObserver observer)

Defined at line 500 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

TestRealm & realm ()

Defined at line 503 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

TestIntrospector & introspector ()

Defined at line 504 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

TestDirectory & driver_dir ()

Defined at line 505 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

void StopDriverComponent (fidl::ClientEnd<fuchsia_component_runner::ComponentController> component)

Defined at line 505 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

TestDriverHost & driver_host ()

Defined at line 506 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

StartDriverResult StartDriver (std::string_view moniker, Driver driver, std::optional<StartDriverHandler> start_handler, fidl::ClientEnd<fuchsia_io::Directory> ns_pkg, fidl::ClientEnd<fuchsia_io::Directory> ns_svc, fidl::ClientEnd<fuchsia_io::Directory> driver_host_pkg)

If |ns_pkg| is set, it will be provided as the /pkg directory in the driver component's

namespace.

If a new driver host is required to be started (i.e. the driver is not colocated),

and dynamic linking is enabled, |driver_host_pkg| will be provided as the /pkg directory in the

driver host component's namespace.

Defined at line 515 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void EnableIntrospector ()

Defined at line 516 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

void CloseDriverHostBindings ()

Simulates a (compromised) driver_host process closing its

fuchsia.driver.host/DriverHost server channel while keeping its per-driver

fuchsia.driver.host/Driver channel(s) open. This triggers

DriverHostComponent's ObserveTeardown lambda, which erases (and frees) the

DriverHostComponent from DriverRunner::driver_hosts_ without clearing any

Node::driver_host_ raw pointers.

Defined at line 601 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

Devfs & devfs ()

Defined at line 622 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

DriverRunner & driver_runner ()

Defined at line 627 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

FakeDriverIndex & driver_index ()

Defined at line 629 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.h

fidl::WireClient<fuchsia_device::Controller> ConnectToDeviceController (std::string_view child_name)

Defined at line 1014 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

StartDriverResult StartDriverWithConfig (std::string_view moniker, Driver driver, std::optional<StartDriverHandler> start_handler, test_utils::TestPkg::Config driver_config, test_utils::TestPkg::Config driver_host_config, fidl::ClientEnd<fuchsia_io::Directory> ns_svc)

Variant of |StartDriver| that takes in a test pkg config rather than the pkg directory client.

If the driver has opted into dynamic linking, the fake /pkg directory will be provided to

the driver component's namespace.

Defined at line 652 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

zx::result<StartDriverResult> StartRootDriver ()

Defined at line 675 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

zx::result<StartDriverResult> StartRootDriverDynamicLinking (test_utils::TestPkg::Config driver_host_config, test_utils::TestPkg::Config driver_config)

Defined at line 699 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

StartDriverResult StartSecondDriver (std::string_view moniker, bool colocate, bool host_restart_on_crash, bool use_next_vdso, bool use_dynamic_linker, fidl::ClientEnd<fuchsia_io::Directory> ns_svc)

Defined at line 799 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void Unbind ()

Defined at line 735 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void ValidateProgram (std::optional< ::fuchsia_data::Dictionary> & program, std::string_view binary, std::string_view colocate, std::string_view host_restart_on_crash, std::string_view use_next_vdso, std::string_view use_dynamic_linker, std::string_view compat)

Defined at line 747 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void AssertNodeBound (const std::shared_ptr<CreatedChild> & child)

Defined at line 774 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void AssertNodeNotBound (const std::shared_ptr<CreatedChild> & child)

Defined at line 778 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void AssertNodeControllerBound (const std::shared_ptr<CreatedChild> & child)

Defined at line 782 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void AssertNodeControllerNotBound (const std::shared_ptr<CreatedChild> & child)

Defined at line 786 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

inspect::Hierarchy Inspect ()

Defined at line 791 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

void SetupDevfs ()

Defined at line 796 of file ../../src/devices/bin/driver_manager/tests/driver_runner_test_fixture.cc

Records