Home
last modified time | relevance | path

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

123456

/system/update_engine/common/
Dutils_unittest.cc44 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
45 EXPECT_EQ("123456", utils::ParseECVersion( in TEST()
47 EXPECT_EQ("12345", utils::ParseECVersion("fw_version=12345")); in TEST()
48 EXPECT_EQ("00VFA616", utils::ParseECVersion( in TEST()
52 EXPECT_EQ("", utils::ParseECVersion("b=1231a fw_version a=fasd2")); in TEST()
56 EXPECT_FALSE(utils::WriteFile("/this/doesn't/exist", "hello", 5)); in TEST()
63 EXPECT_TRUE(utils::WriteFile(file.value().c_str(), "hello", 5)); in TEST()
66 EXPECT_TRUE(utils::ReadFile(file.value().c_str(), &readback)); in TEST()
72 EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty)); in TEST()
84 EXPECT_TRUE(utils::WriteFile(file.value().c_str(), data.data(), data.size())); in TEST()
[all …]
Dhash_calculator_unittest.cc113 utils::MakeTempFile("data.XXXXXX", &data_path, nullptr)); in TEST_F()
115 ASSERT_TRUE(utils::WriteFile(data_path.c_str(), "hi", 2)); in TEST_F()
139 utils::MakeTempFile("data.XXXXXX", &data_path, nullptr)); in TEST_F()
141 ASSERT_TRUE(utils::WriteFile(data_path.c_str(), "hi", 2)); in TEST_F()
Dtest_utils.cc59 *os << utils::ErrorCodeToString(error_code); in PrintTo()
145 return utils::WriteFile(path.c_str(), data.data(), data.size()); in WriteFileVector()
149 return utils::WriteFile(path.c_str(), data.data(), data.size()); in WriteFileString()
257 EXPECT_TRUE(utils::MountFilesystem(loop_dev, *mnt_path, flags, "", "")); in ScopedLoopMounter()
/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()
Dblob_file_writer_unittest.cc36 EXPECT_TRUE(utils::MakeTempFile("BlobFileWriterTest.XXXXXX", in TEST()
50 ASSERT_TRUE(utils::PReadAll(blob_fd, in TEST()
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.cc119 CHECK(utils::WriteFile(out_hash_file.c_str(), payload_hash.data(), in CalculateHashForSigning()
122 CHECK(utils::WriteFile(out_metadata_hash_file.c_str(), metadata_hash.data(), in CalculateHashForSigning()
135 CHECK(utils::ReadFile(signature_file, &signature)); in SignatureFileFlagToBlobs()
162 CHECK(utils::WriteFile(out_metadata_size_file.c_str(), in SignPayload()
227 CHECK(utils::PReadAll(fd, buf.data(), buf.size(), offset, &bytes_read)); in ApplyDelta()
563 utils::GetMinorVersion(store, &minor_version)) { in Main()
578 if (utils::IsZlibCompatible(FLAGS_zlib_fingerprint)) { in Main()
608 CHECK(utils::WriteFile(FLAGS_out_metadata_size_file.c_str(), in Main()
Dpayload_generation_config.cc37 TEST_AND_RETURN_FALSE(utils::FileExists(path.c_str())); in ValidateExists()
41 utils::FileSize(path.c_str())); in ValidateExists()
83 part.size = utils::FileSize(part.path); in LoadImageSize()
/system/update_engine/payload_consumer/
Ddelta_performer_integration_test.cc132 EXPECT_TRUE(utils::ReadFile(a_file, &a_data)) << "file failed: " << a_file; in CompareFilesByBlock()
133 EXPECT_TRUE(utils::ReadFile(b_file, &b_data)) << "file failed: " << b_file; in CompareFilesByBlock()
165 EXPECT_TRUE(utils::PWriteAll(fd, "\0", 1, offset)); in WriteByteAtOffset()
213 ASSERT_TRUE(utils::MakeTempFile("key.XXXXXX", in SignGeneratedShellPayload()
244 ASSERT_TRUE(utils::MakeTempFile("hash.XXXXXX", &hash_file, nullptr)); in SignGeneratedShellPayload()
264 ASSERT_TRUE(utils::ReadFile(hash_file, &hash)); in SignGeneratedShellPayload()
268 ASSERT_TRUE(utils::MakeTempFile("signature.XXXXXX", &sig_file, nullptr)); in SignGeneratedShellPayload()
273 ASSERT_TRUE(utils::MakeTempFile("signature.XXXXXX", &sig_file2, nullptr)); in SignGeneratedShellPayload()
314 EXPECT_TRUE(utils::MakeTempFile("a_img.XXXXXX", &state->a_img, nullptr)); in GenerateDeltaFile()
315 EXPECT_TRUE(utils::MakeTempFile("b_img.XXXXXX", &state->b_img, nullptr)); in GenerateDeltaFile()
[all …]
Dpostinstall_runner_action.cc104 utils::MakePartitionNameForMount(partition.target_path); in PerformPartitionPostinstall()
123 if (utils::IsMountpoint(fs_mount_dir_)) { in PerformPartitionPostinstall()
125 utils::UnmountFilesystem(fs_mount_dir_); in PerformPartitionPostinstall()
151 if (!utils::SetBlockDeviceReadOnly(mountable_device, true)) { in PerformPartitionPostinstall()
157 if (!utils::MountFilesystem(mountable_device, in PerformPartitionPostinstall()
174 << " is: " << utils::GetFileFormat(abs_path); in PerformPartitionPostinstall()
226 utils::ReadAll(progress_fd_, buf, arraysize(buf), &bytes_read, &eof); in OnProgressFdReady()
277 utils::UnmountFilesystem(fs_mount_dir_); in Cleanup()
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.cc63 utils::ToString(partition.run_postinstall).c_str()); in Dump()
82 << utils::ToString(hash_checks_mandatory) in Dump()
83 << ", powerwash_required: " << utils::ToString(powerwash_required); in Dump()
Ddelta_performer_unittest.cc129 EXPECT_TRUE(utils::MakeTempFile("Blob-XXXXXX", &blob_path, nullptr)); in GeneratePayload()
131 EXPECT_TRUE(utils::WriteFile(blob_path.c_str(), in GeneratePayload()
162 EXPECT_TRUE(utils::MakeTempFile("Payload-XXXXXX", &payload_path, nullptr)); in GeneratePayload()
170 EXPECT_TRUE(utils::ReadFile(payload_path, &payload_data)); in GeneratePayload()
194 EXPECT_TRUE(utils::MakeTempFile("Partition-XXXXXX", &new_part, nullptr)); in ApplyPayloadToData()
196 EXPECT_TRUE(utils::WriteFile(new_part.c_str(), target_data.data(), in ApplyPayloadToData()
215 EXPECT_TRUE(utils::ReadFile(new_part, &partition_data)); in ApplyPayloadToData()
307 EXPECT_TRUE(utils::FileExists(public_key_path.c_str())); in DoMetadataSignatureTest()
478 EXPECT_TRUE(utils::MakeTempFile("Source-XXXXXX", in TEST_F()
481 EXPECT_TRUE(utils::WriteFile(source_path.c_str(), in TEST_F()
[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.cc253 ErrorCode base_error = utils::GetBaseErrorCode(error); in UpdateFailed()
255 << " (" << utils::ErrorCodeToString(base_error) << ")"; in UpdateFailed()
423 << utils::ToString(backoff_expiry_time_) in ShouldBackoffDownload()
429 << utils::ToString(backoff_expiry_time_); in ShouldBackoffDownload()
520 int fuzz_minutes = utils::FuzzInt(0, kMaxBackoffFuzzMinutes); in UpdateBackoffExpiryTime()
524 << utils::FormatTimeDelta(next_backoff_interval); in UpdateBackoffExpiryTime()
547 << utils::ToString(current_download_source_); in UpdateCurrentDownloadSource()
976 << utils::ToString(stored_time) in LoadBackoffExpiryTime()
987 << utils::ToString(backoff_expiry_time_); in SetBackoffExpiryTime()
1025 << utils::ToString(stored_time) in LoadUpdateTimestampStart()
[all …]
Dhardware_chromeos.cc179 return utils::ParseECVersion(input_line); in GetECVersion()
187 if (!utils::ReadFile(marker_path.value(), &contents)) in GetPowerwashCount()
196 bool result = utils::WriteFile( in SchedulePowerwash()
/system/nfc/halimpl/pn54x/
DAndroid.mk62 $(call all-c-files-under, utils) \
63 $(call all-cpp-files-under, utils) \
70 $(LOCAL_PATH)/utils \
/system/tools/hidl/
DAndroid.bp18 "utils",
95 "libhidl-gen-utils",
121 "libhidl-gen-utils",
138 "libhidl-gen-utils",
/system/extras/perfprofd/tests/
DREADME.txt17 "core" library, and a "utils library. Picture:
28 | | calls into utils library when for
34 | utils | real implementations of perfprofd_sleep,
/system/extras/simpleperf/
Dutils_test.cpp38 TEST(utils, ProcessKernelSymbols) { in TEST() argument
66 TEST(utils, ConvertBytesToValue) { in TEST() argument
/system/bt/hci/
DAndroid.bp37 "system/bt/utils/include",
58 "system/bt/utils/include",
/system/bt/vendor_libs/test_vendor_lib/
DAndroid.bp32 "system/bt/utils/include",
71 "system/bt/utils/include",

123456