class BindManagerTestBase

Defined at line 144 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.h

Public Methods

void SetUp ()

Defined at line 105 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void TearDown ()

Defined at line 122 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

BindManagerData CurrentBindManagerData ()

Defined at line 127 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyBindManagerData (BindManagerData expected)

Defined at line 136 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

driver_manager::NodeManager * GetNodeManager ()

Defined at line 156 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.h

void AddAndOrphanNode (std::string name, bool enable_multibind, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Creates a node and adds it to orphaned nodes by invoking bind with a failed match.

Should only be called when there's no ongoing bind. The node should not

already exist.

Defined at line 170 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void AddAndBindNode (std::string name, bool enable_multibind, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Create a node and invoke Bind() for it.

If EXPECT_BIND_START, the function verifies that it started a new bind process.

If EXPECT_QUEUED, the function verifies that it queued new bind request.

Defined at line 151 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void AddAndBindNode_EXPECT_BIND_START (std::string name, bool enable_multibind, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Defined at line 217 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

TestBindManager * bind_manager ()

Defined at line 224 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.h

void AddAndBindNode_EXPECT_QUEUED (std::string name, bool enable_multibind, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Defined at line 226 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void AddCompositeNodeSpec (std::string composite, std::vector<std::string> parents)

Defined at line 240 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void AddCompositeNodeSpec_EXPECT_BIND_START (std::string composite, std::vector<std::string> parents)

Defined at line 264 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void AddCompositeNodeSpec_EXPECT_QUEUED (std::string composite, std::vector<std::string> parents)

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

void InvokeBind (std::string name, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Invoke Bind() for the node with the given |name|. The node should already exist.

If EXPECT_BIND_START, the function verifies that it started a new bind process.

If EXPECT_QUEUED, the function verifies that it queued new bind request.

Defined at line 189 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void InvokeBind_EXPECT_BIND_START (std::string name, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Defined at line 202 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void InvokeBind_EXPECT_QUEUED (std::string name, std::shared_ptr<driver_manager::BindResultTracker> tracker)

Defined at line 209 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void InvokeTryBindAllAvailable ()

Invoke TryBindAllAvailable().

If EXPECT_BIND_START, the function verifies that it started a new bind process.

If EXPECT_QUEUED, the function verifies that it queues a TryBindAllAvailable callback.

Defined at line 280 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void InvokeTryBindAllAvailable_EXPECT_BIND_START ()

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

void InvokeTryBindAllAvailable_EXPECT_QUEUED ()

Defined at line 291 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void DriverIndexReplyWithDriver (std::string node)

Invoke DriverIndex reply for a match request for |node|.

Defined at line 302 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void DriverIndexReplyWithComposite (std::string node, std::vector<std::pair<std::string, size_t>> specs)

Defined at line 310 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void DriverIndexReplyWithNoMatch (std::string node)

Defined at line 328 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyNoOngoingBind ()

Defined at line 334 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyNoQueuedBind ()

Defined at line 340 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyBindOngoingWithRequests (std::vector<std::pair<std::string, size_t>> expected_requests)

Verifies that there's a ongoing bind process with an expected list of requests.

Each pair in |expected_requests| contains the node name and expected number of match requests.

Defined at line 383 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyOrphanedNodes (std::vector<std::string> expected_nodes)

Verify that the orphaned nodes set in BindManager contains |expected_nodes|.

Defined at line 345 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyMultibindNodes (std::vector<std::string> expected_nodes)

Verify that multibind nodes set in BindManager contains |expected_nodes|.

Defined at line 364 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyCompositeNodeExists (bool expected, std::string spec_name)

Defined at line 398 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

void VerifyPendingBindRequestCount (size_t expected)

Defined at line 394 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.cc

Protected Methods

std::unordered_map<std::string, std::shared_ptr<driver_manager::Node>> nodes ()

Defined at line 227 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.h

std::unordered_map<std::string, uint32_t> instance_ids ()

Defined at line 230 of file ../../src/devices/bin/driver_manager/tests/bind_manager_test_base.h

Records