/system/extras/simpleperf/ |
H A D | cmd_stat_test.cpp | 114 TemporaryFile tmp_file; local 116 tmp_file.path, "sleep", "1"})); 118 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); 135 TemporaryFile tmp_file; local 138 tmp_file.path, "sleep", "2"})); 140 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s));
|
H A D | cmd_debug_unwind_test.cpp | 82 TemporaryFile tmp_file; local 84 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path})); 88 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path, "--time", 96 TemporaryFile tmp_file; local 98 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path, "--symfs", 101 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file.path);
|
H A D | cmd_kmem_test.cpp | 45 TemporaryFile tmp_file; local 47 tmp_file.path}; 50 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &result->content)); 99 TemporaryFile tmp_file; local 101 ASSERT_TRUE(RunKmemRecordCmd({"--slab"}, tmp_file.path)); 103 KmemReportRawFile(tmp_file.path, {}, &result); 109 TemporaryFile tmp_file; local 111 ASSERT_TRUE(RunKmemRecordCmd({"--slab", "-g"}, tmp_file.path)); 113 KmemReportRawFile(tmp_file.path, {"-g"}, &result);
|
H A D | read_elf_test.cpp | 143 TemporaryFile tmp_file; local 144 ASSERT_EQ(ElfStatus::READ_FAILED, IsValidElfPath(tmp_file.path)); 145 ASSERT_TRUE(android::base::WriteStringToFile("wrong format for elf", tmp_file.path)); 146 ASSERT_EQ(ElfStatus::FILE_MALFORMED, IsValidElfPath(tmp_file.path));
|
H A D | cmd_report_test.cpp | 48 TemporaryFile tmp_file; local 50 "-i", perf_data, "--symfs", GetTestDataDir(), "-o", tmp_file.path}; 53 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &content)); 502 TemporaryFile tmp_file; local 504 RecordCmd()->Run({"-p", pid, "-g", "-o", tmp_file.path, "sleep", SLEEP_SEC})); 505 ReportRaw(tmp_file.path, {"-g"});
|
H A D | gtest_main.cpp | 57 TemporaryFile tmp_file; local 58 if (!android::base::WriteStringToFile(content, tmp_file.path)) { 59 PLOG(ERROR) << "failed to write file " << tmp_file.path; 62 ArchiveHelper ahelper(tmp_file.fd, tmp_file.path); 64 LOG(ERROR) << "failed to open archive " << tmp_file.path;
|
H A D | cmd_debug_unwind.cpp | 302 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); local 303 if (!Workload::RunCmd({"mv", output_filename_, tmp_file->path})) { 309 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file->path);
|
H A D | cmd_record.cpp | 1143 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); local 1144 if (!Workload::RunCmd({"mv", record_filename_, tmp_file->path})) { 1147 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file->path); 1175 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); local 1176 if (!Workload::RunCmd({"mv", record_filename_, tmp_file->path})) { 1182 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file->path);
|
/system/core/debuggerd/libdebuggerd/test/ |
H A D | tombstone_test.cpp | 49 char tmp_file[256]; local 51 memcpy(tmp_file, data_template, sizeof(data_template)); 52 int tombstone_fd = mkstemp(tmp_file); 55 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); 56 tombstone_fd = mkstemp(tmp_file); 61 if (unlink(tmp_file) == -1) {
|
H A D | dump_memory_test.cpp | 160 char tmp_file[256]; local 162 memcpy(tmp_file, data_template, sizeof(data_template)); 163 int tombstone_fd = mkstemp(tmp_file); 166 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); 167 tombstone_fd = mkstemp(tmp_file); 172 if (unlink(tmp_file) == -1) {
|
/system/core/storaged/ |
H A D | storaged.cpp | 240 string tmp_file = proto_file + "_tmp"; local 241 unique_fd fd(TEMP_FAILURE_RETRY(open(tmp_file.c_str(), 246 PLOG_TO(SYSTEM, ERROR) << "Faied to open tmp file: " << tmp_file; 261 PLOG_TO(SYSTEM, ERROR) << "Faied to write tmp file: " << tmp_file; 284 PLOG_TO(SYSTEM, ERROR) << "Faied to write tmp file: " << tmp_file; 290 rename(tmp_file.c_str(), proto_file.c_str());
|
/system/core/libziparchive/ |
H A D | zip_archive_test.cc | 296 TemporaryFile tmp_file; local 297 ASSERT_NE(-1, tmp_file.fd); 298 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, kEmptyEntriesZip, sizeof(kEmptyEntriesZip))); 301 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EmptyEntriesTest", &handle)); 321 TemporaryFile tmp_file; local 322 ASSERT_NE(-1, tmp_file.fd); 323 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, reinterpret_cast<const uint8_t*>(kAbZip), 326 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EntryLargerThan32KTest", &handle)); 364 TemporaryFile tmp_file; local 365 ASSERT_NE(-1, tmp_file 377 TemporaryFile tmp_file; local 580 TemporaryFile tmp_file; local 687 TemporaryFile tmp_file; local [all...] |