/system/extras/simpleperf/ |
D | cmd_debug_unwind_test.cpp | 41 TemporaryFile tmp_file; in TEST() local 43 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path})); in TEST() 47 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path, "--time", in TEST() 55 TemporaryFile tmp_file; in TEST() local 57 ASSERT_TRUE(DebugUnwindCmd()->Run({"-i", input_data, "-o", tmp_file.path, "--symfs", in TEST() 60 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file.path); in TEST() 70 TemporaryFile tmp_file; in TEST() local 74 "-o", tmp_file.path})); in TEST() 83 TemporaryFile tmp_file; in TEST() local 85 "--symfs", GetTestDataDir(), "-o", tmp_file.path})); in TEST() [all …]
|
D | cmd_kmem_test.cpp | 46 TemporaryFile tmp_file; in KmemReportRawFile() local 48 tmp_file.path}; in KmemReportRawFile() 51 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &result->content)); in KmemReportRawFile() 100 TemporaryFile tmp_file; in TEST() local 102 ASSERT_TRUE(RunKmemRecordCmd({"--slab"}, tmp_file.path)); in TEST() 104 KmemReportRawFile(tmp_file.path, {}, &result); in TEST() 110 TemporaryFile tmp_file; in TEST() local 112 ASSERT_TRUE(RunKmemRecordCmd({"--slab", "-g"}, tmp_file.path)); in TEST() 114 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_report_test.cpp | 49 TemporaryFile tmp_file; in ReportRaw() local 51 "-i", perf_data, "--symfs", GetTestDataDir(), "-o", tmp_file.path}; in ReportRaw() 54 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &content)); in ReportRaw() 524 TemporaryFile tmp_file; in TEST_F() local 526 RecordCmd()->Run({"-p", pid, "-g", "-o", tmp_file.path, "sleep", SLEEP_SEC})); in TEST_F() 527 ReportRaw(tmp_file.path, {"-g"}); in TEST_F()
|
D | cmd_stat_test.cpp | 152 TemporaryFile tmp_file; in TEST() local 154 tmp_file.path, "sleep", "1"})); in TEST() 156 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST() 173 TemporaryFile tmp_file; in TEST() local 176 tmp_file.path, "sleep", "2"})); in TEST() 178 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST()
|
D | cmd_debug_unwind.cpp | 298 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); in JoinCallChains() local 299 if (!Workload::RunCmd({"mv", output_filename_, tmp_file->path})) { in JoinCallChains() 305 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file->path); in JoinCallChains()
|
D | cmd_trace_sched.cpp | 124 TemporaryFile tmp_file; in Run() local 126 if (!RecordSchedEvents(tmp_file.path)) { in Run() 129 record_file_ = tmp_file.path; in Run()
|
D | environment.cpp | 859 std::unique_ptr<TemporaryFile> tmp_file(new TemporaryFile(tmp_dir_)); in CreateTempFile() local 860 CHECK_NE(tmp_file->fd, -1) << "failed to create tmpfile under " << tmp_dir_; in CreateTempFile() 862 tmp_file->DoNotRemove(); in CreateTempFile() 863 files_to_delete_.push_back(tmp_file->path); in CreateTempFile() 865 return tmp_file; in CreateTempFile()
|
D | cmd_record.cpp | 1565 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); in PostUnwindRecords() local 1566 if (!Workload::RunCmd({"mv", record_filename_, tmp_file->path})) { in PostUnwindRecords() 1569 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(tmp_file->path); in PostUnwindRecords() 1597 std::unique_ptr<TemporaryFile> tmp_file = ScopedTempFiles::CreateTempFile(); in JoinCallChains() local 1598 if (!Workload::RunCmd({"mv", record_filename_, tmp_file->path})) { in JoinCallChains() 1604 std::unique_ptr<RecordFileReader> reader = RecordFileReader::CreateInstance(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 | 240 string tmp_file = proto_file + "_tmp"; in flush_proto_data() local 241 unique_fd fd(TEMP_FAILURE_RETRY(open(tmp_file.c_str(), in flush_proto_data() 246 PLOG(ERROR) << "Faied to open tmp file: " << tmp_file; in flush_proto_data() 261 PLOG(ERROR) << "Faied to write tmp file: " << tmp_file; in flush_proto_data() 284 PLOG(ERROR) << "Faied to write tmp file: " << tmp_file; in flush_proto_data() 290 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 | 163 char tmp_file[256]; in SetUp() local 165 memcpy(tmp_file, data_template, sizeof(data_template)); in SetUp() 166 int tombstone_fd = mkstemp(tmp_file); in SetUp() 169 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); in SetUp() 170 tombstone_fd = mkstemp(tmp_file); in SetUp() 175 if (unlink(tmp_file) == -1) { in SetUp()
|
/system/core/adb/ |
D | test_device.py | 930 with tempfile.NamedTemporaryFile() as tmp_file: 931 tmp_file.write(b'\0' * 1024 * 1024) 932 tmp_file.flush() 934 self.device.push(local=tmp_file.name, remote='/system/') 948 with tempfile.NamedTemporaryFile() as tmp_file: 949 tmp_file.write(b'\0' * 1024 * 1024) 950 tmp_file.flush() 955 self.device.push(local=tmp_file.name, remote=remote_path) 964 with tempfile.NamedTemporaryFile() as tmp_file: 965 tmp_file.write('\0' * 1024 * 1024) [all …]
|
/system/core/debuggerd/ |
D | debuggerd_test.cpp | 913 FILE* tmp_file = tmpfile(); in seccomp_fork_impl() local 914 if (!tmp_file) { in seccomp_fork_impl() 918 unique_fd tmp_fd(TEMP_FAILURE_RETRY(dup(fileno(tmp_file)))); in seccomp_fork_impl()
|
/system/incremental_delivery/incfs/tests/ |
D | incfs_test.cpp | 305 const TemporaryFile tmp_file; in TEST_F() local 306 auto control{createControl(tmp_file.fd, -1, -1)}; in TEST_F()
|