Home
last modified time | relevance | path

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

1234567891011

/system/update_engine/common/
Dutils_unittest.cc45 EXPECT_FALSE(utils::WriteFile("/this/doesn't/exist", "hello", 5)); in TEST()
50 EXPECT_TRUE(utils::WriteFile(file.path().c_str(), "hello", 5)); in TEST()
53 EXPECT_TRUE(utils::ReadFile(file.path().c_str(), &readback)); in TEST()
59 EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty)); in TEST()
71 EXPECT_TRUE(utils::ReadFileChunk(file.path().c_str(), kSize, 10, &in_data)); in TEST()
73 EXPECT_TRUE(utils::ReadFileChunk(file.path().c_str(), 0, -1, &in_data)); in TEST()
76 EXPECT_TRUE(utils::ReadFileChunk(file.path().c_str(), 10, 20, &in_data)); in TEST()
81 EXPECT_EQ("No such file or directory", utils::ErrnoNumberAsString(ENOENT)); in TEST()
88 EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0)); in TEST()
91 EXPECT_FALSE(utils::IsSymlink(temp_dir.GetPath().value().c_str())); in TEST()
[all …]
/system/update_engine/payload_consumer/
Dinstall_plan.cc87 url_str = utils::GetFilePath(fd); in ToString()
98 {"hash_checks_mandatory", utils::ToString(hash_checks_mandatory)}, in ToString()
99 {"powerwash_required", utils::ToString(powerwash_required)}, in ToString()
100 {"switch_slot_on_reboot", utils::ToString(switch_slot_on_reboot)}, in ToString()
101 {"run_post_install", utils::ToString(run_post_install)}, in ToString()
102 {"is_rollback", utils::ToString(is_rollback)}, in ToString()
104 utils::ToString(rollback_data_save_requested)}, in ToString()
105 {"write_verity", utils::ToString(write_verity)}, in ToString()
123 {"run_postinstall", utils::ToString(partition.run_postinstall)}, in ToString()
144 {"already_applied", utils::ToString(payload.already_applied)}, in ToString()
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.cc73 utils::FileSize(temp_file_.path())); in TEST_F()
76 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in TEST_F()
124 utils::FileSize(temp_file_.path())); in WriteAlignedExtents()
127 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in WriteAlignedExtents()
163 utils::FileSize(temp_file_.path())); in TEST_F()
166 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &resultant_data)); in TEST_F()
Dpostinstall_runner_action.cc153 if (!utils::FileExists(fs_mount_dir_.c_str())) { in PerformPartitionPostinstall()
160 if (utils::IsMountpoint(fs_mount_dir_)) { in PerformPartitionPostinstall()
162 utils::UnmountFilesystem(fs_mount_dir_); in PerformPartitionPostinstall()
188 if (!utils::SetBlockDeviceReadOnly(mountable_device, true)) { in PerformPartitionPostinstall()
194 if (!utils::MountFilesystem( in PerformPartitionPostinstall()
212 << " is: " << utils::GetFileFormat(abs_path); in PerformPartitionPostinstall()
261 utils::ReadAll(progress_fd_, buf, base::size(buf), &bytes_read, &eof); in OnProgressFdReady()
311 utils::UnmountFilesystem(fs_mount_dir_); in Cleanup()
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()
Dpayload_metadata.cc206 utils::HexDumpVector(decrypted_signature); in ValidateMetadataSignature()
208 utils::HexDumpVector(metadata_hash); in ValidateMetadataSignature()
230 utils::ReadFileChunk(payload_path, 0, kMaxPayloadHeaderSize, &payload)); in ParsePayloadFile()
235 utils::ReadFileChunk(payload_path, in ParsePayloadFile()
244 TEST_AND_RETURN_FALSE(utils::ReadFileChunk( in ParsePayloadFile()
Dverity_writer_android.cc125 return utils::WriteAll(write_fd, data, size); in Finalize()
158 uint64_t rounds = utils::DivRoundUp(data_size / block_size, rs_n); in EncodeFEC()
181 TEST_AND_RETURN_FALSE(utils::PReadAll(read_fd, in EncodeFEC()
205 TEST_AND_RETURN_FALSE(utils::PReadAll( in EncodeFEC()
213 if (!utils::WriteAll(write_fd, fec.data(), fec.size())) { in EncodeFEC()
Dextent_reader_unittest.cc56 ASSERT_TRUE(utils::WriteFile( in SetUp()
84 brillo::Blob blob1(utils::BlocksInExtents(extents) * kBlockSize); in TEST_F()
115 brillo::Blob blob(utils::BlocksInExtents(extents) * kBlockSize + 1); in TEST_F()
155 brillo::Blob blob(utils::BlocksInExtents(extents) * kBlockSize); 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()
Dgenerate_delta_main.cc91 CHECK(utils::WriteFile( in CalculateHashForSigning()
94 CHECK(utils::WriteFile(out_metadata_hash_file.c_str(), in CalculateHashForSigning()
107 CHECK(utils::ReadFile(signature_file, &signature)); in SignatureFileFlagToBlobs()
137 CHECK(utils::WriteFile(out_metadata_size_file.c_str(), in SignPayload()
191 payload.size = utils::FileSize(payload_file); in ApplyPayload()
266 utils::WriteFile( in ExtractProperties()
469 if (!utils::WriteFile(FLAGS_out_maximum_signature_size_file.c_str(), in Main()
540 CHECK(utils::FileExists(FLAGS_apex_info_file.c_str())); in Main()
541 CHECK(utils::IsRegFile(FLAGS_apex_info_file.c_str()) || in Main()
542 utils::IsSymlink(FLAGS_apex_info_file.c_str())); in Main()
[all …]
Dfull_update_generator_unittest.cc111 utils::BlocksInExtents(aops[0].op.dst_extents())); in TEST_F()
113 utils::BlocksInExtents(aops[1].op.dst_extents())); in TEST_F()
133 utils::BlocksInExtents(aops[0].op.dst_extents())); in TEST_F()
/system/tools/hidl/
DAndroid.bp113 "libhidl-gen-host-utils",
114 "libhidl-gen-utils",
119 "libhidl-gen-host-utils",
120 "libhidl-gen-utils",
151 "libhidl-gen-host-utils",
152 "libhidl-gen-utils",
157 "libhidl-gen-utils",
176 "libhidl-gen-host-utils",
177 "libhidl-gen-utils",
/system/extras/simpleperf/
Dutils_test.cpp26 TEST(utils, ConvertBytesToValue) { in TEST() argument
37 TEST(utils, ArchiveHelper) { in TEST() argument
62 TEST(utils, GetCpusFromString) { in TEST() argument
73 TEST(utils, GetTidsFromString) { in TEST() argument
78 TEST(utils, LineReader) { in TEST() argument
/system/tools/hidl/lint/
DAndroid.bp45 "libhidl-gen-host-utils",
46 "libhidl-gen-utils",
60 "libhidl-gen-host-utils",
61 "libhidl-gen-utils",
/system/update_engine/cros/
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.cc262 ErrorCode base_error = utils::GetBaseErrorCode(error); in UpdateFailed()
264 << utils::ErrorCodeToString(base_error) << ")"; in UpdateFailed()
445 << utils::ToString(backoff_expiry_time_) in ShouldBackoffDownload()
451 << utils::ToString(backoff_expiry_time_); in ShouldBackoffDownload()
526 auto exclusion_name = utils::GetExclusionName(GetCurrentUrl()); in ExcludeCurrentPayload()
565 int fuzz_minutes = utils::FuzzInt(0, kMaxBackoffFuzzMinutes); in UpdateBackoffExpiryTime()
569 << utils::FormatTimeDelta(next_backoff_interval); in UpdateBackoffExpiryTime()
592 << utils::ToString(current_download_source_); in UpdateCurrentDownloadSource()
1013 << utils::ToString(stored_time) in LoadBackoffExpiryTime()
1023 << utils::ToString(backoff_expiry_time_); in SetBackoffExpiryTime()
[all …]
/system/libvintf/
DAndroid.bp49 "libhidl-gen-utils",
88 "utils.cpp",
103 "libhidl-gen-utils",
137 "libhidl-gen-utils",
151 "libhidl-gen-utils",
215 "libhidl-gen-utils",
/system/teeui/libteeui/
DAndroid.bp13 "src/utils.cpp",
33 "src/utils.cpp",
/system/tools/xsdc/tests/
DAndroid.bp64 header_libs: ["libxsdc-utils"],
92 header_libs: ["libxsdc-utils"],
118 header_libs: ["libxsdc-utils"],
/system/teeui/tools/framebufferizer/src/com/android/framebufferizer/
DMain.java19 import com.android.framebufferizer.utils.Config;
20 import com.android.framebufferizer.utils.FrameBufferBuffer;
/system/bt/audio_bluetooth_hw/
DAndroid.bp20 "utils.cc",
45 "utils.cc",

1234567891011