| /system/utest/fs/ |
| A D | test-clone.cpp | 31 int fd2; in TestCloneSimple() local 32 ASSERT_EQ(fdio_create_fd(handle, type, r, &fd2), ZX_OK); in TestCloneSimple() 46 ASSERT_EQ(read(fd2, input, sizeof(input)), sizeof(input)); in TestCloneSimple() 51 ASSERT_EQ(close(fd2), 0); in TestCloneSimple()
|
| A D | test-link.c | 56 int fd2 = open(newpath, O_RDONLY, 0644); in test_link_basic() local 57 ASSERT_GT(fd2, 0, ""); in test_link_basic() 58 ASSERT_TRUE(check_file_contents(fd2, buf, sizeof(buf)), ""); in test_link_basic() 63 ASSERT_EQ(close(fd2), 0, ""); in test_link_basic() 198 int fd2 = open("::dir_parent_alt/dir_semi_parent/dir_child_a", O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_count_rename() local 199 ASSERT_GT(fd2, 0, ""); in test_link_count_rename() 206 ASSERT_EQ(close(fd2), 0, ""); in test_link_count_rename() 252 int fd2 = open(newpath, O_RDWR, 0644); in test_link_between_dirs() local 253 ASSERT_GT(fd2, 0, ""); in test_link_between_dirs() 254 ASSERT_TRUE(check_file_contents(fd2, buf, sizeof(buf)), ""); in test_link_between_dirs() [all …]
|
| A D | test-unlink.cpp | 87 int fd2 = open(path, O_RDWR, 0644); in TestUnlinkOpenElsewhere() local 88 ASSERT_GT(fd2, 0); in TestUnlinkOpenElsewhere() 95 ASSERT_TRUE(simple_read_test(fd2, 0)); // It should contain the same data as before in TestUnlinkOpenElsewhere() 96 ASSERT_TRUE(simple_write_test(fd2, 1)); // It should still be writable in TestUnlinkOpenElsewhere() 97 ASSERT_EQ(close(fd2), 0); // This actually releases the file in TestUnlinkOpenElsewhere()
|
| A D | test-basic.c | 29 int fd2 = open("::alpha/bravo/charlie/delta/echo/foxtrot", O_RDWR, 0644); in test_basic() local 30 ASSERT_GT(fd2, 0, ""); in test_basic() 33 ASSERT_EQ(close(fd2), 0, ""); in test_basic()
|
| A D | test-truncate.cpp | 61 int fd2 = open(filename, O_RDWR | O_TRUNC, 0644); in TestTruncateSmall() local 62 ASSERT_GT(fd2, 0); in TestTruncateSmall() 86 ASSERT_EQ(close(fd2), 0); in TestTruncateSmall()
|
| A D | test-mmap.cpp | 193 int fd2 = open(kFilename, O_RDWR); in TestMmapShared() local 194 ASSERT_GT(fd2, 0); in TestMmapShared() 197 void* addr2 = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0); in TestMmapShared() 214 ASSERT_EQ(close(fd2), 0); in TestMmapShared()
|
| /system/utest/fs-host/ |
| A D | test-basic.cpp | 16 int fd2 = emu_open("::alpha/bravo/charlie/delta/echo/foxtrot", O_RDWR, 0644); in test_basic() local 17 ASSERT_GT(fd2, 0); in test_basic() 20 ASSERT_EQ(emu_close(fd2), 0); in test_basic()
|
| A D | test-truncate.cpp | 49 int fd2 = emu_open(filename, O_RDWR | O_TRUNC, 0644); in TestTruncateSmall() local 50 ASSERT_GT(fd2, 0); in TestTruncateSmall() 74 ASSERT_EQ(emu_close(fd2), 0); in TestTruncateSmall()
|
| /system/ulib/fdio/ |
| A D | stubs.c | 51 static int check2fds(int fd1, int fd2, int err) { in check2fds() argument 58 if ((io = fd_to_io(fd2)) == NULL) { in check2fds() 207 int linkat(int fd1, const char* existing, int fd2, const char* new, int flag) { in linkat() argument 208 return check2fds(fd1, fd2, ENOSYS); in linkat()
|
| /system/ulib/blktest/ |
| A D | blktest.cpp | 122 int fd2 = get_testdev("blkdev-test-B", PAGE_SIZE, 512); 128 ASSERT_EQ(write(fd2, buf, sizeof(buf)), (ssize_t) sizeof(buf), ""); 131 ASSERT_EQ(lseek(fd2, 0, SEEK_SET), 0, ""); 134 ASSERT_EQ(read(fd2, out, sizeof(buf)), (ssize_t) sizeof(buf), ""); 136 close(fd2);
|
| /system/utest/blobfs/ |
| A D | blobfs.cpp | 1395 fbl::unique_fd fd2(open(info->path, O_CREAT | O_RDWR)); in EarlyRead() local 1396 ASSERT_TRUE(fd2, "Failed to create blob"); in EarlyRead() 1399 ASSERT_TRUE(check_not_readable(fd2.get()), "Should not be readable after open"); in EarlyRead() 1402 ASSERT_TRUE(check_not_readable(fd2.get()), "Should not be readable after alloc"); in EarlyRead() 1409 ASSERT_TRUE(VerifyContents(fd2.get(), info->data.get(), info->size_data)); in EarlyRead() 1415 ASSERT_EQ(close(fd2.release()), 0); in EarlyRead()
|