Home
last modified time | relevance | path

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

/system/extras/simpleperf/
Dcmd_kmem_test.cpp45 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()
Dcmd_stat_test.cpp104 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()
Dgtest_main.cpp53 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()
Dread_elf_test.cpp143 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()
Dcmd_report_test.cpp48 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/
Dzip_archive_test.cc392 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/
Ddump_memory_test.cpp111 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()
Dtombstone_test.cpp54 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/
Dtest_device.py884 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/')