summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-07 00:09:11 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-01-07 00:09:11 +0000
commit988f3f143e61da7b3678d18bf13dfd063cf349ac (patch)
treec7648f3fbebe7b5a1ba56937e8214b0cc6703df5
parent2756f1c9428c7818cc08b42f7b483e4a6cd4bb5a (diff)
parent654bb5225bcaedb388839b60675c3751573bb174 (diff)
Snap for 8050481 from 654bb5225bcaedb388839b60675c3751573bb174 to sc-v2-release
Change-Id: Ibdd51b5c987341b5922175fcb2dd3824785ccf0d
-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));
}