Home
last modified time | relevance | path

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

12345

/system/update_engine/common/
Dutils_unittest.cc50 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
51 EXPECT_EQ("123456", utils::ParseECVersion( in TEST()
53 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
54 EXPECT_EQ("00VFA616", utils::ParseECVersion( in TEST()
58 EXPECT_EQ("", utils::ParseECVersion("b=1231a fw_version a=fasd2")); in TEST()
63 EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty)); in TEST()
75 EXPECT_TRUE(utils::WriteFile(file.value().c_str(), data.data(), data.size())); in TEST()
77 EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), kSize, 10, &in_data)); in TEST()
79 EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), 0, -1, &in_data)); in TEST()
82 EXPECT_TRUE(utils::ReadFileChunk(file.value().c_str(), 10, 20, &in_data)); in TEST()
[all …]
Dtest_utils.cc58 *os << utils::ErrorCodeToString(error_code); in PrintTo()
146 return utils::WriteFile(path.c_str(), data.data(), data.size()); in WriteFileVector()
150 return utils::WriteFile(path.c_str(), data.data(), data.size()); in WriteFileString()
261 CHECK(utils::MakeTempDirectory(kMountPathTemplate, &mount_path)); in CreateExtImageAtPath()
294 EXPECT_TRUE(utils::UnmountFilesystem(mount_path.c_str())); in CreateExtImageAtPath()
319 EXPECT_TRUE(utils::MakeTempDirectory("mnt.XXXXXX", mnt_path)); in ScopedLoopMounter()
326 EXPECT_TRUE(utils::MountFilesystem(loop_dev, *mnt_path, flags, "", nullptr)); in ScopedLoopMounter()
Dhash_calculator_unittest.cc116 utils::MakeTempFile("data.XXXXXX", &data_path, nullptr)); in TEST_F()
118 ASSERT_TRUE(utils::WriteFile(data_path.c_str(), "hi", 2)); in TEST_F()
142 utils::MakeTempFile("data.XXXXXX", &data_path, nullptr)); in TEST_F()
144 ASSERT_TRUE(utils::WriteFile(data_path.c_str(), "hi", 2)); in TEST_F()
/system/update_engine/payload_generator/
Dtarjan_unittest.cc69 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_a)); in TEST()
70 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_b)); in TEST()
71 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_c)); in TEST()
72 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_d)); in TEST()
73 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_e)); in TEST()
81 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_f)); in TEST()
89 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_g)); in TEST()
90 EXPECT_TRUE(utils::VectorContainsValue(vertex_indexes, n_h)); in TEST()
Dcycle_breaker_unittest.cc86 EXPECT_TRUE(utils::SetContainsKey(broken_edges, make_pair(n_a, n_e)) || in TEST()
87 utils::SetContainsKey(broken_edges, make_pair(n_e, n_b)) || in TEST()
88 utils::SetContainsKey(broken_edges, make_pair(n_b, n_a))); in TEST()
89 EXPECT_TRUE(utils::SetContainsKey(broken_edges, make_pair(n_c, n_d)) || in TEST()
90 utils::SetContainsKey(broken_edges, make_pair(n_d, n_e)) || in TEST()
91 utils::SetContainsKey(broken_edges, make_pair(n_e, n_c))); in TEST()
92 EXPECT_TRUE(utils::SetContainsKey(broken_edges, make_pair(n_g, n_h)) || in TEST()
93 utils::SetContainsKey(broken_edges, make_pair(n_h, n_g))); in TEST()
220 EXPECT_TRUE(utils::SetContainsKey(broken_edges, make_pair(n_b, n_a))); in TEST()
221 EXPECT_TRUE(utils::SetContainsKey(broken_edges, make_pair(n_b, n_c))); in TEST()
[all …]
Dpayload_file_unittest.cc40 EXPECT_TRUE(utils::MakeTempFile("ReorderBlobsTest.orig.XXXXXX", &orig_blobs, in TEST_F()
50 utils::WriteFile(orig_blobs.c_str(), orig_data.data(), orig_data.size())); in TEST_F()
54 utils::MakeTempFile("ReorderBlobsTest.new.XXXXXX", &new_blobs, nullptr)); in TEST_F()
79 EXPECT_TRUE(utils::ReadFile(new_blobs, &new_data)); in TEST_F()
Dpayload_generation_config.cc35 TEST_AND_RETURN_FALSE(utils::FileExists(path.c_str())); in ValidateExists()
39 utils::FileSize(path.c_str())); in ValidateExists()
43 if (utils::GetFilesystemSize(path, &block_count, &block_size) && in ValidateExists()
57 if (utils::IsExtFilesystem(path)) { in OpenFilesystem()
81 part.size = utils::FileSize(part.path); in LoadImageSize()
Dblob_file_writer_unittest.cc36 EXPECT_TRUE(utils::MakeTempFile("BlobFileWriterTest.XXXXXX", in TEST()
50 ASSERT_TRUE(utils::PReadAll(blob_fd, in TEST()
Ddelta_diff_generator.cc72 utils::MakeTempFile(kTempFileTemplate, &temp_file_path, &data_file_fd)); in GenerateUpdatePayloadFile()
98 !utils::IsSquashfsFilesystem(new_part.path)) { in GenerateUpdatePayloadFile()
100 if (utils::IsExtFilesystem(new_part.path)) { in GenerateUpdatePayloadFile()
Dab_generator_unittest.cc60 EXPECT_TRUE(utils::MakeTempFile( in TestSplitReplaceOrReplaceBzOperation()
75 ASSERT_TRUE(utils::WriteFile(part_path.c_str(), part_data.data(), part_size)); in TestSplitReplaceOrReplaceBzOperation()
112 EXPECT_TRUE(utils::MakeTempFile( in TestSplitReplaceOrReplaceBzOperation()
118 EXPECT_TRUE(utils::WriteFile(data_path.c_str(), op_blob.data(), in TestSplitReplaceOrReplaceBzOperation()
157 ASSERT_TRUE(utils::PReadAll(data_fd, in TestSplitReplaceOrReplaceBzOperation()
185 ASSERT_TRUE(utils::PReadAll(data_fd, in TestSplitReplaceOrReplaceBzOperation()
213 EXPECT_TRUE(utils::MakeTempFile( in TestMergeReplaceOrReplaceBzOperations()
228 ASSERT_TRUE(utils::WriteFile(part_path.c_str(), part_data.data(), part_size)); in TestMergeReplaceOrReplaceBzOperations()
281 EXPECT_TRUE(utils::MakeTempFile( in TestMergeReplaceOrReplaceBzOperations()
287 EXPECT_TRUE(utils::WriteFile(data_path.c_str(), blob_data.data(), in TestMergeReplaceOrReplaceBzOperations()
[all …]
Dgenerate_delta_main.cc121 CHECK(utils::WriteFile(out_hash_file.c_str(), payload_hash.data(), in CalculateHashForSigning()
124 CHECK(utils::WriteFile(out_metadata_hash_file.c_str(), metadata_hash.data(), in CalculateHashForSigning()
137 CHECK(utils::ReadFile(signature_file, &signature)); in SignatureFileFlagToBlobs()
164 CHECK(utils::WriteFile(out_metadata_size_file.c_str(), in SignPayload()
224 CHECK(utils::PReadAll(fd, buf.data(), buf.size(), offset, &bytes_read)); in ApplyDelta()
531 utils::GetMinorVersion(store, &minor_version)) { in Main()
546 if (utils::IsZlibCompatible(FLAGS_zlib_fingerprint)) { in Main()
574 CHECK(utils::WriteFile(FLAGS_out_metadata_size_file.c_str(), in Main()
Dtarjan.cc62 } else if (utils::VectorContainsValue(stack_, vertex_next)) { in Tarjan()
76 if (utils::VectorContainsValue(component, required_vertex_)) { in Tarjan()
/system/media/audio_utils/tests/
DAndroid.mk12 $(call include-path-for, audio-utils)
26 LOCAL_C_INCLUDES := $(call include-path-for, audio-utils)
36 LOCAL_C_INCLUDES := $(call include-path-for, audio-utils)
45 LOCAL_C_INCLUDES := $(call include-path-for, audio-utils)
/system/media/audio_utils/
DAndroid.mk24 $(call include-path-for, audio-utils)
46 $(call include-path-for, audio-utils)
60 $(call include-path-for, audio-utils)
76 $(call include-path-for, audio-utils)
95 $(call include-path-for, audio-utils)
/system/update_engine/payload_consumer/
Dpostinstall_runner_action.cc59 if (utils::CreatePowerwashMarkerFile(powerwash_marker_file_)) { in PerformAction()
102 utils::MakePartitionNameForMount(partition.target_path); in PerformPartitionPostinstall()
115 utils::MakeTempDirectory("au_postint_mount.XXXXXX", &fs_mount_dir_)); in PerformPartitionPostinstall()
141 if (!utils::SetBlockDeviceReadOnly(mountable_device, true)) { in PerformPartitionPostinstall()
147 if (!utils::MountFilesystem(mountable_device, in PerformPartitionPostinstall()
164 << " is: " << utils::GetFileFormat(abs_path); in PerformPartitionPostinstall()
216 utils::ReadAll(progress_fd_, buf, arraysize(buf), &bytes_read, &eof); in OnProgressFdReady()
266 utils::UnmountFilesystem(fs_mount_dir_); in Cleanup()
329 utils::DeletePowerwashMarkerFile(powerwash_marker_file_); in CompletePostinstall()
Ddelta_performer_integration_test.cc130 EXPECT_TRUE(utils::ReadFile(a_file, &a_data)) << "file failed: " << a_file; in CompareFilesByBlock()
131 EXPECT_TRUE(utils::ReadFile(b_file, &b_data)) << "file failed: " << b_file; in CompareFilesByBlock()
212 ASSERT_TRUE(utils::MakeTempFile("key.XXXXXX", in SignGeneratedShellPayload()
231 ASSERT_TRUE(utils::MakeTempFile("hash.XXXXXX", &hash_file, nullptr)); in SignGeneratedShellPayload()
250 ASSERT_TRUE(utils::ReadFile(hash_file, &hash)); in SignGeneratedShellPayload()
255 ASSERT_TRUE(utils::MakeTempFile("signature.XXXXXX", &sig_file, nullptr)); in SignGeneratedShellPayload()
264 ASSERT_TRUE(utils::MakeTempFile("signature.XXXXXX", &sig_file2, nullptr)); in SignGeneratedShellPayload()
306 EXPECT_TRUE(utils::MakeTempFile("a_img.XXXXXX", &state->a_img, nullptr)); in GenerateDeltaFile()
307 EXPECT_TRUE(utils::MakeTempFile("b_img.XXXXXX", &state->b_img, nullptr)); in GenerateDeltaFile()
312 utils::MakeTempFile("result_img.XXXXXX", &state->result_img, nullptr)); in GenerateDeltaFile()
[all …]
Dfile_writer_unittest.cc42 ASSERT_TRUE(utils::MakeTempFile("FileWriterTest-XXXXXX", &path, nullptr)); in TEST()
51 EXPECT_TRUE(utils::ReadFile(path, &actual_data)); in TEST()
67 ASSERT_TRUE(utils::MakeTempFile("FileWriterTest-XXXXXX", &path, nullptr)); in TEST()
Dextent_writer_unittest.cc82 utils::FileSize(temp_file_.path())); in TEST_F()
85 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in TEST_F()
150 utils::FileSize(temp_file_.path())); in WriteAlignedExtents()
153 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in WriteAlignedExtents()
200 utils::FileSize(temp_file_.path())); in TestZeroPad()
203 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &result_file)); in TestZeroPad()
250 utils::FileSize(temp_file_.path())); in TEST_F()
253 EXPECT_TRUE(utils::ReadFile(temp_file_.path(), &resultant_data)); in TEST_F()
Dinstall_plan.cc68 utils::ToString(partition.run_postinstall).c_str()); in Dump()
82 << ", hash_checks_mandatory: " << utils::ToString( in Dump()
84 << ", powerwash_required: " << utils::ToString(powerwash_required); in Dump()
Ddelta_performer_unittest.cc134 EXPECT_TRUE(utils::MakeTempFile("Blob-XXXXXX", &blob_path, nullptr)); in GeneratePayload()
136 EXPECT_TRUE(utils::WriteFile(blob_path.c_str(), in GeneratePayload()
167 EXPECT_TRUE(utils::MakeTempFile("Payload-XXXXXX", &payload_path, nullptr)); in GeneratePayload()
174 EXPECT_TRUE(utils::ReadFile(payload_path, &payload_data)); in GeneratePayload()
198 EXPECT_TRUE(utils::MakeTempFile("Partition-XXXXXX", &new_part, nullptr)); in ApplyPayloadToData()
200 EXPECT_TRUE(utils::WriteFile(new_part.c_str(), target_data.data(), in ApplyPayloadToData()
219 EXPECT_TRUE(utils::ReadFile(new_part, &partition_data)); in ApplyPayloadToData()
311 EXPECT_TRUE(utils::FileExists(kUnittestPublicKeyPath)); in DoMetadataSignatureTest()
477 EXPECT_TRUE(utils::MakeTempFile("Source-XXXXXX", in TEST_F()
480 EXPECT_TRUE(utils::WriteFile(source_path.c_str(), in TEST_F()
[all …]
Ddelta_performer.cc88 if (utils::SplitPartitionName(path, nullptr, &volume_no)) { in CreateFileDescriptor()
89 utils::TryAttachingUbiVolume(volume_no, kUbiVolumeAttachTimeout); in CreateFileDescriptor()
114 utils::SetBlockDeviceReadOnly(path, (mode & O_ACCMODE) == O_RDONLY); in OpenFile()
928 utils::PWriteAll(target_fd_, zeros.data(), chunk_length, start + offset)); in PerformZeroOrDiscardOperation()
958 TEST_AND_RETURN_FALSE(utils::PReadAll(target_fd_, in PerformMoveOperation()
974 TEST_AND_RETURN_FALSE(utils::PWriteAll(target_fd_, in PerformMoveOperation()
1014 utils::HexDumpVector(expected_source_hash); in ValidateSourceHash()
1016 utils::HexDumpVector(calculated_hash); in ValidateSourceHash()
1054 utils::PReadAll(source_fd_, in PerformSourceCopyOperation()
1062 utils::PWriteAll(target_fd_, in PerformSourceCopyOperation()
[all …]
/system/update_engine/
Dmetrics.cc120 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(os_age) in ReportDailyMetrics()
165 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateCheckMetrics()
181 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateCheckMetrics()
231 LOG(INFO) << "Uploading " << utils::ToString(payload_type) in ReportUpdateAttemptMetrics()
238 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration) in ReportUpdateAttemptMetrics()
247 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(duration_uptime) in ReportUpdateAttemptMetrics()
325 LOG(INFO) << "Sending " << utils::FormatTimeDelta(time_since_last) in ReportUpdateAttemptMetrics()
341 LOG(INFO) << "Sending " << utils::FormatTimeDelta(uptime_since_last) in ReportUpdateAttemptMetrics()
397 metric += utils::ToString(source); in ReportSuccessfulUpdateMetrics()
445 LOG(INFO) << "Uploading " << utils::FormatTimeDelta(total_duration) in ReportSuccessfulUpdateMetrics()
[all …]
Dpayload_state.cc246 ErrorCode base_error = utils::GetBaseErrorCode(error); in UpdateFailed()
248 << " (" << utils::ErrorCodeToString(base_error) << ")"; in UpdateFailed()
412 << utils::ToString(backoff_expiry_time_) in ShouldBackoffDownload()
418 << utils::ToString(backoff_expiry_time_); in ShouldBackoffDownload()
507 int fuzz_minutes = utils::FuzzInt(0, kMaxBackoffFuzzMinutes); in UpdateBackoffExpiryTime()
511 << utils::FormatTimeDelta(next_backoff_interval); in UpdateBackoffExpiryTime()
532 << utils::ToString(current_download_source_); in UpdateCurrentDownloadSource()
939 << utils::ToString(stored_time) in LoadBackoffExpiryTime()
950 << utils::ToString(backoff_expiry_time_); in SetBackoffExpiryTime()
988 << utils::ToString(stored_time) in LoadUpdateTimestampStart()
[all …]
Dmain.cc46 if (utils::FileExists(symlink_path.c_str()) && in SetupLogSymlink()
47 !utils::IsSymlink(symlink_path.c_str())) { in SetupLogSymlink()
/system/extras/perfprofd/tests/
DREADME.txt11 "core" library, and a "utils library. Picture:
22 | | calls into utils library when for
28 | utils | real implementations of perfprofd_sleep,

12345