From 1136e2fc30f3cf30a8ced10f9cf85a22760ab5df Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Aug 2022 22:12:19 -0700 Subject: [PATCH] libsnapshot: Remove flaky image creation test. This test has always been flaky, and is not testing something super valuable: we know that image creation succeeds throughout the rest of the suite, so it's not very interesting to know that it can succeed in a low-space scenario. The inverse test is much more valuable, since we want the correct status code when creation fails due to low space. Bug: 240391002 Test: vts_libsnapshot_test Merged-In: I6235d11033d2f30efe530077b877863ba2574810 Change-Id: I6235d11033d2f30efe530077b877863ba2574810 (cherry picked from commit 97e8a2f0e963cea957ffd135be4436de3b3afd6a) --- fs_mgr/libsnapshot/snapshot_test.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp index 9291b03f8..381497c68 100644 --- a/fs_mgr/libsnapshot/snapshot_test.cpp +++ b/fs_mgr/libsnapshot/snapshot_test.cpp @@ -2417,7 +2417,6 @@ class ImageManagerTest : public SnapshotTest, public WithParamInterfaceBackingImageExists(kImageName) || image_manager_->DeleteBackingImage(kImageName)); @@ -2426,19 +2425,6 @@ class ImageManagerTest : public SnapshotTest, public WithParamInterface userdata_; }; -TEST_P(ImageManagerTest, CreateImageEnoughAvailSpace) { - if (userdata_->available_space() == 0) { - GTEST_SKIP() << "/data is full (" << userdata_->available_space() - << " bytes available), skipping"; - } - ASSERT_TRUE(image_manager_->CreateBackingImage(kImageName, userdata_->available_space(), - IImageManager::CREATE_IMAGE_DEFAULT)) - << "Should be able to create image with size = " << userdata_->available_space() - << " bytes"; - ASSERT_TRUE(image_manager_->DeleteBackingImage(kImageName)) - << "Should be able to delete created image"; -} - TEST_P(ImageManagerTest, CreateImageNoSpace) { uint64_t to_allocate = userdata_->free_space() + userdata_->bsize(); auto res = image_manager_->CreateBackingImage(kImageName, to_allocate,