Home
last modified time | relevance | path

Searched refs:utils (Results 1 – 25 of 209) sorted by relevance

123456789

/system/update_engine/common/
Dutils_unittest.cc46 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
48 utils::ParseECVersion("b=1231a fw_version=123456 a=fasd2")); in TEST()
49 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
51 utils::ParseECVersion("vendor=\"sam\" fw_version=\"00VFA616\"")); in TEST()
54 EXPECT_EQ("", utils::ParseECVersion("b=1231a fw_version a=fasd2")); in TEST()
58 EXPECT_FALSE(utils::WriteFile("/this/doesn't/exist", "hello", 5)); in TEST()
63 EXPECT_TRUE(utils::WriteFile(file.path().c_str(), "hello", 5)); in TEST()
66 EXPECT_TRUE(utils::ReadFile(file.path().c_str(), &readback)); in TEST()
72 EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty)); in TEST()
84 EXPECT_TRUE(utils::ReadFileChunk(file.path().c_str(), kSize, 10, &in_data)); in TEST()
[all …]
/system/update_engine/payload_generator/
Dboot_img_filesystem.cc40 !utils::ReadFileChunk(filename, 0, BOOT_MAGIC_SIZE, &header_magic) || in CreateFromFile()
52 if (!utils::ReadFileChunk(filename, in CreateFromFile()
70 if (!utils::ReadFileChunk(filename, 0, header_size, &header_blob)) { in CreateFromFile()
103 return utils::DivRoundUp(utils::FileSize(filename_), kBlockSize); in GetBlockCount()
114 if (utils::ReadFileChunk(filename_, offset, size, &data)) { in GetFile()
134 const uint64_t file_size = utils::FileSize(filename_); in GetFiles()
140 offset += utils::RoundUp(kernel_size_, page_size_); in GetFiles()
Dextent_utils_unittest.cc57 EXPECT_EQ(0U, utils::BlocksInExtents(extents)); in TEST()
59 EXPECT_EQ(1U, utils::BlocksInExtents(extents)); in TEST()
61 EXPECT_EQ(56U, utils::BlocksInExtents(extents)); in TEST()
63 EXPECT_EQ(58U, utils::BlocksInExtents(extents)); in TEST()
67 EXPECT_EQ(0U, utils::BlocksInExtents(extents)); in TEST()
69 EXPECT_EQ(1U, utils::BlocksInExtents(extents)); in TEST()
71 EXPECT_EQ(56U, utils::BlocksInExtents(extents)); in TEST()
73 EXPECT_EQ(58U, utils::BlocksInExtents(extents)); in TEST()
Ddeflate_utils.cc52 brillo::Blob data(utils::BlocksInExtents(extents) * block_size); in CopyExtentsToFile()
54 utils::ReadExtents(in_path, extents, &data, data.size(), block_size)); in CopyExtentsToFile()
56 utils::WriteFile(out_path.c_str(), data.data(), data.size())); in CopyExtentsToFile()
64 utils::BlocksInExtents(file.extents) >= in IsSquashfsImage()
68 utils::ReadFileChunk(part_path, in IsSquashfsImage()
100 num_blocks += utils::BlocksInExtents(in_file.extents); in RealignSplittedFiles()
104 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(file.extents) == num_blocks); in RealignSplittedFiles()
133 if (utils::BlocksInExtents(base_extents) < in ShiftExtentsOverExtents()
134 utils::BlocksInExtents(*over_extents)) { in ShiftExtentsOverExtents()
183 utils::BlocksInExtents(base_extents) * kBlockSize); in ShiftBitExtentsOverExtents()
[all …]
Dext2_filesystem_unittest.cc161 utils::BlocksInExtents(map_files["/link-long_symlink"].extents)); in TEST_F()
171 EXPECT_EQ(1U, utils::BlocksInExtents(map_files["/regular-small"].extents)); in TEST_F()
173 1U, utils::BlocksInExtents(map_files["/regular-with_net_cap"].extents)); in TEST_F()
178 utils::BlocksInExtents(map_files["/sparse-16k-last_block"].extents)); in TEST_F()
181 utils::BlocksInExtents(map_files["/sparse-16k-first_block"].extents)); in TEST_F()
183 utils::BlocksInExtents(map_files["/sparse-16k-holes"].extents)); in TEST_F()
Dfull_update_generator_unittest.cc44 EXPECT_TRUE(utils::MakeTempFile( in SetUp()
116 utils::BlocksInExtents(aops[0].op.dst_extents())); in TEST_F()
118 utils::BlocksInExtents(aops[1].op.dst_extents())); in TEST_F()
138 utils::BlocksInExtents(aops[0].op.dst_extents())); in TEST_F()
Dblob_file_writer_unittest.cc37 utils::MakeTempFile("BlobFileWriterTest.XXXXXX", &blob_path, &blob_fd)); in TEST()
50 utils::PReadAll(blob_fd, stored_blob.data(), blob_size, 0, &bytes_read)); in TEST()
/system/update_engine/payload_consumer/
Dinstall_plan.cc69 utils::ToString(partition.run_postinstall).c_str()); in Dump()
94 url_str = utils::GetFilePath(fd); in Dump()
103 << utils::ToString(hash_checks_mandatory) in Dump()
104 << ", powerwash_required: " << utils::ToString(powerwash_required) in Dump()
106 << utils::ToString(switch_slot_on_reboot) in Dump()
107 << ", run_post_install: " << utils::ToString(run_post_install) in Dump()
108 << ", is_rollback: " << utils::ToString(is_rollback) in Dump()
109 << ", write_verity: " << utils::ToString(write_verity); in Dump()
Dcached_file_descriptor_unittest.cc64 EXPECT_TRUE(utils::WriteFile( in SetUp()
92 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
105 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
126 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
154 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
167 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
183 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
200 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &blob_out)); in TEST_F()
Dextent_writer_unittest.cc74 utils::FileSize(temp_file_.path())); in TEST_F()
77 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in TEST_F()
127 utils::FileSize(temp_file_.path())); in WriteAlignedExtents()
130 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in WriteAlignedExtents()
167 utils::FileSize(temp_file_.path())); in TEST_F()
170 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &resultant_data)); in TEST_F()
Ddelta_performer_integration_test.cc136 EXPECT_TRUE(utils::ReadFile(a_file, &a_data)) << "file failed: " << a_file; in CompareFilesByBlock()
137 EXPECT_TRUE(utils::ReadFile(b_file, &b_data)) << "file failed: " << b_file; in CompareFilesByBlock()
169 EXPECT_TRUE(utils::PWriteAll(fd, "\0", 1, offset)); in WriteByteAtOffset()
243 ASSERT_TRUE(utils::ReadFile(hash_file.path(), &hash)); in SignGeneratedShellPayloadWithKeys()
252 ASSERT_TRUE(utils::ReadFile(metadata_hash_file.path(), &metadata_hash)); in SignGeneratedShellPayloadWithKeys()
307 ASSERT_TRUE(utils::MakeTempFile("key.XXXXXX", &private_key_path, nullptr)); in SignGeneratedShellPayload()
363 EXPECT_TRUE(utils::MakeTempFile("a_img.XXXXXX", &state->a_img, nullptr)); in GenerateDeltaFile()
364 EXPECT_TRUE(utils::MakeTempFile("b_img.XXXXXX", &state->b_img, nullptr)); in GenerateDeltaFile()
369 utils::MakeTempFile("result_img.XXXXXX", &state->result_img, nullptr)); in GenerateDeltaFile()
375 state->image_size = utils::FileSize(state->a_img); in GenerateDeltaFile()
[all …]
Dfile_descriptor_utils.cc43 auto total_blocks = utils::BlocksInExtents(src_extents); in CommonHashExtents()
87 TEST_AND_RETURN_FALSE(utils::BlocksInExtents(src_extents) == in CopyAndHashExtents()
88 utils::BlocksInExtents(tgt_extents)); in CopyAndHashExtents()
Dpostinstall_runner_action.cc136 if (utils::IsMountpoint(fs_mount_dir_)) { in PerformPartitionPostinstall()
138 utils::UnmountFilesystem(fs_mount_dir_); in PerformPartitionPostinstall()
164 if (!utils::SetBlockDeviceReadOnly(mountable_device, true)) { in PerformPartitionPostinstall()
170 if (!utils::MountFilesystem(mountable_device, in PerformPartitionPostinstall()
187 << " is: " << utils::GetFileFormat(abs_path); in PerformPartitionPostinstall()
237 utils::ReadAll(progress_fd_, buf, base::size(buf), &bytes_read, &eof); in OnProgressFdReady()
287 utils::UnmountFilesystem(fs_mount_dir_); in Cleanup()
Dpayload_metadata.cc183 utils::HexDumpVector(decrypted_signature); in ValidateMetadataSignature()
185 utils::HexDumpVector(metadata_hash); in ValidateMetadataSignature()
207 utils::ReadFileChunk(payload_path, 0, kMaxPayloadHeaderSize, &payload)); in ParsePayloadFile()
212 utils::ReadFileChunk(payload_path, in ParsePayloadFile()
221 TEST_AND_RETURN_FALSE(utils::ReadFileChunk( in ParsePayloadFile()
Dverity_writer_android.cc45 utils::SetBlockDeviceReadOnly(partition_->target_path, false); in Init()
131 uint64_t rounds = utils::DivRoundUp(data_size / block_size, rs_n); in EncodeFEC()
157 TEST_AND_RETURN_FALSE(utils::PReadAll(fd, in EncodeFEC()
181 TEST_AND_RETURN_FALSE(utils::PReadAll( in EncodeFEC()
188 utils::PWriteAll(fd, fec.data(), fec.size(), fec_offset)); in EncodeFEC()
Dfile_descriptor_utils_unittest.cc55 EXPECT_TRUE(utils::MakeTempFile("fd_tgt.XXXXXX", &tgt_path_, nullptr)); in SetUp()
62 EXPECT_TRUE(utils::ReadFile(tgt_path_, &target_contents)); in ExpectTarget()
67 utils::HexDumpString(expected_contents); in ExpectTarget()
69 utils::HexDumpString(target_contents); in ExpectTarget()
/system/tools/hidl/
DAndroid.bp96 "libhidl-gen-host-utils",
97 "libhidl-gen-utils",
102 "libhidl-gen-host-utils",
103 "libhidl-gen-utils",
134 "libhidl-gen-host-utils",
135 "libhidl-gen-utils",
140 "libhidl-gen-utils",
159 "libhidl-gen-host-utils",
160 "libhidl-gen-utils",
/system/tools/hidl/lint/
DAndroid.bp36 "libhidl-gen-host-utils",
37 "libhidl-gen-utils",
51 "libhidl-gen-host-utils",
52 "libhidl-gen-utils",
/system/update_engine/
Dmetrics_reporter_omaha.cc149 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(os_age) << " for metric " in ReportDailyMetrics()
194 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateCheckMetrics()
208 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateCheckMetrics()
221 value = utils::VersionPrefix(target_version); in ReportUpdateCheckMetrics()
268 LOG(INFO) << "Uploading " << utils::ToString(payload_type) << " for metric " in ReportUpdateAttemptMetrics()
273 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration) in ReportUpdateAttemptMetrics()
282 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration_uptime) in ReportUpdateAttemptMetrics()
317 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateAttemptMetrics()
331 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateAttemptMetrics()
422 metric += utils::ToString(source); in ReportSuccessfulUpdateMetrics()
[all …]
Dlogging.cc44 if (utils::FileExists(symlink_path.c_str()) && in SetupLogSymlink()
45 !utils::IsSymlink(symlink_path.c_str())) { in SetupLogSymlink()
62 utils::GetTimeAsString(::time(nullptr)).c_str()); in SetupLogFile()
Dpayload_state.cc263 ErrorCode base_error = utils::GetBaseErrorCode(error); in UpdateFailed()
265 << utils::ErrorCodeToString(base_error) << ")"; in UpdateFailed()
445 << utils::ToString(backoff_expiry_time_) in ShouldBackoffDownload()
451 << utils::ToString(backoff_expiry_time_); in ShouldBackoffDownload()
520 auto exclusion_name = utils::GetExclusionName(GetCurrentUrl()); in ExcludeCurrentPayload()
559 int fuzz_minutes = utils::FuzzInt(0, kMaxBackoffFuzzMinutes); in UpdateBackoffExpiryTime()
563 << utils::FormatTimeDelta(next_backoff_interval); in UpdateBackoffExpiryTime()
586 << utils::ToString(current_download_source_); in UpdateCurrentDownloadSource()
1019 << utils::ToString(stored_time) in LoadBackoffExpiryTime()
1030 << utils::ToString(backoff_expiry_time_); in SetBackoffExpiryTime()
[all …]
/system/extras/simpleperf/
Dutils_test.cpp39 TEST(utils, ProcessKernelSymbols) { in TEST() argument
67 TEST(utils, ConvertBytesToValue) { in TEST() argument
78 TEST(utils, ArchiveHelper) { in TEST() argument
103 TEST(utils, GetCpusFromString) { in TEST() argument
/system/teeui/libteeui/
DAndroid.bp9 "src/utils.cpp",
28 "src/utils.cpp",
/system/bt/audio_bluetooth_hw/
DAndroid.bp11 "utils.cc",
35 "utils.cc",
/system/libvintf/
DAndroid.bp60 "libhidl-gen-utils",
74 "libhidl-gen-utils",
107 "libhidl-gen-utils",
120 "libhidl-gen-utils",

123456789