summaryrefslogtreecommitdiff
path: root/fs_mgr/libdm/dm_test.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-04-04 07:12:28 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-04-04 07:12:28 -0700
commit8fc3f7296741ce589f7294113f8771837fb49bda (patch)
tree0ebec0729083e0de6d9544751372bdc238b8b717 /fs_mgr/libdm/dm_test.cpp
parent81c361ea22a1c0ab7cc5e62f3fa36751e1240178 (diff)
parent38191dc6b7f795cb9a96e418f47ee0de0b0a8d13 (diff)
Merge 38191dc6b7f795cb9a96e418f47ee0de0b0a8d13 on remote branch
Change-Id: I56506cf11e6e2b38712e1e7dc9e7716f969000d5
Diffstat (limited to 'fs_mgr/libdm/dm_test.cpp')
-rw-r--r--fs_mgr/libdm/dm_test.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs_mgr/libdm/dm_test.cpp b/fs_mgr/libdm/dm_test.cpp
index 8314ec596..541f254cb 100644
--- a/fs_mgr/libdm/dm_test.cpp
+++ b/fs_mgr/libdm/dm_test.cpp
@@ -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));
}