/system/core/libcutils/tests/ |
H A D | android_get_control_file_test.cpp | 32 TemporaryFile tf; local 33 ASSERT_GE(tf.fd, 0); 36 key += tf.path; 41 EXPECT_EQ(android_get_control_file(tf.path), -1); 43 EXPECT_EQ(setenv(key.c_str(), android::base::StringPrintf("%d", tf.fd).c_str(), true), 0); 45 EXPECT_EQ(android_get_control_file(tf.path), tf.fd); 46 close(tf.fd); 47 EXPECT_EQ(android_get_control_file(tf.path), -1); 49 EXPECT_EQ(android_get_control_file(tf [all...] |
/system/core/debuggerd/libdebuggerd/test/ |
H A D | open_files_list_test.cpp | 33 TemporaryFile tf; local 42 if (file.first == tf.fd) { 43 EXPECT_EQ(file.second, std::string(tf.path));
|
/system/core/adb/sysdeps/ |
H A D | stat_test.cpp | 27 TemporaryFile tf; local 54 ASSERT_EQ(0, stat(tf.path, &st)); 58 ASSERT_EQ(-1, stat((std::string(tf.path) + '/').c_str(), &st)); 62 ASSERT_EQ(-1, stat((std::string(tf.path) + '\\').c_str(), &st));
|
/system/core/libunwindstack/tests/ |
H A D | DexFileTest.cpp | 46 TemporaryFile tf; local 47 ASSERT_TRUE(tf.fd != -1); 51 TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(art::DexFile::Header)) - 2))); 55 ASSERT_FALSE(dex_file.Open(0, tf.path)); 58 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); 60 tf.fd, kDexData, sizeof(art::DexFile::Header))))); 61 ASSERT_FALSE(dex_file.Open(0, tf.path)); 65 TemporaryFile tf; local 66 ASSERT_TRUE(tf.fd != -1); 69 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf 76 TemporaryFile tf; local 115 TemporaryFile tf; local 129 TemporaryFile tf; local 143 TemporaryFile tf; local 173 TemporaryFile tf; local [all...] |
H A D | MapsTest.cpp | 337 TemporaryFile tf; local 338 ASSERT_TRUE(tf.fd != -1); 344 tf.path, 0660, getuid(), getgid())); 346 FileMaps maps(tf.path); 379 TemporaryFile tf; local 380 ASSERT_TRUE(tf.fd != -1); 386 tf.path, 0660, getuid(), getgid())); 388 FileMaps maps(tf.path); 428 TemporaryFile tf; local 429 ASSERT_TRUE(tf 501 TemporaryFile tf; local 515 TemporaryFile tf; local [all...] |
H A D | ElfCacheTest.cpp | 41 void WriteElfFile(uint64_t offset, TemporaryFile* tf, uint32_t type) { argument 57 ASSERT_EQ(offset, static_cast<uint64_t>(lseek(tf->fd, offset, SEEK_SET))); 58 ASSERT_TRUE(android::base::WriteFully(tf->fd, ptr, ehdr_size)); 75 TemporaryFile tf; local 76 ASSERT_TRUE(tf.fd != -1); 77 WriteElfFile(0, &tf, EM_ARM); 78 close(tf.fd); 82 MapInfo info1(start, end, 0, 0x5, tf.path); 83 MapInfo info2(start, end, 0, 0x5, tf.path); 110 TemporaryFile tf; local 209 TemporaryFile tf; local [all...] |
/system/core/adb/ |
H A D | adb_io_test.cpp | 48 TemporaryFile tf; local 49 ASSERT_NE(-1, tf.fd); 51 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); 52 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); 56 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno); 62 TemporaryFile tf; local 63 ASSERT_NE(-1, tf.fd); 65 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); 66 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); 70 ASSERT_FALSE(ReadFdExactly(tf 76 TemporaryFile tf; local 93 TemporaryFile tf; local 108 TemporaryFile tf; local 134 TemporaryFile tf; local 147 TemporaryFile tf; local [all...] |
/system/core/base/ |
H A D | file_test.cpp | 38 TemporaryFile tf; local 39 ASSERT_TRUE(tf.fd != -1); 40 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) 43 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) 70 TemporaryFile tf; local 71 ASSERT_TRUE(tf.fd != -1); 72 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 0660, 76 ASSERT_EQ(0, stat(tf.path, &sb)); 81 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) 88 TemporaryFile tf; local 100 TemporaryFile tf; local 119 TemporaryFile tf; local 219 TemporaryFile tf; local 246 TemporaryFile tf; local [all...] |
/system/core/init/ |
H A D | persistent_properties_test.cpp | 70 TemporaryFile tf; local 71 ASSERT_TRUE(tf.fd != -1); 72 persistent_property_filename = tf.path; 93 TemporaryFile tf; local 94 ASSERT_TRUE(tf.fd != -1); 95 persistent_property_filename = tf.path; 114 TemporaryFile tf; local 115 ASSERT_TRUE(tf.fd != -1); 116 persistent_property_filename = tf.path; 136 TemporaryFile tf; local [all...] |
H A D | util_test.cpp | 42 TemporaryFile tf; local 43 ASSERT_TRUE(tf.fd != -1); 44 EXPECT_TRUE(WriteFile(tf.path, s)) << strerror(errno); 45 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno); 46 auto file_contents = ReadFile(tf.path); 53 TemporaryFile tf; local 54 ASSERT_TRUE(tf.fd != -1); 55 EXPECT_TRUE(WriteFile(tf.path, s)) << strerror(errno); 56 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno); 57 auto file_contents = ReadFile(tf 87 TemporaryFile tf; local 114 TemporaryFile tf; local 143 TemporaryFile tf; local [all...] |
H A D | init_test.cpp | 63 TemporaryFile tf; local 64 ASSERT_TRUE(tf.fd != -1); 65 ASSERT_TRUE(android::base::WriteStringToFd(init_script, tf.fd)); 66 TestInit(tf.path, test_function_map, commands, service_list);
|
/system/extras/libperfmgr/tests/ |
H A D | NodeLooperThreadTest.cc | 37 std::unique_ptr<TemporaryFile> tf = std::make_unique<TemporaryFile>(); local 39 new Node("n0", tf->path, 41 files_.emplace_back(std::move(tf)); 42 tf = std::make_unique<TemporaryFile>(); 44 new Node("n1", tf->path, 46 files_.emplace_back(std::move(tf));
|
H A D | NodeTest.cc | 45 TemporaryFile tf; local 46 Node t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, false); 47 _VerifyPathValue(tf.path, ""); 52 TemporaryFile tf; local 53 Node t("t", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, true); 54 _VerifyPathValue(tf.path, "value1"); 62 TemporaryFile tf; local 63 Node t("test_dump", tf.path, {{"value0"}, {"value1"}, {"value2"}}, 1, true); 68 android::base::StringPrintf("test_dump\t%s\t1\tvalue1\n", tf.path)); 74 TemporaryFile tf; local 86 TemporaryFile tf; local 128 TemporaryFile tf; local 158 TemporaryFile tf; local 188 TemporaryFile tf; local [all...] |
H A D | HintManagerTest.cc | 106 std::unique_ptr<TemporaryFile> tf = std::make_unique<TemporaryFile>(); local 108 new Node("n0", tf->path, 110 files_.emplace_back(std::move(tf)); 111 tf = std::make_unique<TemporaryFile>(); 113 new Node("n1", tf->path, 115 files_.emplace_back(std::move(tf));
|
/system/extras/verity/ |
H A D | verity_verifier.cpp | 95 TemporaryFile tf; local 96 if (sparse_file_write(file, tf.fd, false, false, false) < 0) { 103 fec::io input(tf.path);
|
/system/tpm/trunks/ftdi/ |
H A D | mpsse.c | 234 void EnableBitmode(struct mpsse_context* mpsse, int tf) { argument 236 if (tf) { 584 * @tf - Set to 1 to enable flushing, or 0 to disable flushing. 588 void FlushAfterRead(struct mpsse_context* mpsse, int tf) { argument 589 mpsse->flush_after_read = tf;
|