Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 988f3f14 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8050481 from 654bb522 to sc-v2-release

Change-Id: Ibdd51b5c987341b5922175fcb2dd3824785ccf0d
parents 2756f1c9 654bb522
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -684,13 +684,9 @@ TEST(libdm, DeleteDeviceDeferredWaitsForLastReference) {
TEST(libdm, CreateEmptyDevice) {
    DeviceMapper& dm = DeviceMapper::Instance();
    ASSERT_TRUE(dm.CreateEmptyDevice("empty-device"));
    auto guard = android::base::make_scope_guard([&]() { dm.DeleteDevice("empty-device", 5s); });
    auto guard =
            android::base::make_scope_guard([&]() { dm.DeleteDeviceIfExists("empty-device", 5s); });

    // Empty device should be in suspended state.
    ASSERT_EQ(DmDeviceState::SUSPENDED, dm.GetState("empty-device"));

    std::string path;
    ASSERT_TRUE(dm.WaitForDevice("empty-device", 5s, &path));
    // Path should exist.
    ASSERT_EQ(0, access(path.c_str(), F_OK));
}