/system/extras/simpleperf/ |
D | cmd_kmem_test.cpp | 45 TemporaryFile tmp_file; in KmemReportRawFile() local 47 tmp_file.path}; in KmemReportRawFile() 50 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &result->content)); in KmemReportRawFile() 99 TemporaryFile tmp_file; in TEST() local 101 ASSERT_TRUE(RunKmemRecordCmd({"--slab"}, tmp_file.path)); in TEST() 103 KmemReportRawFile(tmp_file.path, {}, &result); in TEST() 109 TemporaryFile tmp_file; in TEST() local 111 ASSERT_TRUE(RunKmemRecordCmd({"--slab", "-g"}, tmp_file.path)); in TEST() 113 KmemReportRawFile(tmp_file.path, {"-g"}, &result); in TEST()
|
D | cmd_stat_test.cpp | 104 TemporaryFile tmp_file; in TEST() local 106 tmp_file.path, "sleep", "1"})); in TEST() 108 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST() 125 TemporaryFile tmp_file; in TEST() local 128 tmp_file.path, "sleep", "2"})); in TEST() 130 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &s)); in TEST()
|
D | gtest_main.cpp | 53 TemporaryFile tmp_file; in ExtractTestDataFromElfSection() local 54 if (!android::base::WriteStringToFile(content, tmp_file.path)) { in ExtractTestDataFromElfSection() 55 PLOG(ERROR) << "failed to write file " << tmp_file.path; in ExtractTestDataFromElfSection() 58 ArchiveHelper ahelper(tmp_file.fd, tmp_file.path); in ExtractTestDataFromElfSection() 60 LOG(ERROR) << "failed to open archive " << tmp_file.path; in ExtractTestDataFromElfSection()
|
D | read_elf_test.cpp | 143 TemporaryFile tmp_file; in TEST() local 144 ASSERT_EQ(ElfStatus::READ_FAILED, IsValidElfPath(tmp_file.path)); in TEST() 145 ASSERT_TRUE(android::base::WriteStringToFile("wrong format for elf", tmp_file.path)); in TEST() 146 ASSERT_EQ(ElfStatus::FILE_MALFORMED, IsValidElfPath(tmp_file.path)); in TEST()
|
D | cmd_report_test.cpp | 48 TemporaryFile tmp_file; in ReportRaw() local 50 "-i", perf_data, "--symfs", GetTestDataDir(), "-o", tmp_file.path}; in ReportRaw() 53 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &content)); in ReportRaw() 479 TemporaryFile tmp_file; in TEST_F() local 481 RecordCmd()->Run({"-p", pid, "-g", "-o", tmp_file.path, "sleep", SLEEP_SEC})); in TEST_F() 482 ReportRaw(tmp_file.path, {"-g"}); in TEST_F()
|
/system/core/libziparchive/ |
D | zip_archive_test.cc | 392 TemporaryFile tmp_file; in TEST() local 393 ASSERT_NE(-1, tmp_file.fd); in TEST() 394 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, kEmptyEntriesZip, sizeof(kEmptyEntriesZip))); in TEST() 397 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EmptyEntriesTest", &handle)); in TEST() 418 TemporaryFile tmp_file; in TEST() local 419 ASSERT_NE(-1, tmp_file.fd); in TEST() 420 ASSERT_TRUE(android::base::WriteFully(tmp_file.fd, reinterpret_cast<const uint8_t*>(kAbZip), in TEST() 423 ASSERT_EQ(0, OpenArchiveFd(tmp_file.fd, "EntryLargerThan32KTest", &handle)); in TEST() 462 TemporaryFile tmp_file; in TEST() local 463 ASSERT_NE(-1, tmp_file.fd); in TEST() [all …]
|
/system/core/debuggerd/libdebuggerd/test/ |
D | dump_memory_test.cpp | 111 char tmp_file[256]; in SetUp() local 113 memcpy(tmp_file, data_template, sizeof(data_template)); in SetUp() 114 int tombstone_fd = mkstemp(tmp_file); in SetUp() 117 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); in SetUp() 118 tombstone_fd = mkstemp(tmp_file); in SetUp() 123 if (unlink(tmp_file) == -1) { in SetUp()
|
D | tombstone_test.cpp | 54 char tmp_file[256]; in SetUp() local 56 memcpy(tmp_file, data_template, sizeof(data_template)); in SetUp() 57 int tombstone_fd = mkstemp(tmp_file); in SetUp() 60 memcpy(tmp_file, tmp_template, sizeof(tmp_template)); in SetUp() 61 tombstone_fd = mkstemp(tmp_file); in SetUp() 66 if (unlink(tmp_file) == -1) { in SetUp()
|
/system/core/adb/ |
D | test_device.py | 884 with tempfile.NamedTemporaryFile() as tmp_file: 885 tmp_file.write('\0' * 1024 * 1024) 886 tmp_file.flush() 888 self.device.push(local=tmp_file.name, remote='/system/')
|