From c786b6d332266c5f6ab877fa04805cb4c176a536 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 12 Aug 2022 23:43:43 -0700 Subject: [PATCH] libsnapshot: Use SnapshotManager to delete devices. Diagnosing DM_DEV_REMOVE failures in the test harness is quite difficult, and it's not clear if failures are spurious or not. Instead use SnapshotManager's helper function, which can retry on failure, and will self-diagnose issues on legitimate failures. Bug: N/A Test: vts_libsnapshot_test Change-Id: Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685 Merged-In: Ibcaa8406e8b1e8758b99a8e9b58c58d68ed57685 (cherry picked from commit e02ef9e9ce4203c9132779521fb4118dd5667a79) --- fs_mgr/libsnapshot/snapshot_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp index 9291b03f8..027e10fea 100644 --- a/fs_mgr/libsnapshot/snapshot_test.cpp +++ b/fs_mgr/libsnapshot/snapshot_test.cpp @@ -289,7 +289,7 @@ class SnapshotTest : public ::testing::Test { } AssertionResult DeleteDevice(const std::string& device) { - if (!dm_.DeleteDeviceIfExists(device)) { + if (!sm->DeleteDeviceIfExists(device, 1s)) { return AssertionFailure() << "Can't delete " << device; } return AssertionSuccess();