Home
last modified time | relevance | path

Searched refs:open (Results 1 – 25 of 209) sorted by relevance

123456789

/system/utest/fs/
A Dtest-access.cpp29 int fd = open(filename, O_RDWR | O_CREAT, 0644); in TestAccessReadable()
36 fd = open(filename, O_RDONLY, 0644); in TestAccessReadable()
65 int fd = open(filename, O_RDWR | O_CREAT, 0644); in TestAccessWritable()
72 fd = open(filename, O_WRONLY, 0644); in TestAccessWritable()
117 int fd = open(filename, O_RDWR, 0644); in TestAccessDirectory()
120 fd = open(filename, O_WRONLY, 0644); in TestAccessDirectory()
125 fd = open(filename, O_RDONLY, 0644); in TestAccessDirectory()
143 fd = open(filename, O_CREAT | O_RDWR | O_PATH); in TestAccessOpath()
149 fd = open(filename, O_CREAT | O_RDWR); in TestAccessOpath()
155 fd = open(filename, O_RDWR | O_PATH); in TestAccessOpath()
[all …]
A Dtest-basic.c27 int fd1 = open("::alpha/bravo/charlie/delta/echo/foxtrot", O_RDWR | O_CREAT, 0644); in test_basic()
29 int fd2 = open("::alpha/bravo/charlie/delta/echo/foxtrot", O_RDWR, 0644); in test_basic()
38 fd1 = open("::alpha/bravo/charlie/delta/echo/foxtrot", O_RDONLY | O_PIPELINE, 0644); in test_basic()
45 fd1 = open("::alpha/banana", O_RDONLY | O_PIPELINE, 0644); in test_basic()
50 fd1 = open("::file.txt", O_CREAT | O_RDWR, 0644); in test_basic()
56 fd1 = open("::emptydir", O_RDONLY, 0644); in test_basic()
77 int fd = open("::foobar", O_CREAT | O_RDWR); in test_unclean_close()
A Dtest-unlink.cpp26 int fd = open(paths[i], O_RDWR | O_CREAT | O_EXCL, 0644); in TestUnlinkSimple()
64 int fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644); in TestUnlinkUseAfterwards()
76 ASSERT_EQ(open(path, O_RDWR, 0644), -1); in TestUnlinkUseAfterwards()
85 int fd1 = open(path, O_RDWR | O_CREAT | O_EXCL, 0644); in TestUnlinkOpenElsewhere()
87 int fd2 = open(path, O_RDWR, 0644); in TestUnlinkOpenElsewhere()
100 ASSERT_EQ(open(path, O_RDWR, 0644), -1); in TestUnlinkOpenElsewhere()
110 int fd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0644); in test_remove()
A Dtest-link.c41 int fd = open(oldpath, O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_basic()
56 int fd2 = open(newpath, O_RDONLY, 0644); in test_link_basic()
69 fd = open(newpath, O_RDONLY, 0644); in test_link_basic()
93 int fd = open("::dira/file", O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_count_dirs()
194 int fd = open("::dir/dir_child", O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_count_rename()
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()
240 int fd = open(oldpath, O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_between_dirs()
252 int fd2 = open(newpath, O_RDWR, 0644); in test_link_between_dirs()
263 fd = open(newpath, O_RDWR, 0644); in test_link_between_dirs()
296 int fd = open(oldpath, O_RDWR | O_CREAT | O_EXCL, 0644); in test_link_errors()
A Dtest-directory.cpp38 int fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryFilenameMax()
45 ASSERT_EQ(open(path, O_RDWR | O_CREAT | O_EXCL, 0644), -1); in TestDirectoryFilenameMax()
66 int fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryLarge()
95 int fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryMax()
178 int dirfd = open("::coalesce_lr", O_RDONLY | O_DIRECTORY); in TestDirectoryCoalesceLargeRecord()
203 dirfd = open("::coalesce_lr", O_RDONLY | O_DIRECTORY); in TestDirectoryCoalesceLargeRecord()
240 int fd = open("::a", O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryTrailingSlash()
246 fd = open("::a", O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryTrailingSlash()
249 ASSERT_EQ(open("::a/", O_RDWR, 0644), -1); in TestDirectoryTrailingSlash()
280 fd = open("::a/file2", O_RDWR | O_CREAT | O_EXCL, 0644); in TestDirectoryReaddir()
[all …]
A Dtest-rename.c35 int fd = open("::bravo", O_RDWR | O_CREAT | O_EXCL, 0644); in test_rename_basic()
48 fd = open("::alpha/charlie", O_RDWR | O_CREAT | O_EXCL, 0644); in test_rename_basic()
60 fd = open("::alpha/charlie", O_RDWR | O_CREAT | O_EXCL, 0644); in test_rename_basic()
99 int fd = open("::dir_before_move/file", O_RDWR | O_CREAT, 0644); in test_rename_with_children()
126 fd = open("::dir/file", O_RDONLY, 06444); in test_rename_with_children()
195 int foofd = open("::foo", O_RDONLY | O_DIRECTORY, 0644); in test_rename_at()
197 int barfd = open("::bar", O_RDONLY | O_DIRECTORY, 0644); in test_rename_at()
A Dtest-mmap.cpp35 int fd = open(kFilename, O_RDWR | O_CREAT | O_EXCL); in TestMmapEmpty()
59 int fd = open(kFilename, O_RDWR | O_CREAT | O_EXCL); in TestMmapReadable()
95 int fd = open(kFilename, O_RDWR | O_CREAT | O_EXCL); in TestMmapWritable()
193 int fd2 = open(kFilename, O_RDWR); in TestMmapShared()
218 fd = open(kFilename, O_RDONLY); in TestMmapShared()
295 int fd = open("::mydir", O_RDONLY | O_DIRECTORY); in TestMmapEvil()
303 fd = open("::myfile", O_RDWR | O_CREAT | O_EXCL); in TestMmapEvil()
325 fd = open("::myfile", O_WRONLY); in TestMmapEvil()
349 fd = open("::myfile", O_RDONLY); in TestMmapEvil()
359 fd = open("::myfile", O_RDONLY | O_APPEND); in TestMmapEvil()
[all …]
A Dtest-sync.c21 int fd = open("::alpha", O_RDWR | O_CREAT | O_EXCL, 0644); in test_sync()
32 fd = open("::dirname", O_RDONLY | O_DIRECTORY, 0644); in test_sync()
A Dtest-truncate.cpp30 int fd = open(filename, O_RDWR, 0644); in check_file_contains()
55 int fd = open(filename, O_RDWR | O_CREAT, 0644); in TestTruncateSmall()
61 int fd2 = open(filename, O_RDWR | O_TRUNC, 0644); in TestTruncateSmall()
129 int fd = open(filename, O_RDWR, 0644); in checked_truncate()
137 fd = open(filename, O_RDWR, 0644); in checked_truncate()
147 fd = open(filename, O_RDWR, 0644); in checked_truncate()
203 int fd = open(filename, O_RDWR | O_CREAT, 0644); in TestTruncateLarge()
269 int fd = open("::truncate-sparse", O_CREAT | O_RDWR); in TestTruncatePartialBlockSparse()
292 int fd = open("::truncate_errno", O_RDWR | O_CREAT | O_EXCL); in TestTruncateErrno()
A Dtest-minfs.cpp35 fbl::unique_fd fd(open(kMountPath, O_RDONLY | O_DIRECTORY)); in QueryInfo()
107 int fd = open(path, O_CREAT | O_RDWR); in TestQueryInfo()
122 fbl::unique_fd fd(open(kMountPath, O_RDONLY | O_DIRECTORY)); in ToggleMetrics()
133 fbl::unique_fd fd(open(kMountPath, O_RDONLY | O_DIRECTORY)); in GetMetricsUnavailable()
171 fbl::unique_fd fd(open(path, O_CREAT | O_RDWR)); in TestMetrics()
177 fd.reset(open(path, O_CREAT | O_RDWR | O_EXCL)); in TestMetrics()
266 fbl::unique_fd mnt_fd(open(kMountPath, O_RDONLY)); in TestFullOperations()
319 mnt_fd.reset(open(kMountPath, O_RDONLY)); in TestFullOperations()
384 mnt_fd.reset(open(kMountPath, O_RDONLY)); in TestFullOperations()
427 mnt_fd.reset(open(kMountPath, O_RDONLY)); in TestFullOperations()
[all …]
A Dtest-maxfile.cpp46 int fd = open("::bigfile", O_CREAT | O_RDWR, 0644); in test_maxfile()
106 fd = open("::bigfile", O_RDWR, 0644); in test_maxfile()
147 int fda = open("::bigfile-A", O_CREAT | O_RDWR, 0644); in TestZippedMaxfiles()
148 int fdb = open("::bigfile-B", O_CREAT | O_RDWR, 0644); in TestZippedMaxfiles()
202 fda = open("::bigfile-A", O_RDWR, 0644); in TestZippedMaxfiles()
203 fdb = open("::bigfile-B", O_RDWR, 0644); in TestZippedMaxfiles()
A Dtest-sparse.cpp25 int fd = open("::my_file", O_RDWR | O_CREAT, 0644); in test_sparse()
43 fd = open("::my_file", O_RDWR, 0644); in test_sparse()
82 fbl::unique_fd sparse_fd(open("::sparse_file", O_RDWR | O_CREAT, 0644)); in TestSparseAllocation()
96 fbl::unique_fd fd(open(filename, O_RDWR | O_CREAT, 0644)); in TestSparseAllocation()
/system/utest/fs-management/
A Dfs-management.cpp84 int fd = open(ramdisk_path, O_RDWR); in MountUnmountShared()
116 int fd = open(ramdisk_path, O_RDWR); in MountMkdirUnmount()
139 int fd = open(ramdisk_path, O_RDWR); in FmountFunmount()
168 int fd = open(ramdisk_path, O_RDWR); in DoMountEvil()
184 fd = open(ramdisk_path, O_RDWR); in DoMountEvil()
199 fd = open(ramdisk_path, O_RDWR); in DoMountEvil()
211 fd = open(ramdisk_path, O_RDWR); in DoMountEvil()
218 fd = open(ramdisk_path, O_RDWR); in DoMountEvil()
305 int fd = open(ramdisk_path, O_RDWR); in UmountTestEvil()
370 fd = open(ramdisk_path2, O_RDWR); in DoubleMountRoot()
[all …]
/system/utest/fit/
A Dresult_examples.cpp28 fit::result<> open(std::string secret) { in open() function
39 return open("friend") || open("sesame") || open("I give up"); in guess_combination()
/system/utest/blobfs/
A Dblobfs.cpp771 fd.reset(open(info->path, O_RDONLY)); in TestNullBlob()
1271 fd.reset(open(info->path, O_RDONLY)); in UmountWithOpenFile()
1296 fd.reset(open(info->path, O_RDONLY)); in UmountWithMappedFile()
1322 fd.reset(open(info->path, O_RDONLY)); in UmountWithOpenMappedFile()
1889 fd.reset(open(info->path, O_RDONLY)); in TestHugeBlobRandom()
1897 fd.reset(open(info->path, O_RDWR)); in TestHugeBlobRandom()
1899 fd.reset(open(info->path, O_WRONLY)); in TestHugeBlobRandom()
1904 fd.reset(open(info->path, O_RDONLY)); in TestHugeBlobRandom()
1930 fd.reset(open(info->path, O_RDONLY)); in TestHugeBlobCompressible()
1938 fd.reset(open(info->path, O_RDWR)); in TestHugeBlobCompressible()
[all …]
/system/dev/serial/serial/
A Dserial.c26 bool open; member
148 port->open = false; in platform_serial_thread()
201 if (port->open) { in serial_port_open_socket()
234 port->open = true; in serial_port_open_socket()
256 if (port->open) { in serial_open()
266 port->open = true; in serial_open()
278 if (port->open) { in serial_close()
281 port->open = false; in serial_close()
295 if (!port->open) { in serial_read()
306 if (!port->open) { in serial_write()
[all …]
/system/utest/fs-test-utils/
A Dfixture_test.cpp23 fbl::unique_fd fd(open(block_device_path.c_str(), O_RDONLY)); in GetBlockDeviceInfo()
186 fbl::unique_fd blk_fd(open(fixture.GetFsBlockDevice().c_str(), O_RDONLY)); in DiskIsFormattedCorrectlyNoFvm()
205 fbl::unique_fd blk_fd(open(fixture.GetFsBlockDevice().c_str(), O_RDONLY)); in DiskAndFvmAreFormattedCorrectly()
253 fbl::unique_fd blk_fd(open(fixture.block_device_path().c_str(), O_RDONLY)); in UseBlockDeviceIsOk()
259 blk_fd.reset(open(fixture.block_device_path().c_str(), O_RDONLY)); in UseBlockDeviceIsOk()
265 blk_fd.reset(open(fixture.block_device_path().c_str(), O_RDONLY)); in UseBlockDeviceIsOk()
307 blk_fd.reset(open(fixture.block_device_path().c_str(), O_RDONLY)); in UseBlockDeviceWithFvmIsOk()
312 blk_fd.reset(open(fixture.GetFsBlockDevice().c_str(), O_RDONLY)); in UseBlockDeviceWithFvmIsOk()
318 blk_fd.reset(open(fixture.block_device_path().c_str(), O_RDONLY)); in UseBlockDeviceWithFvmIsOk()
361 block_fd.reset(open(fixture.block_device_path().c_str(), O_RDONLY)); in SkipFormatIsOk()
[all …]
A Dunittest_test.cpp40 fbl::unique_fd fs_path_fd(open(fixture->fs_path().c_str(), O_RDONLY | O_DIRECTORY)); in VerifyRamdiskAndFvmExist()
43 fbl::unique_fd block_fd(open(fixture->block_device_path().c_str(), O_RDONLY)); in VerifyRamdiskAndFvmExist()
48 fbl::unique_fd fs_fd(open(fixture->partition_path().c_str(), O_RDONLY)); in VerifyRamdiskAndFvmExist()
/system/utest/devfs/
A Dfdio-tests.cpp21 fbl::unique_fd fd(open("/dev/zero", O_RDONLY)); in TestDeviceClone()
37 fbl::unique_fd fd(open("/dev/zero", O_RDONLY)); in TestDeviceTransfer()
/system/utest/sysinfo/
A Dmain.cpp22 int fd = open(SYSINFO_PATH, O_RDWR); in get_root_resource_succeeds()
53 int fd = open(SYSINFO_PATH, O_RDWR); in get_board_name_succeeds()
78 int fd = open(SYSINFO_PATH, O_RDWR); in get_interrupt_controller_info_succeeds()
/system/banjo/ddk-protocol-bt-hci/
A Dbt-hci.banjo13 /// is already open.
16 /// Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
24 /// Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
/system/utest/memfs/
A Dfidl-tests.cpp36 fbl::unique_fd fd(open("/fidltmp", O_DIRECTORY | O_RDONLY)); in TestFidlBasic()
72 fbl::unique_fd fd(open("/fidltmp-ro", O_DIRECTORY | O_RDONLY)); in TestFidlOpenReadOnly()
101 fbl::unique_fd fd(open(path, O_RDONLY | O_DIRECTORY)); in QueryInfo()
127 fbl::unique_fd fd(open("/fidltmp-basic", O_DIRECTORY | O_RDONLY)); in TestFidlQueryFilesystem()
149 fbl::unique_fd fd(open("/fidltmp-limited", O_DIRECTORY | O_RDONLY)); in TestFidlQueryFilesystem()
/system/uapp/storage-metrics/
A Dmain.cpp106 fbl::unique_fd fd(open(path, O_RDONLY | O_DIRECTORY)); in EnableFsMetrics()
125 fbl::unique_fd fd(open(path, O_RDONLY | O_DIRECTORY)); in GetFsMetrics()
161 fbl::unique_fd fd(open(dev, O_RDONLY)); in GetBlockMetrics()
201 fbl::unique_fd fd(open(path.c_str(), O_RDONLY | O_ADMIN)); in RunFsMetrics()
203 fd.reset(open(path.c_str(), O_RDONLY)); in RunFsMetrics()
264 fbl::unique_fd fd(open(path.c_str(), O_RDONLY | O_ADMIN)); in RunBlockMetrics()
266 fd.reset(open(path.c_str(), O_RDONLY)); in RunBlockMetrics()
/system/utest/fs-host/
A Dutil.cpp17 int r = open(MOUNT_PATH, O_RDWR | O_CREAT | O_EXCL, 0755); in setup_fs_test()
52 fbl::unique_fd disk(open(MOUNT_PATH, O_RDONLY)); in run_fsck()
/system/ulib/fs-management/
A Dramdisk.cpp102 int fd = open(RAMCTL_PATH, O_RDWR); in open_ramctl()
181 fbl::unique_fd fd(open(ramdisk_path, O_RDWR)); in sleep_ramdisk()
196 fbl::unique_fd fd(open(ramdisk_path, O_RDWR)); in wake_ramdisk()
212 fbl::unique_fd fd(open(ramdisk_path, O_RDWR)); in get_ramdisk_blocks()
226 fbl::unique_fd ramdisk(open(ramdisk_path, O_RDWR)); in destroy_ramdisk()

Completed in 37 milliseconds

123456789