/system/extras/simpleperf/ |
D | cmd_kmem_test.cpp | 46 TemporaryFile tmp_file; in KmemReportRawFile() local 47 close(tmp_file.release()); in KmemReportRawFile() 48 std::vector<std::string> args = {"report", "-i", perf_data, "-o", tmp_file.path}; in KmemReportRawFile() 51 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &result->content)); in KmemReportRawFile() 98 TemporaryFile tmp_file; in TEST() local 100 ASSERT_TRUE(RunKmemRecordCmd({"--slab"}, tmp_file.path)); in TEST() 102 KmemReportRawFile(tmp_file.path, {}, &result); in TEST() 108 TemporaryFile tmp_file; in TEST() local 110 ASSERT_TRUE(RunKmemRecordCmd({"--slab", "-g"}, tmp_file.path)); in TEST() 112 KmemReportRawFile(tmp_file.path, {"-g"}, &result); in TEST()
|
D | read_elf_test.cpp | 179 TemporaryFile tmp_file; in TEST() local 180 ASSERT_EQ(ElfStatus::READ_FAILED, IsValidElfPath(tmp_file.path)); in TEST() 181 ASSERT_TRUE(android::base::WriteStringToFile("wrong format for elf", tmp_file.path)); in TEST() 182 ASSERT_EQ(ElfStatus::FILE_MALFORMED, IsValidElfPath(tmp_file.path)); in TEST()
|
D | cmd_stat_test.cpp | 150 TemporaryFile tmp_file; in TEST() local 152 {"--group", "instructions:u,instructions:k", "-o", tmp_file.path, "sleep", "1"})); in TEST() 154 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST() 170 TemporaryFile tmp_file; in TEST() local 172 {"--interval", "500.0", "--duration", "1.2", "-o", tmp_file.path, "sleep", "2"})); in TEST() 174 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST()
|
D | cmd_report_test.cpp | 49 TemporaryFile tmp_file; in ReportRaw() local 51 "-o", tmp_file.path}; in ReportRaw() 54 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &content)); in ReportRaw() 549 TemporaryFile tmp_file; in TEST_F() local 550 ASSERT_TRUE(RecordCmd()->Run({"-p", pid, "-g", "-o", tmp_file.path, "sleep", SLEEP_SEC})); in TEST_F() 551 ReportRaw(tmp_file.path, {"-g"}); in TEST_F()
|
D | cmd_trace_sched.cpp | 123 TemporaryFile tmp_file; in Run() local 125 if (!RecordSchedEvents(tmp_file.path)) { in Run() 128 record_file_ = tmp_file.path; in Run()
|
D | environment.cpp | 857 std::unique_ptr<TemporaryFile> tmp_file(new TemporaryFile(tmp_dir_)); in CreateTempFile() local 858 CHECK_NE(tmp_file->fd, -1) << "failed to create tmpfile under " << tmp_dir_; in CreateTempFile() 860 tmp_file->DoNotRemove(); in CreateTempFile() 861 files_to_delete_.push_back(tmp_file->path); in CreateTempFile() 863 return tmp_file; in CreateTempFile()
|
D | cmd_record.cpp | 1643 auto tmp_file = ScopedTempFiles::CreateTempFile(); in MergeMapRecords() local 1644 auto reader = MoveRecordFile(tmp_file->path); in MergeMapRecords() 1678 auto tmp_file = ScopedTempFiles::CreateTempFile(); in PostUnwindRecords() local 1679 auto reader = MoveRecordFile(tmp_file->path); in PostUnwindRecords() 1697 auto tmp_file = ScopedTempFiles::CreateTempFile(); in JoinCallChains() local 1698 auto reader = MoveRecordFile(tmp_file->path); in JoinCallChains()
|
/system/libziparchive/ |
D | zip_archive_test.cc | 396 TemporaryFile tmp_file; in TEST() local 397 ASSERT_NE(-1, tmp_file.fd); in TEST() 400 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, leading_garbage.c_str(), in TEST() 405 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, valid_content.c_str(), valid_content.size())); in TEST() 408 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, ending_garbage.c_str(), in TEST() 412 ASSERT_EQ(0, lseek(tmp_file.fd, 0, SEEK_SET)); in TEST() 413 ASSERT_EQ(0, OpenArchiveFdRange(tmp_file.fd, "OpenArchiveFdRange", &handle, in TEST() 499 TemporaryFile tmp_file; in TEST() local 500 ASSERT_NE(-1, tmp_file.fd); in TEST() 501 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, kEmptyEntriesZip, sizeof(kEmptyEntriesZip))); in TEST() [all …]
|
/system/core/storaged/ |
D | storaged.cpp | 244 string tmp_file = proto_file + "_tmp"; in flush_proto_data() local 245 unique_fd fd(TEMP_FAILURE_RETRY(open(tmp_file.c_str(), in flush_proto_data() 250 PLOG(ERROR) << "Faied to open tmp file: " << tmp_file; in flush_proto_data() 265 PLOG(ERROR) << "Faied to write tmp file: " << tmp_file; in flush_proto_data() 288 PLOG(ERROR) << "Faied to write tmp file: " << tmp_file; in flush_proto_data() 294 rename(tmp_file.c_str(), proto_file.c_str()); in flush_proto_data()
|
/system/core/debuggerd/libdebuggerd/test/ |
D | tombstone_test.cpp | 47 char tmp_file[256]; in SetUp() local 49 memcpy(tmp_file, data_template, sizeof(data_template)); in SetUp() 50 int tombstone_fd = mkstemp(tmp_file); in SetUp() 53 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); in SetUp() 54 tombstone_fd = mkstemp(tmp_file); in SetUp() 59 if (unlink(tmp_file) == -1) { in SetUp()
|
D | dump_memory_test.cpp | 143 char tmp_file[256]; in SetUp() local 145 memcpy(tmp_file, data_template, sizeof(data_template)); in SetUp() 146 int tombstone_fd = mkstemp(tmp_file); in SetUp() 149 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); in SetUp() 150 tombstone_fd = mkstemp(tmp_file); in SetUp() 155 if (unlink(tmp_file) == -1) { in SetUp()
|
/system/core/debuggerd/ |
D | debuggerd_test.cpp | 1179 FILE* tmp_file = tmpfile(); in seccomp_fork_impl() local 1180 if (!tmp_file) { in seccomp_fork_impl() 1184 unique_fd tmp_fd(TEMP_FAILURE_RETRY(dup(fileno(tmp_file)))); in seccomp_fork_impl()
|
/system/incremental_delivery/incfs/tests/ |
D | incfs_test.cpp | 325 const TemporaryFile tmp_file; in TEST_F() local 326 auto control{createControl(tmp_file.fd, -1, -1, -1)}; in TEST_F()
|