Home
last modified time | relevance | path

Searched refs:utils (Results 1 – 25 of 210) 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_consumer/
Dinstall_plan.cc64 utils::ToString(partition.run_postinstall).c_str()); in Dump()
88 url_str = utils::GetFilePath(fd); in Dump()
97 << utils::ToString(hash_checks_mandatory) in Dump()
98 << ", powerwash_required: " << utils::ToString(powerwash_required) in Dump()
100 << utils::ToString(switch_slot_on_reboot) in Dump()
101 << ", run_post_install: " << utils::ToString(run_post_install) in Dump()
102 << ", is_rollback: " << utils::ToString(is_rollback) in Dump()
103 << ", 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()
Dpostinstall_runner_action.cc112 utils::MakePartitionNameForMount(partition.target_path); in PerformPartitionPostinstall()
131 if (utils::IsMountpoint(fs_mount_dir_)) { in PerformPartitionPostinstall()
133 utils::UnmountFilesystem(fs_mount_dir_); in PerformPartitionPostinstall()
159 if (!utils::SetBlockDeviceReadOnly(mountable_device, true)) { in PerformPartitionPostinstall()
165 if (!utils::MountFilesystem(mountable_device, in PerformPartitionPostinstall()
182 << " is: " << utils::GetFileFormat(abs_path); in PerformPartitionPostinstall()
234 utils::ReadAll(progress_fd_, buf, arraysize(buf), &bytes_read, &eof); in OnProgressFdReady()
285 utils::UnmountFilesystem(fs_mount_dir_); in Cleanup()
Ddelta_performer_integration_test.cc133 EXPECT_TRUE(utils::ReadFile(a_file, &a_data)) << "file failed: " << a_file; in CompareFilesByBlock()
134 EXPECT_TRUE(utils::ReadFile(b_file, &b_data)) << "file failed: " << b_file; in CompareFilesByBlock()
166 EXPECT_TRUE(utils::PWriteAll(fd, "\0", 1, offset)); in WriteByteAtOffset()
234 ASSERT_TRUE(utils::ReadFile(hash_file.path(), &hash)); in SignGeneratedShellPayloadWithKeys()
281 ASSERT_TRUE(utils::MakeTempFile("key.XXXXXX", &private_key_path, nullptr)); in SignGeneratedShellPayload()
338 EXPECT_TRUE(utils::MakeTempFile("a_img.XXXXXX", &state->a_img, nullptr)); in GenerateDeltaFile()
339 EXPECT_TRUE(utils::MakeTempFile("b_img.XXXXXX", &state->b_img, nullptr)); in GenerateDeltaFile()
344 utils::MakeTempFile("result_img.XXXXXX", &state->result_img, nullptr)); in GenerateDeltaFile()
350 state->image_size = utils::FileSize(state->a_img); in GenerateDeltaFile()
383 EXPECT_TRUE(utils::WriteFile( 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()
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()
Dverity_writer_android_unittest.cc52 utils::ReadFile(partition_.target_path, &actual_part); in TEST_F()
90 utils::ReadFile(partition_.target_path, &actual_part); in TEST_F()
111 utils::ReadFile(partition_.target_path, &actual_part); in TEST_F()
/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/tools/hidl/
DAndroid.bp98 "libhidl-gen-host-utils",
99 "libhidl-gen-utils",
104 "libhidl-gen-host-utils",
105 "libhidl-gen-utils",
136 "libhidl-gen-host-utils",
137 "libhidl-gen-utils",
142 "libhidl-gen-utils",
161 "libhidl-gen-host-utils",
162 "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.cc153 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(os_age) << " for metric " in ReportDailyMetrics()
198 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateCheckMetrics()
212 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateCheckMetrics()
225 value = utils::VersionPrefix(target_version); in ReportUpdateCheckMetrics()
272 LOG(INFO) << "Uploading " << utils::ToString(payload_type) << " for metric " in ReportUpdateAttemptMetrics()
277 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration) in ReportUpdateAttemptMetrics()
286 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration_uptime) in ReportUpdateAttemptMetrics()
321 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateAttemptMetrics()
335 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateAttemptMetrics()
426 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.cc259 ErrorCode base_error = utils::GetBaseErrorCode(error); in UpdateFailed()
261 << utils::ErrorCodeToString(base_error) << ")"; in UpdateFailed()
440 << utils::ToString(backoff_expiry_time_) in ShouldBackoffDownload()
446 << utils::ToString(backoff_expiry_time_); in ShouldBackoffDownload()
537 int fuzz_minutes = utils::FuzzInt(0, kMaxBackoffFuzzMinutes); in UpdateBackoffExpiryTime()
541 << utils::FormatTimeDelta(next_backoff_interval); in UpdateBackoffExpiryTime()
564 << utils::ToString(current_download_source_); in UpdateCurrentDownloadSource()
996 << utils::ToString(stored_time) in LoadBackoffExpiryTime()
1007 << utils::ToString(backoff_expiry_time_); in SetBackoffExpiryTime()
1045 << utils::ToString(stored_time) << ") in persisted state is " in LoadUpdateTimestampStart()
[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