/system/update_engine/payload_generator/ |
D | extent_utils_unittest.cc | 35 vector<Extent> extents; in TEST() local 37 EXPECT_EQ(0U, extents.size()); in TEST() 38 AppendBlockToExtents(&extents, kSparseHole); in TEST() 39 EXPECT_EQ(1U, extents.size()); in TEST() 40 AppendBlockToExtents(&extents, 0); in TEST() 41 EXPECT_EQ(2U, extents.size()); in TEST() 42 AppendBlockToExtents(&extents, kSparseHole); in TEST() 43 AppendBlockToExtents(&extents, kSparseHole); in TEST() 45 ASSERT_EQ(3U, extents.size()); in TEST() 46 EXPECT_EQ(kSparseHole, extents[0].start_block()); in TEST() [all …]
|
D | graph_utils_unittest.cc | 40 vector<Extent>& extents = graph[0].out_edges[1].extents; in TEST() local 42 EXPECT_EQ(0U, extents.size()); in TEST() 43 AppendBlockToExtents(&extents, 0); in TEST() 44 EXPECT_EQ(1U, extents.size()); in TEST() 45 AppendBlockToExtents(&extents, 1); in TEST() 46 AppendBlockToExtents(&extents, 2); in TEST() 47 EXPECT_EQ(1U, extents.size()); in TEST() 48 AppendBlockToExtents(&extents, 4); in TEST() 50 EXPECT_EQ(2U, extents.size()); in TEST() 51 EXPECT_EQ(0U, extents[0].start_block()); in TEST() [all …]
|
D | extent_utils.cc | 38 void AppendBlockToExtents(vector<Extent>* extents, uint64_t block) { in AppendBlockToExtents() argument 40 if (!extents->empty()) { in AppendBlockToExtents() 41 Extent& extent = extents->back(); in AppendBlockToExtents() 54 extents->push_back(new_extent); in AppendBlockToExtents() 58 google::protobuf::RepeatedPtrField<Extent>* extents, in ExtendExtents() argument 62 ExtentsToVector(*extents, &extents_vector); in ExtendExtents() 68 extents->Clear(); in ExtendExtents() 69 StoreExtents(extents_vector, extents); in ExtendExtents() 73 void StoreExtents(const vector<Extent>& extents, in StoreExtents() argument 75 for (const Extent& extent : extents) { in StoreExtents() [all …]
|
D | ext2_filesystem_unittest.cc | 53 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument 54 for (const Extent& extent : extents) { in ExpectBlocksInRange() 91 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F() 94 EXPECT_FALSE(map_files["<free-space>"].extents.empty()); in TEST_F() 121 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F() 159 EXPECT_TRUE(map_files["/link-short_symlink"].extents.empty()); in TEST_F() 161 utils::BlocksInExtents(map_files["/link-long_symlink"].extents)); in TEST_F() 164 EXPECT_EQ(map_files["/link-hard-regular-16k"].extents, in TEST_F() 165 map_files["/regular-16k"].extents); in TEST_F() 166 EXPECT_FALSE(map_files["/regular-16k"].extents.empty()); in TEST_F() [all …]
|
D | extent_utils.h | 33 void AppendBlockToExtents(std::vector<Extent>* extents, uint64_t block); 38 std::vector<uint64_t> ExpandExtents(const T& extents) { in ExpandExtents() argument 40 for (const auto& extent : extents) { in ExpandExtents() 55 void StoreExtents(const std::vector<Extent>& extents, 59 void ExtentsToVector(const google::protobuf::RepeatedPtrField<Extent>& extents, 63 std::string ExtentsToString(const std::vector<Extent>& extents); 68 google::protobuf::RepeatedPtrField<Extent>* extents, 74 void NormalizeExtents(std::vector<Extent>* extents); 80 std::vector<Extent> ExtentsSublist(const std::vector<Extent>& extents,
|
D | deflate_utils_unittest.cc | 125 vector<Extent> extents = { in TEST() local 140 out_deflates = FindDeflates(extents, in_deflates); in TEST() 145 vector<Extent> extents = {}; in TEST() local 149 out_deflates = FindDeflates(extents, in_deflates); in TEST() 152 extents = {}; in TEST() 154 out_deflates = FindDeflates(extents, in_deflates); in TEST() 159 vector<Extent> extents = { in TEST() local 166 ASSERT_TRUE(CompactDeflates(extents, in_deflates, &out_deflates)); in TEST() 171 vector<Extent> extents = {}; in TEST() local 175 EXPECT_FALSE(CompactDeflates(extents, in_deflates, &out_deflates)); in TEST() [all …]
|
D | squashfs_filesystem_unittest.cc | 54 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument 55 for (const Extent& extent : extents) { in ExpectBlocksInRange() 87 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in CheckSquashfs() 95 return a.extents[0].start_block() < in CheckSquashfs() 96 b.extents[0].start_block(); in CheckSquashfs() 102 return a.extents[0].start_block() + a.extents[0].num_blocks() > in CheckSquashfs() 103 b.extents[0].start_block(); in CheckSquashfs() 127 file.extents.emplace_back(); in TEST_F() 128 file.extents[0].set_start_block(0); in TEST_F() 129 file.extents[0].set_num_blocks(1); in TEST_F() [all …]
|
D | boot_img_filesystem_unittest.cc | 67 EXPECT_EQ(1u, files[0].extents.size()); in TEST_F() 68 EXPECT_EQ(1u, files[0].extents[0].start_block()); in TEST_F() 69 EXPECT_EQ(1u, files[0].extents[0].num_blocks()); in TEST_F() 73 EXPECT_EQ(1u, files[1].extents.size()); in TEST_F() 74 EXPECT_EQ(2u, files[1].extents[0].start_block()); in TEST_F() 75 EXPECT_EQ(2u, files[1].extents[0].num_blocks()); in TEST_F() 105 EXPECT_EQ(1u, files[0].extents.size()); in TEST_F() 106 EXPECT_EQ(1u, files[0].extents[0].start_block()); in TEST_F() 107 EXPECT_EQ(2u, files[0].extents[0].num_blocks()); in TEST_F() 111 EXPECT_EQ(1u, files[1].extents.size()); in TEST_F() [all …]
|
D | deflate_utils.cc | 49 const vector<Extent> extents, in CopyExtentsToFile() argument 52 brillo::Blob data(utils::BlocksInExtents(extents) * block_size); in CopyExtentsToFile() 54 utils::ReadExtents(in_path, extents, &data, data.size(), block_size)); in CopyExtentsToFile() 64 utils::BlocksInExtents(file.extents) >= in IsSquashfsImage() 69 file.extents[0].start_block() * kBlockSize, in IsSquashfsImage() 86 ShiftExtentsOverExtents(file.extents, &in_file.extents)); in RealignSplittedFiles() 88 ShiftBitExtentsOverExtents(file.extents, &in_file.deflates)); in RealignSplittedFiles() 91 num_blocks += utils::BlocksInExtents(in_file.extents); in RealignSplittedFiles() 95 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(file.extents) == num_blocks); in RealignSplittedFiles() 206 vector<BitExtent> FindDeflates(const vector<Extent>& extents, in FindDeflates() argument [all …]
|
D | graph_utils.cc | 40 const vector<Extent>& extents = in EdgeWeight() local 41 graph[edge.first].out_edges.find(edge.second)->second.extents; in EdgeWeight() 42 for (vector<Extent>::const_iterator it = extents.begin(); it != extents.end(); in EdgeWeight() 59 AppendBlockToExtents(&edge_it->second.extents, block); in AddReadBeforeDep() 64 const vector<Extent>& extents) { in AddReadBeforeDepExtents() argument 66 for (vector<Extent>::const_iterator it = extents.begin(), e = extents.end(); in AddReadBeforeDepExtents() 85 if (it->second.extents.empty()) { in DropWriteBeforeDeps() 119 DumpExtents(it->second.extents, 6); in DumpOutEdges()
|
D | mapfile_filesystem_unittest.cc | 47 void ExpectBlocksInRange(const vector<Extent>& extents, uint64_t total_blocks) { in ExpectBlocksInRange() argument 48 for (const Extent& extent : extents) { in ExpectBlocksInRange() 94 ExpectBlocksInRange(file.extents, fs->GetBlockCount()); in TEST_F() 97 EXPECT_EQ(map_files["/fileA"].extents, in TEST_F() 99 EXPECT_EQ(map_files["/fileB"].extents, in TEST_F() 102 map_files["/fileC"].extents, in TEST_F() 105 EXPECT_EQ(map_files["/file with spaces"].extents, in TEST_F() 107 EXPECT_EQ(map_files["/1234"].extents, (vector<Extent>{ExtentForRange(7, 1)})); in TEST_F()
|
D | fake_filesystem.cc | 40 const std::vector<Extent>& extents) { in AddFile() argument 43 file.extents = extents; in AddFile() 44 for (const Extent& extent : extents) { in AddFile()
|
D | squashfs_filesystem.cc | 142 file.extents = {ExtentForBytes(kBlockSize, start, cur_offset - start)}; in Init() 149 return a.extents[0].start_block() < b.extents[0].start_block(); in Init() 157 auto first_begin = first->extents[0].start_block(); in Init() 158 auto first_end = first_begin + first->extents[0].num_blocks(); in Init() 159 auto second_begin = second->extents[0].start_block(); in Init() 160 auto second_end = second_begin + second->extents[0].num_blocks(); in Init() 173 first->extents[0].set_num_blocks(second_begin - first_begin); in Init() 185 file_extents.AddExtents(file.extents); in Init() 196 file.extents = {metadata_extents[i]}; in Init() 202 return a.extents[0].start_block() < b.extents[0].start_block(); in Init() [all …]
|
D | ext2_filesystem.cc | 58 vector<Extent>* extents = static_cast<vector<Extent>*>(priv); in ProcessInodeAllBlocks() local 59 AppendBlockToExtents(extents, *blocknr); in ProcessInodeAllBlocks() 232 &file.extents); in GetFiles() 293 AppendBlockToExtents(&inode_file.extents, block); in GetFiles() 308 AppendBlockToExtents(&free_space.extents, block); in GetFiles() 318 if (ino_file.second.extents.empty()) in GetFiles() 323 ranges.AddExtents(file.extents); in GetFiles() 324 file.extents = ranges.GetExtentsForBlockCount(ranges.blocks()); in GetFiles() 348 vector<Extent> extents; in LoadSettings() local 354 &extents); in LoadSettings() [all …]
|
D | graph_types.h | 41 std::vector<Extent> extents; member 49 return extents == that.extents && write_extents == that.write_extents;
|
D | mapfile_filesystem.cc | 95 mapped_file.extents = {}; in GetFiles() 103 mapped_file.extents.push_back(ExtentForRange(block_start, 1)); in GetFiles() 121 mapped_file.extents.push_back( in GetFiles() 132 std::reverse(mapped_file.extents.begin(), mapped_file.extents.end()); in GetFiles()
|
D | deflate_utils.h | 68 const std::vector<Extent>& extents, 84 bool CompactDeflates(const std::vector<Extent>& extents, 89 bool FindAndCompactDeflates(const std::vector<Extent>& extents,
|
D | inplace_generator_unittest.cc | 69 EdgeProperties EdgeWithReadDep(const vector<Extent>& extents) { in EdgeWithReadDep() argument 71 ret.extents = extents; in EdgeWithReadDep() 75 EdgeProperties EdgeWithWriteDep(const vector<Extent>& extents) { in EdgeWithWriteDep() argument 77 ret.write_extents = extents; in EdgeWithWriteDep() 194 vector<Extent> extents; in TEST_F() local 195 AppendBlockToExtents(&extents, 3); in TEST_F() 196 AppendBlockToExtents(&extents, 5); in TEST_F() 197 AppendBlockToExtents(&extents, 7); in TEST_F() 198 StoreExtents(extents, graph.back().aop.op.mutable_src_extents()); in TEST_F() 204 extents.clear(); in TEST_F() [all …]
|
D | extent_ranges.h | 57 void AddExtents(const std::vector<Extent>& extents); 58 void SubtractExtents(const std::vector<Extent>& extents); 92 std::vector<Extent> FilterExtentRanges(const std::vector<Extent>& extents,
|
/system/update_engine/payload_consumer/ |
D | extent_reader_unittest.cc | 64 void ReadExtents(vector<Extent> extents, brillo::Blob* blob) { in ReadExtents() argument 66 for (const auto& extent : extents) { in ReadExtents() 80 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local 82 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 84 brillo::Blob blob1(utils::BlocksInExtents(extents) * kBlockSize); in TEST_F() 87 ReadExtents(extents, &blob2); in TEST_F() 92 vector<Extent> extents = {ExtentForRange(1, 0)}; in TEST_F() local 94 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 111 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local 113 EXPECT_TRUE(reader.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() [all …]
|
D | file_descriptor_utils_unittest.cc | 93 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local 97 source_, extents, target_, extents, 4, nullptr)); in TEST_F() 115 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local 118 source_, extents, target_, extents, 4, nullptr)); in TEST_F() 172 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local 175 EXPECT_FALSE(fd_utils::ReadAndHashExtents(source_, extents, 4, &hash_out)); in TEST_F() 180 auto extents = CreateExtentList({{0, 5}}); in TEST_F() local 181 EXPECT_TRUE(fd_utils::ReadAndHashExtents(source_, extents, 4, nullptr)); in TEST_F() 187 auto extents = CreateExtentList({{1, 1}, {4, 1}, {2, 2}, {0, 1}}); in TEST_F() local 189 EXPECT_TRUE(fd_utils::ReadAndHashExtents(source_, extents, 4, &hash_out)); in TEST_F()
|
D | extent_writer_unittest.cc | 66 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local 70 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 86 vector<Extent> extents = {ExtentForRange(1, 1)}; in TEST_F() local 89 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 107 vector<Extent> extents = { in WriteAlignedExtents() local 114 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in WriteAlignedExtents() 144 vector<Extent> extents = {ExtentForRange(1, 1), in TEST_F() local 155 direct_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
|
D | bzip_extent_writer_unittest.cc | 56 vector<Extent> extents = {ExtentForRange(0, 1)}; in TEST_F() local 69 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F() 98 vector<Extent> extents = {ExtentForBytes(kBlockSize, 0, kDecompressedLength)}; in TEST_F() local 102 bzip_writer.Init(fd_, {extents.begin(), extents.end()}, kBlockSize)); in TEST_F()
|
D | extent_writer.h | 42 const google::protobuf::RepeatedPtrField<Extent>& extents, 58 const google::protobuf::RepeatedPtrField<Extent>& extents, in Init() argument 62 extents_ = extents; in Init()
|
/system/core/fs_mgr/liblp/ |
D | builder_test.cpp | 69 ASSERT_EQ(system->extents().size(), 1); in TEST_F() 71 LinearExtent* extent = system->extents()[0]->AsLinearExtent(); in TEST_F() 83 EXPECT_EQ(system->extents().size(), 1); in TEST_F() 84 EXPECT_EQ(system->extents()[0]->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F() 88 EXPECT_EQ(system->extents().size(), 0); in TEST_F() 92 EXPECT_EQ(system->extents().size(), 1); in TEST_F() 93 EXPECT_EQ(system->extents()[0]->num_sectors(), 131072 / LP_SECTOR_SIZE); in TEST_F() 97 EXPECT_EQ(system->extents().size(), 1); in TEST_F() 98 EXPECT_EQ(system->extents()[0]->num_sectors(), (1024 * 256) / LP_SECTOR_SIZE); in TEST_F() 103 EXPECT_EQ(system->extents().size(), 1); in TEST_F() [all …]
|