diff options
author | David Anderson <dvander@google.com> | 2022-08-11 22:12:19 -0700 |
---|---|---|
committer | Hugo Drumond Jacob <hugojacob@google.com> | 2023-06-01 15:49:51 +0000 |
commit | 1136e2fc30f3cf30a8ced10f9cf85a22760ab5df (patch) | |
tree | aca9371c76136b6efbb2522b4566121dfe3e15e8 | |
parent | 5141eaf353e7838de6eaaabe375ee1ffa275433b (diff) | |
download | core-1136e2fc30f3cf30a8ced10f9cf85a22760ab5df.tar.gz |
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)
-rw-r--r-- | fs_mgr/libsnapshot/snapshot_test.cpp | 14 |
1 files changed, 0 insertions, 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 WithParamInterface<uint64_t } void TearDown() override { RETURN_IF_NON_VIRTUAL_AB(); - return; // BUG(149738928) EXPECT_TRUE(!image_manager_->BackingImageExists(kImageName) || image_manager_->DeleteBackingImage(kImageName)); @@ -2426,19 +2425,6 @@ class ImageManagerTest : public SnapshotTest, public WithParamInterface<uint64_t std::unique_ptr<LowSpaceUserdata> 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, |