From 0a2a440f0421134f1f741a74c88087a9951462bc Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 12 Apr 2024 17:49:34 +0200 Subject: LargeBlobs: Skip splicing of dependent objects during uplinking of AC, TC and trees. --- test/buildtool/storage/large_object_cas.test.cpp | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'test/buildtool/storage') diff --git a/test/buildtool/storage/large_object_cas.test.cpp b/test/buildtool/storage/large_object_cas.test.cpp index 7f45c7b8..da348727 100644 --- a/test/buildtool/storage/large_object_cas.test.cpp +++ b/test/buildtool/storage/large_object_cas.test.cpp @@ -516,31 +516,31 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto result_path = cas.TreePath(*large_tree_digest); REQUIRE(result_path); - // The nested tree and all it's large parts must be spliced to the same - // locations: - CHECK(FileSystemManager::IsFile(*nested_tree_path)); - CHECK(FileSystemManager::IsFile(*nested_blob_path)); + // Only the main object must be reconstructed: CHECK(FileSystemManager::IsFile(*large_tree_path)); - // Check there are no spliced results in old generations: - for (std::size_t i = 1; i < StorageConfig::NumGenerations(); ++i) { - auto const& generation_cas = Storage::Generation(i).CAS(); - REQUIRE_FALSE(generation_cas.TreePath(*nested_tree_digest)); - REQUIRE_FALSE(generation_cas.TreePath(*large_tree_digest)); - REQUIRE_FALSE(generation_cas.BlobPath(*nested_blob_digest, - /*is_executable=*/false)); - } + // It's parts must not be reconstructed by default: + CHECK_FALSE(FileSystemManager::IsFile(*nested_tree_path)); + CHECK_FALSE(FileSystemManager::IsFile(*nested_blob_path)); - // Check large entries are in the latest generation: auto const& latest_cas = Storage::Generation(0).CAS(); + + // However, they might be reconstructed on request because there entries are + // in the latest generation: auto split_nested_tree_2 = latest_cas.SplitTree(*nested_tree_digest); REQUIRE_FALSE(std::get_if(&split_nested_tree_2)); auto split_nested_blob_2 = latest_cas.SplitBlob(*nested_blob_digest); REQUIRE_FALSE(std::get_if(&split_nested_blob_2)); - auto split_large_tree_2 = latest_cas.SplitTree(*large_tree_digest); - REQUIRE_FALSE(std::get_if(&split_large_tree_2)); + // Check there are no spliced results in old generations: + for (std::size_t i = 1; i < StorageConfig::NumGenerations(); ++i) { + auto const& generation_cas = Storage::Generation(i).CAS(); + REQUIRE_FALSE(generation_cas.TreePath(*nested_tree_digest)); + REQUIRE_FALSE(generation_cas.TreePath(*large_tree_digest)); + REQUIRE_FALSE(generation_cas.BlobPath(*nested_blob_digest, + /*is_executable=*/false)); + } } namespace { -- cgit v1.2.3