Lines Matching refs:file

29   explicit FileUnmapper(T& file) : file_(file) {  in FileUnmapper()  argument
39 void FindAndCheckPasswdEntry(PasswdFile* file, const char* name, uid_t uid, gid_t gid, in FindAndCheckPasswdEntry() argument
42 ASSERT_TRUE(file->FindByName(name, &name_passwd_state)) << name; in FindAndCheckPasswdEntry()
54 ASSERT_TRUE(file->FindById(uid, &id_passwd_state)) << uid; in FindAndCheckPasswdEntry()
66 void FindAndCheckGroupEntry(GroupFile* file, const char* name, gid_t gid) { in FindAndCheckGroupEntry() argument
68 ASSERT_TRUE(file->FindByName(name, &name_group_state)) << name; in FindAndCheckGroupEntry()
78 ASSERT_TRUE(file->FindById(gid, &id_group_state)) << gid; in FindAndCheckGroupEntry()
92 TemporaryFile file; in TEST() local
93 ASSERT_NE(-1, file.fd); in TEST()
95 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
97 PasswdFile passwd_file(file.path, nullptr); in TEST()
112 TemporaryFile file; in TEST() local
113 ASSERT_NE(-1, file.fd); in TEST()
115 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
117 GroupFile group_file(file.path, nullptr); in TEST()
132 TemporaryFile file; in TEST() local
133 ASSERT_NE(-1, file.fd); in TEST()
151 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
153 PasswdFile passwd_file(file.path, nullptr); in TEST()
170 TemporaryFile file; in TEST() local
171 ASSERT_NE(-1, file.fd); in TEST()
187 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
189 GroupFile group_file(file.path, nullptr); in TEST()
206 TemporaryFile file; in TEST() local
207 ASSERT_NE(-1, file.fd); in TEST()
211 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
213 PasswdFile passwd_file(file.path, "vendor_"); in TEST()
228 TemporaryFile file; in TEST() local
229 ASSERT_NE(-1, file.fd); in TEST()
233 write(file.fd, test_string, sizeof(test_string) - 1); in TEST()
235 GroupFile group_file(file.path, "vendor_"); in TEST()