Home
last modified time | relevance | path

Searched refs:tf (Results 1 – 11 of 11) sorted by relevance

/system/core/adb/
Dadb_io_test.cpp48 TemporaryFile tf; in POSIX_TEST() local
49 ASSERT_NE(-1, tf.fd); in POSIX_TEST()
51 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
52 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); in POSIX_TEST()
56 ASSERT_TRUE(ReadFdExactly(tf.fd, buf, sizeof(buf) - 1)) << strerror(errno); in POSIX_TEST()
62 TemporaryFile tf; in POSIX_TEST() local
63 ASSERT_NE(-1, tf.fd); in POSIX_TEST()
65 ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); in POSIX_TEST()
66 ASSERT_EQ(0, lseek(tf.fd, 0, SEEK_SET)); in POSIX_TEST()
70 ASSERT_FALSE(ReadFdExactly(tf.fd, buf, sizeof(buf))); in POSIX_TEST()
[all …]
Dtest_device.py582 tf = tempfile.NamedTemporaryFile('wb', suffix=file_suffix,
584 tf.close()
588 output = self.device.install(tf.name)
593 os.remove(tf.name)
1173 tf = tempfile.NamedTemporaryFile('wb', suffix=name, delete=False)
1174 tf.close()
1175 self.device.push(tf.name, remote_path)
1176 os.remove(tf.name)
1177 self.assertFalse(os.path.exists(tf.name))
1185 self.device.pull(remote_path, tf.name)
[all …]
/system/core/base/
Dfile_test.cpp38 TemporaryFile tf; in TEST() local
39 ASSERT_TRUE(tf.fd != -1); in TEST()
40 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path)) in TEST()
43 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
70 TemporaryFile tf; in TEST() local
71 ASSERT_TRUE(tf.fd != -1); in TEST()
72 ASSERT_TRUE(android::base::WriteStringToFile("abc", tf.path, 0660, in TEST()
76 ASSERT_EQ(0, stat(tf.path, &sb)); in TEST()
81 ASSERT_TRUE(android::base::ReadFileToString(tf.path, &s)) in TEST()
88 TemporaryFile tf; in TEST() local
[all …]
/system/core/libcutils/tests/
Dandroid_get_control_file_test.cpp32 TemporaryFile tf; in TEST() local
33 ASSERT_GE(tf.fd, 0); in TEST()
36 key += tf.path; in TEST()
41 EXPECT_EQ(android_get_control_file(tf.path), -1); in TEST()
43 EXPECT_EQ(setenv(key.c_str(), android::base::StringPrintf("%d", tf.fd).c_str(), true), 0); in TEST()
45 EXPECT_EQ(android_get_control_file(tf.path), tf.fd); in TEST()
46 close(tf.fd); in TEST()
47 EXPECT_EQ(android_get_control_file(tf.path), -1); in TEST()
49 EXPECT_EQ(android_get_control_file(tf.path), -1); in TEST()
/system/core/init/
Dutil_test.cpp37 TemporaryFile tf; in TEST() local
38 ASSERT_TRUE(tf.fd != -1); in TEST()
39 EXPECT_TRUE(write_file(tf.path, s)) << strerror(errno); in TEST()
40 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0620, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
41 EXPECT_FALSE(read_file(tf.path, &s)) << strerror(errno); in TEST()
47 TemporaryFile tf; in TEST() local
48 ASSERT_TRUE(tf.fd != -1); in TEST()
49 EXPECT_TRUE(write_file(tf.path, s.c_str())) << strerror(errno); in TEST()
50 EXPECT_NE(-1, fchmodat(AT_FDCWD, tf.path, 0602, AT_SYMLINK_NOFOLLOW)) << strerror(errno); in TEST()
51 EXPECT_FALSE(read_file(tf.path, &s)) << strerror(errno); in TEST()
[all …]
Dcompare-bootcharts.py80 with tarfile.open(pathname + '/bootchart.tgz', 'r:*') as tf:
83 f = tf.extractfile('proc_ps.log')
/system/core/debuggerd/libdebuggerd/test/
Dopen_files_list_test.cpp33 TemporaryFile tf; in TEST() local
42 if (file.first == tf.fd) { in TEST()
43 EXPECT_EQ(file.second, std::string(tf.path)); in TEST()
/system/core/adb/sysdeps/
Dstat_test.cpp27 TemporaryFile tf; in TEST() local
54 ASSERT_EQ(0, stat(tf.path, &st)); in TEST()
58 ASSERT_EQ(-1, stat((std::string(tf.path) + '/').c_str(), &st)); in TEST()
62 ASSERT_EQ(-1, stat((std::string(tf.path) + '\\').c_str(), &st)); in TEST()
/system/extras/verity/
Dverity_verifier.cpp95 TemporaryFile tf; in main() local
96 if (sparse_file_write(file, tf.fd, false, false, false) < 0) { in main()
103 fec::io input(tf.path); in main()
/system/tpm/trunks/ftdi/
Dmpsse.h199 void EnableBitmode(struct mpsse_context* mpsse, int tf);
214 void FlushAfterRead(struct mpsse_context* mpsse, int tf);
Dmpsse.c234 void EnableBitmode(struct mpsse_context* mpsse, int tf) { in EnableBitmode() argument
236 if (tf) { in EnableBitmode()
588 void FlushAfterRead(struct mpsse_context* mpsse, int tf) { in FlushAfterRead() argument
589 mpsse->flush_after_read = tf; in FlushAfterRead()