Home
last modified time | relevance | path

Searched refs:tmp_file (Results 1 – 13 of 13) sorted by relevance

/system/extras/simpleperf/
Dcmd_kmem_test.cpp46 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()
Dread_elf_test.cpp179 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()
Dcmd_stat_test.cpp150 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()
Dcmd_report_test.cpp49 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()
Dcmd_trace_sched.cpp123 TemporaryFile tmp_file; in Run() local
125 if (!RecordSchedEvents(tmp_file.path)) { in Run()
128 record_file_ = tmp_file.path; in Run()
Denvironment.cpp857 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()
Dcmd_record.cpp1643 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/
Dzip_archive_test.cc396 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/
Dstoraged.cpp244 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/
Dtombstone_test.cpp47 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()
Ddump_memory_test.cpp143 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/
Ddebuggerd_test.cpp1179 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/
Dincfs_test.cpp325 const TemporaryFile tmp_file; in TEST_F() local
326 auto control{createControl(tmp_file.fd, -1, -1, -1)}; in TEST_F()