summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-04-12 17:49:34 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-04-15 17:36:56 +0200
commit0a2a440f0421134f1f741a74c88087a9951462bc (patch)
treec6fd5a88d4a808e4343f07a018f60ec239612508 /test
parenta0b52e170866b00cd27e243ffd5599be91152395 (diff)
downloadjustbuild-0a2a440f0421134f1f741a74c88087a9951462bc.tar.gz
LargeBlobs: Skip splicing of dependent objects during uplinking of AC, TC and trees.
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/storage/large_object_cas.test.cpp30
1 files changed, 15 insertions, 15 deletions
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<LargeObjectError>(&split_nested_tree_2));
auto split_nested_blob_2 = latest_cas.SplitBlob(*nested_blob_digest);
REQUIRE_FALSE(std::get_if<LargeObjectError>(&split_nested_blob_2));
- auto split_large_tree_2 = latest_cas.SplitTree(*large_tree_digest);
- REQUIRE_FALSE(std::get_if<LargeObjectError>(&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 {