Home
last modified time | relevance | path

Searched refs:kBlockSize (Results 1 – 13 of 13) sorted by relevance

/system/update_engine/payload_consumer/
Dextent_writer_unittest.cc43 const size_t kBlockSize = 4096; variable
77 EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize)); in TEST_F()
81 EXPECT_EQ(static_cast<off_t>(kBlockSize + bytes.size()), in TEST_F()
87 brillo::Blob expected_file(kBlockSize); in TEST_F()
101 EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize)); in TEST_F()
107 WriteAlignedExtents(kBlockSize * 3, kBlockSize * 3); in TEST_F()
115 WriteAlignedExtents(kBlockSize * 2, kBlockSize / 2); in TEST_F()
132 brillo::Blob data(kBlockSize * 3); in WriteAlignedExtents()
136 EXPECT_TRUE(direct_writer.Init(fd_, extents, kBlockSize)); in WriteAlignedExtents()
157 data.begin() + kBlockSize, in WriteAlignedExtents()
[all …]
Dbzip_extent_writer_unittest.cc38 const uint32_t kBlockSize = 4096; variable
75 EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize)); in TEST_F()
108 extent.set_num_blocks((kDecompressedLength + kBlockSize - 1) / kBlockSize); in TEST_F()
113 EXPECT_TRUE(bzip_writer.Init(fd_, extents, kBlockSize)); in TEST_F()
Ddelta_performer_integration_test.cc129 EXPECT_EQ(0U, image_size % kBlockSize); in CompareFilesByBlock()
137 for (size_t i = 0; i < image_size; i += kBlockSize) { in CompareFilesByBlock()
138 EXPECT_EQ(0U, i % kBlockSize); in CompareFilesByBlock()
139 brillo::Blob a_sub(&a_data[i], &a_data[i + kBlockSize]); in CompareFilesByBlock()
140 brillo::Blob b_sub(&b_data[i], &b_data[i + kBlockSize]); in CompareFilesByBlock()
141 EXPECT_TRUE(a_sub == b_sub) << "Block " << (i/kBlockSize) << " differs"; in CompareFilesByBlock()
354 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile()
444 while (hardtocompress.size() < 3 * kBlockSize) { in GenerateDeltaFile()
987 DoSmallImageTest(false, false, false, kBlockSize, kSignatureGenerator, in TEST()
/system/update_engine/payload_generator/
Dab_generator_unittest.cc63 const size_t part_size = part_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation()
78 const size_t op_ex1_offset = op_ex1_start_block * kBlockSize; in TestSplitReplaceOrReplaceBzOperation()
79 const size_t op_ex1_size = op_ex1_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation()
80 const size_t op_ex2_offset = op_ex2_start_block * kBlockSize; in TestSplitReplaceOrReplaceBzOperation()
81 const size_t op_ex2_size = op_ex2_num_blocks * kBlockSize; in TestSplitReplaceOrReplaceBzOperation()
216 const size_t part_size = part_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations()
233 const size_t total_op_size = total_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations()
237 const size_t first_op_size = first_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations()
258 const size_t second_op_size = second_op_num_blocks * kBlockSize; in TestMergeReplaceOrReplaceBzOperations()
305 EXPECT_EQ(total_op_num_blocks * kBlockSize, new_op.dst_length()); in TestMergeReplaceOrReplaceBzOperations()
[all …]
Ddelta_diff_utils_unittest.cc157 size_t block_size_{kBlockSize};
173 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, data_blob)); in TEST_F()
174 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, data_blob)); in TEST_F()
193 EXPECT_EQ(kBlockSize, op.src_length()); in TEST_F()
195 EXPECT_EQ(kBlockSize, op.dst_length()); in TEST_F()
229 file_data.resize(file_data.size() + kBlockSize, 'a' + i); in TEST_F()
232 EXPECT_TRUE(WriteExtents(old_part_.path, old_extents, kBlockSize, file_data)); in TEST_F()
233 EXPECT_TRUE(WriteExtents(new_part_.path, new_extents, kBlockSize, file_data)); in TEST_F()
264 EXPECT_EQ(num_blocks * kBlockSize, op.src_length()); in TEST_F()
265 EXPECT_EQ(num_blocks * kBlockSize, op.dst_length()); in TEST_F()
[all …]
Ddelta_diff_utils.cc150 removed_bytes += min_num_blocks * kBlockSize; in RemoveIdenticalBlockRanges()
155 if (do_remove && (nonfull_block_bytes = total_bytes % kBlockSize)) in RemoveIdenticalBlockRanges()
156 removed_bytes -= kBlockSize - nonfull_block_bytes; in RemoveIdenticalBlockRanges()
188 old_part.size / kBlockSize, in DeltaReadPartition()
189 new_part.size / kBlockSize, in DeltaReadPartition()
255 ExtentForRange(0, new_part.size / kBlockSize)}; in DeltaReadPartition()
262 old_unvisited.push_back(ExtentForRange(0, old_part.size / kBlockSize)); in DeltaReadPartition()
299 old_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks()
300 new_num_blocks * kBlockSize, in DeltaMovedAndZeroBlocks()
301 kBlockSize, in DeltaMovedAndZeroBlocks()
[all …]
Dpayload_generation_config.cc54 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem()
62 TEST_AND_RETURN_FALSE(fs_interface->GetBlockSize() == kBlockSize); in OpenFilesystem()
68 TEST_AND_RETURN_FALSE(size % kBlockSize == 0); in OpenFilesystem()
70 "<" + name + "-partition>", kBlockSize, size / kBlockSize); in OpenFilesystem()
Dab_generator.cc142 new_op.set_src_length(dst_ext.num_blocks() * kBlockSize); in SplitSourceCopy()
143 new_op.set_dst_length(dst_ext.num_blocks() * kBlockSize); in SplitSourceCopy()
172 uint32_t data_size = dst_ext.num_blocks() * kBlockSize; in SplitAReplaceOp()
283 kBlockSize)); in AddDataAndSetType()
312 : BlocksInExtents(aop.op.src_extents()) * kBlockSize; in AddSourceHash()
314 source_part_path, src_extents, &src_data, src_length, kBlockSize)); in AddSourceHash()
Ddelta_diff_generator.h26 extern const size_t kBlockSize;
Ddelta_diff_generator.cc51 const size_t kBlockSize = 4096; // bytes variable
Dpayload_signer.cc232 dummy_extent->set_num_blocks((signature_blob_length + kBlockSize - 1) / in AddSignatureToManifest()
233 kBlockSize); in AddSignatureToManifest()
Dgenerate_delta_main.cc503 payload_config.block_size = kBlockSize; in Main()
Dinplace_generator.cc181 graph_utils::EdgeWeight(*graph, edge) * kBlockSize); in CutEdges()