/system/bt/gd/os/linux_generic/ |
D | files_test.cc | 33 auto temp_file = temp_dir / "file_1.txt"; in TEST() local 35 ASSERT_TRUE(WriteToFile(temp_file.string(), text)); in TEST() 36 EXPECT_TRUE(FileExists(temp_file.string())); in TEST() 43 auto temp_file = temp_dir / "file_1.txt"; in TEST() local 45 ASSERT_TRUE(WriteToFile(temp_file.string(), text)); in TEST() 46 EXPECT_THAT(ReadSmallFile(temp_file.string()), Optional(StrEq(text))); in TEST() 48 ASSERT_TRUE(RenameFile(temp_file.string(), to_file.string())); in TEST() 49 EXPECT_FALSE(std::filesystem::exists(temp_file)); in TEST() 52 ASSERT_FALSE(RenameFile(temp_file.string(), to_file.string())); in TEST() 57 auto temp_file = temp_dir / "file_1.txt"; in TEST() local [all …]
|
/system/libziparchive/ |
D | zip_archive_benchmark.cpp | 54 std::unique_ptr<TemporaryFile> temp_file(CreateZip()); in FindEntry_no_match() local 64 OpenArchive(temp_file->path, &handle); in FindEntry_no_match() 72 std::unique_ptr<TemporaryFile> temp_file(CreateZip()); in Iterate_all_files() local 79 OpenArchive(temp_file->path, &handle); in Iterate_all_files() 112 std::unique_ptr<TemporaryFile> temp_file(CreateZip(1024 * 1024, 1)); in ExtractEntry() local 116 if (OpenArchive(temp_file->path, &handle)) { in ExtractEntry()
|
/system/core/libunwindstack/tests/ |
D | MemoryOfflineTest.cpp | 34 ASSERT_TRUE(android::base::WriteFully(temp_file.fd, &offset, sizeof(offset))); in SetUp() 35 ASSERT_TRUE(android::base::WriteFully(temp_file.fd, data.data(), data.size())); in SetUp() 40 ASSERT_TRUE(memory->Init(temp_file.path, 0)); in SetUp() 43 TemporaryFile temp_file; member in unwindstack::MemoryOfflineTest
|
/system/tools/sysprop/tests/ |
D | JavaGenTest.cpp | 545 TemporaryFile temp_file; in TEST() local 548 ASSERT_EQ(write(temp_file.fd, kTestSyspropFile, strlen(kTestSyspropFile)), in TEST() 550 close(temp_file.fd); in TEST() 551 temp_file.fd = -1; in TEST() 561 ASSERT_RESULT_OK(GenerateJavaLibrary(temp_file.path, scope, temp_dir.path)); in TEST()
|
/system/core/adb/client/ |
D | adb_wifi.cpp | 135 std::unique_ptr<TemporaryFile> temp_file(new TemporaryFile(adb_get_android_dir_path())); in write_known_host_to_file() local 136 if (temp_file->fd == -1) { in write_known_host_to_file() 137 PLOG(ERROR) << "Failed to open [" << temp_file->path << "] for writing"; in write_known_host_to_file() 141 if (!known_hosts.SerializeToFileDescriptor(temp_file->fd)) { in write_known_host_to_file() 145 temp_file->DoNotRemove(); in write_known_host_to_file() 146 std::string temp_file_name(temp_file->path); in write_known_host_to_file() 147 temp_file.reset(); in write_known_host_to_file()
|
/system/core/adb/ |
D | sysdeps_win32_test.cpp | 94 TemporaryFile temp_file; in TEST() local 95 EXPECT_TRUE(temp_file.fd >= 0); in TEST() 96 EXPECT_EQ(0, unix_isatty(temp_file.fd)); in TEST() 98 int temp_file_ro_fd = unix_open(temp_file.path, O_RDONLY); in TEST()
|
D | test_device.py | 815 for temp_file in temp_files: 818 temp_file.base_name) 819 self._verify_remote(temp_file.checksum, remote_path) 906 for temp_file in temp_files: 908 temp_file.base_name) 909 self._verify_remote(temp_file.checksum, remote_path) 915 temp_file.base_name) 916 self._verify_remote(temp_file.checksum, remote_path) 1022 for temp_file in temp_files: 1025 temp_file.base_name) [all …]
|
/system/extras/partition_tools/ |
D | lpadd.cc | 121 std::optional<TemporaryFile>* temp_file, uint32_t* block_size = nullptr); 245 std::optional<TemporaryFile>* temp_file, in MaybeUnsparse() argument 252 temp_file->emplace(GetTemporaryDir()); in MaybeUnsparse() 253 if ((*temp_file)->fd < 0) { in MaybeUnsparse() 260 if (sparse_file_write(sf.get(), (*temp_file)->fd, false, false, false) != 0) { in MaybeUnsparse()
|
/system/update_engine/common/ |
D | utils_unittest.cc | 100 string temp_file = temp_dir.GetPath().Append("temp-file").value(); in TEST() local 101 EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0)); in TEST() 103 EXPECT_EQ(0, symlink(temp_file.c_str(), temp_symlink.c_str())); in TEST() 105 EXPECT_FALSE(utils::IsSymlink(temp_file.c_str())); in TEST()
|
/system/extras/libfec/test/ |
D | fec_unittest.cpp | 51 TemporaryFile temp_file; in BuildHashtree() local 52 ASSERT_TRUE(builder.WriteHashTreeToFd(temp_file.fd, 0)); in BuildHashtree() 53 android::base::ReadFileToString(temp_file.path, &hashtree_content_); in BuildHashtree()
|
/system/update_engine/payload_consumer/ |
D | download_action_unittest.cc | 357 ScopedTempFile temp_file; in TestTerminateEarly() local 360 EXPECT_EQ(0, writer.Open(temp_file.path().c_str(), O_WRONLY | O_CREAT, 0)); in TestTerminateEarly() 396 const off_t resulting_file_size(utils::FileSize(temp_file.path())); in TestTerminateEarly()
|