Lines Matching refs:device

31         device(exampleUpdater.getDevice())  in DeviceTest()
37 std::unique_ptr<ExampleDevice>& device; member in DeviceTest
88 EXPECT_TRUE(device->getEMConfigType().starts_with("Nop")); in TEST_F()
91 EXPECT_NE(device->softwareCurrent, nullptr); in TEST_F()
94 EXPECT_EQ(device->softwarePending, nullptr); in TEST_F()
98 sdbusplus::async::context& ctx, std::unique_ptr<ExampleDevice>& device, in testDeviceStartUpdateCommon() argument
101 const Software* oldSoftware = device->softwareCurrent.get(); in testDeviceStartUpdateCommon()
113 std::make_unique<Software>(ctx, *device); in testDeviceStartUpdateCommon()
117 co_await device->startUpdateAsync(fd, applyTime, std::move(softwareUpdate)); in testDeviceStartUpdateCommon()
119 EXPECT_TRUE(device->deviceSpecificUpdateFunctionCalled); in testDeviceStartUpdateCommon()
123 EXPECT_NE(device->softwareCurrent.get(), oldSoftware); in testDeviceStartUpdateCommon()
124 EXPECT_EQ(device->softwareCurrent.get(), newSoftware); in testDeviceStartUpdateCommon()
126 EXPECT_FALSE(device->softwarePending); in testDeviceStartUpdateCommon()
133 EXPECT_EQ(device->softwareCurrent.get(), oldSoftware); in testDeviceStartUpdateCommon()
136 EXPECT_EQ(device->softwarePending.get(), newSoftware); in testDeviceStartUpdateCommon()
148 ctx.spawn(testDeviceStartUpdateCommon(ctx, device, in TEST_F()
156 testDeviceStartUpdateCommon(ctx, device, RequestedApplyTimes::OnReset)); in TEST_F()
161 sdbusplus::async::context& ctx, std::unique_ptr<ExampleDevice>& device) in testDeviceStartUpdateInvalidFD() argument
170 std::make_unique<Software>(ctx, *device); in testDeviceStartUpdateInvalidFD()
172 co_await device->startUpdateAsync(image, RequestedApplyTimes::Immediate, in testDeviceStartUpdateInvalidFD()
176 EXPECT_FALSE(device->deviceSpecificUpdateFunctionCalled); in testDeviceStartUpdateInvalidFD()
185 ctx.spawn(testDeviceStartUpdateInvalidFD(ctx, device)); in TEST_F()
190 sdbusplus::async::context& ctx, std::unique_ptr<ExampleDevice>& device) in testDeviceSpecificUpdateFunction() argument
195 auto previousVersion = device->softwareCurrent->swid; in testDeviceSpecificUpdateFunction()
198 co_await device->updateDevice((const uint8_t*)buffer, buffer_size); in testDeviceSpecificUpdateFunction()
202 EXPECT_NE(device->softwareCurrent, nullptr); in testDeviceSpecificUpdateFunction()
203 EXPECT_EQ(device->softwarePending, nullptr); in testDeviceSpecificUpdateFunction()
213 ctx.spawn(testDeviceSpecificUpdateFunction(ctx, device)); in TEST_F()