Home
last modified time | relevance | path

Searched refs:AT_FDCWD (Results 1 - 25 of 223) sorted by relevance

123456789

/third_party/ltp/testcases/kernel/syscalls/utimensat/
H A Dutimensat01.c56 {AT_FDCWD, TEST_FILE, NULL, 0, O_RDONLY, 0, 0400, 0},
57 {AT_FDCWD, TEST_FILE, &tnn, 0, O_RDONLY, 0, 0400, 0},
58 {AT_FDCWD, TEST_FILE, &too, 0, O_RDONLY, 0, 0400, 0},
59 {AT_FDCWD, TEST_FILE, &tno, 0, O_RDONLY, 0, 0400, 0},
60 {AT_FDCWD, TEST_FILE, &ton, 0, O_RDONLY, 0, 0400, 0},
61 {AT_FDCWD, TEST_FILE, &t11, 0, O_RDONLY, 0, 0400, 0},
64 {AT_FDCWD, TEST_FILE, NULL, 0, O_RDONLY, 0, 0666, 0},
65 {AT_FDCWD, TEST_FILE, &tnn, 0, O_RDONLY, 0, 0666, 0},
66 {AT_FDCWD, TEST_FILE, &too, 0, O_RDONLY, 0, 0666, 0},
67 {AT_FDCWD, TEST_FIL
[all...]
/third_party/ltp/testcases/kernel/syscalls/name_to_handle_at/
H A Dname_to_handle_at02.c33 {"invalid-path", AT_FDCWD, &invalid_path, 0, &valid_fhp, &valid_mount_id, EFAULT},
34 {"invalid-file-handle", AT_FDCWD, &valid_path, 0, &invalid_fhp, &valid_mount_id, EFAULT},
35 {"zero-file-handle-size", AT_FDCWD, &valid_path, 0, &valid_fhp, &valid_mount_id, EOVERFLOW},
36 {"high-file-handle-size", AT_FDCWD, &valid_path, 0, &high_fhp, &valid_mount_id, EINVAL},
37 {"invalid-mount_id", AT_FDCWD, &valid_path, 0, &valid_fhp, &invalid_mount_id, EFAULT},
38 {"invalid-flags", AT_FDCWD, &valid_path, -1, &valid_fhp, &valid_mount_id, EINVAL},
39 {"empty-path", AT_FDCWD, &empty_path, 0, &valid_fhp, &valid_mount_id, ENOENT},
/third_party/ltp/testcases/kernel/syscalls/open_by_handle_at/
H A Dopen_by_handle_at02.c36 {"invalid-file-handle", AT_FDCWD, &invalid_fhp, O_RDWR, 0, EFAULT},
37 {"high-file-handle-size", AT_FDCWD, &high_fhp, O_RDWR, 0, EINVAL},
38 {"zero-file-handle-size", AT_FDCWD, &zero_fhp, O_RDWR, 0, EINVAL},
39 {"no-capability", AT_FDCWD, &valid_fhp, O_RDWR, 1, EPERM},
40 {"symlink", AT_FDCWD, &link_fhp, O_RDWR, 0, ELOOP},
53 valid_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
57 TEST(name_to_handle_at(AT_FDCWD, TEST_FILE, valid_fhp, &mount_id, 0)); in setup()
66 TEST(name_to_handle_at(AT_FDCWD, FOO_SYMLINK, link_fhp, &mount_id, 0)); in setup()
H A Dopen_by_handle_at01.c24 static int dir_fd, fd_atcwd = AT_FDCWD, file_fd;
60 f_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
61 d_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
62 at_fhp = allocate_file_handle(AT_FDCWD, TEST_FILE); in setup()
77 TEST(name_to_handle_at(AT_FDCWD, TEST_FILE, at_fhp, &mount_id, in setup()
/third_party/ltp/testcases/kernel/syscalls/openat2/
H A Dopenat203.c27 {"invalid-pathname", AT_FDCWD, NULL, O_RDONLY | O_CREAT, S_IRUSR, 0, &how, sizeof(*how), EFAULT},
28 {"invalid-flags", AT_FDCWD, TEST_FILE, O_RDONLY, S_IWUSR, 0, &how, sizeof(*how), EINVAL},
29 {"invalid-mode", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, -1, 0, &how, sizeof(*how), EINVAL},
30 {"invalid-resolve", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, -1, &how, sizeof(*how), EINVAL},
31 {"invalid-size-zero", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, 0, EINVAL},
32 {"invalid-size-small", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) - 1, EINVAL},
33 {"invalid-size-big", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, &how, sizeof(*how) + 1, EFAULT},
34 {"invalid-size-big-with-pad", AT_FDCWD, TEST_FILE, O_RDWR | O_CREAT, S_IRWXU, 0, (struct open_how **)&phow, sizeof(*how) + 8, E2BIG},
/third_party/musl/libc-test/src/functional/
H A Drenameat2_test.c120 if (renameat2(AT_FDCWD, g_oldPath, AT_FDCWD, g_newPath, RENAME_NOREPLACE) == -1) { in RenameNoReplaceTest()
133 if (renameat2(AT_FDCWD, g_oldPath, AT_FDCWD, g_newPath, RENAME_NOREPLACE) == 0) { in RenameNoReplaceTest()
170 if (renameat2(AT_FDCWD, g_oldPath, AT_FDCWD, g_newPath, RENAME_ZERO) == -1) { in ZeroTest()
183 if (renameat2(AT_FDCWD, g_oldPath, AT_FDCWD, g_newPath, RENAME_ZERO) == -1) { in ZeroTest()
209 if (renameat2(AT_FDCWD, g_oldPath, AT_FDCWD, g_newPat in RenameExchangeTest()
[all...]
/third_party/musl/src/stdio/
H A Drename.c10 return syscall(SYS_renameat, AT_FDCWD, old, AT_FDCWD, new); in rename()
12 return syscall(SYS_renameat2, AT_FDCWD, old, AT_FDCWD, new, 0); in rename()
H A Dremove.c11 int r = __syscall(SYS_unlinkat, AT_FDCWD, path, 0); in remove()
16 if (r==-EISDIR) r = __syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); in remove()
/third_party/ltp/testcases/kernel/syscalls/fanotify/
H A Dfanotify23.c71 FAN_ACCESS, AT_FDCWD, path); in verify_mark_removed()
101 AT_FDCWD, TEST_FILE); in test_fanotify()
104 AT_FDCWD, TEST_FILE); in test_fanotify()
108 AT_FDCWD, TEST_FILE); in test_fanotify()
120 AT_FDCWD, TEST_FILE); in test_fanotify()
128 FAN_ATTRIB, AT_FDCWD, MOUNT_PATH); in test_fanotify()
146 FAN_ATTRIB, AT_FDCWD, TEST_FILE); in test_fanotify()
H A Dfanotify04.c56 if (fanotify_mark(fd_notify, FAN_MARK_ADD | flag, FAN_OPEN, AT_FDCWD, in check_mark()
60 "AT_FDCWD, '%s') %s", fd_notify, flagstr, file, in check_mark()
65 "AT_FDCWD, '%s') %s", fd_notify, flagstr, file, in check_mark()
76 FAN_OPEN, AT_FDCWD, file); in check_mark()
180 SAFE_FANOTIFY_MARK(fd_notify, FAN_MARK_ADD, FAN_OPEN, AT_FDCWD, fname); in test01()
182 AT_FDCWD, dir); in test01()
187 SAFE_FANOTIFY_MARK(fd_notify, FAN_MARK_FLUSH, 0, AT_FDCWD, "."); in test01()
/third_party/ltp/testcases/kernel/syscalls/statx/
H A Dstatx03.c49 {.dfd = AT_FDCWD, .filename = &efault_fname, .flag = 0,
52 {.dfd = AT_FDCWD, .filename = &test_fname, .flag = -1,
55 {.dfd = AT_FDCWD, .filename = &test_fname, .flag = 0,
58 {.dfd = AT_FDCWD, .filename = &empty_fname, .flag = 0,
64 {.dfd = AT_FDCWD, .filename = &etoolong_fname, .flag = 0,
/third_party/musl/libc-test/src/functionalext/fortify/
H A Dfcntl_ext.c138 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in openat_0010()
165 openat(AT_FDCWD, "/proc/version", flags); in openat_0020()
199 openat(AT_FDCWD, "/proc/version", flags); in openat_0030()
220 int fd = openat(AT_FDCWD, "/proc/version", O_RDWR); in openat_0040()
331 int fd = openat64(AT_FDCWD, "/proc/version", O_RDWR | O_CREAT, FILE_MODE_ALL); in openat64_0010()
358 openat64(AT_FDCWD, "/proc/version", flags); in openat64_0020()
392 openat64(AT_FDCWD, "/proc/version", flags); in openat64_0030()
413 int fd = openat64(AT_FDCWD, "/proc/version", O_RDWR); in openat64_0040()
/third_party/ltp/testcases/kernel/syscalls/openat/
H A Dopenat02.c122 TEST(openat(AT_FDCWD, TEST_FILE, O_APPEND | O_RDWR, 0777)); in testfunc_append()
147 TEST(openat(AT_FDCWD, TEST_FILE, O_CLOEXEC | O_RDWR, 0777)); in testfunc_cloexec()
203 TEST(openat(AT_FDCWD, LARGE_FILE, O_LARGEFILE | O_RDONLY, 0777)); in testfunc_largefile()
232 TEST(openat(AT_FDCWD, TEST_FILE, O_NOATIME | O_RDONLY, 0777)); in testfunc_noatime()
253 TEST(openat(AT_FDCWD, SFILE, O_NOFOLLOW | O_RDONLY, 0777)); in testfunc_nofollow()
267 TEST(openat(AT_FDCWD, TEST_FILE, O_TRUNC | O_RDWR, 0777)); in testfunc_trunc()
H A Dopenat03.c52 int fd = openat(AT_FDCWD, ".", O_TMPFILE | O_RDWR, 0600); in setup()
66 int fd = openat(AT_FDCWD, ".", O_TMPFILE | O_RDWR, mode); in openat_tmp()
112 SAFE_LINKAT(cleanup, AT_FDCWD, path, AT_FDCWD, "tmpfile", in test01()
180 SAFE_LINKAT(cleanup, AT_FDCWD, path1, AT_FDCWD, path2, in link_tmp_file()
/third_party/ltp/testcases/kernel/syscalls/move_mount/
H A Dmove_mount02.c23 {"invalid-from-fd", &invalid_fd, "", AT_FDCWD, MNTPOINT, MOVE_MOUNT_F_EMPTY_PATH, EBADF},
24 {"invalid-from-path", &fsmfd, "invalid", AT_FDCWD, MNTPOINT, MOVE_MOUNT_F_EMPTY_PATH, ENOENT},
26 {"invalid-to-path", &fsmfd, "", AT_FDCWD, "invalid", MOVE_MOUNT_F_EMPTY_PATH, ENOENT},
27 {"invalid-flags", &fsmfd, "", AT_FDCWD, MNTPOINT, 0x08, EINVAL},
/third_party/toybox/porting/liteos_a/toys/posix/
H A Dcp.c112 int fdout = -1, cfd = try->parent ? try->parent->extra : AT_FDCWD, in cp_node()
214 fdout = AT_FDCWD; in cp_node()
232 fdout = AT_FDCWD; in cp_node()
292 if (fdout == AT_FDCWD) in cp_node()
308 if (fdout == AT_FDCWD) utimensat(cfd, catch, times, AT_SYMLINK_NOFOLLOW); in cp_node()
313 if (fdout != AT_FDCWD) { in cp_node()
422 ret = fstatat(AT_FDCWD, destname, &cst, 0); in cp_main()
508 if (mkpathat(AT_FDCWD, *ss, 0777, MKPATHAT_MKLAST | MKPATHAT_MAKE)) perror_msg_raw(*ss); in install_main()
519 if (mkpathat(AT_FDCWD, TT.destname, 0, MKPATHAT_MAKE)) in install_main()
/third_party/ltp/testcases/kernel/syscalls/fchmodat/
H A Dfchmodat01.c23 #ifndef AT_FDCWD
24 #define AT_FDCWD -100 macro
84 fds[5] = AT_FDCWD; in setup()
/third_party/ltp/testcases/kernel/syscalls/futimesat/
H A Dfutimesat01.c40 #ifndef AT_FDCWD
41 #define AT_FDCWD -100 macro
117 fds[4] = AT_FDCWD; in setup()
/third_party/musl/Benchmark/musl/
H A Dlibc_stat.cpp31 fd = fstatat(AT_FDCWD, "/dev/zero", &st, 0); in Bm_function_Fstatat_relativepath()
46 fd = fstatat(AT_FDCWD, DATA_ROOT"/data/local/tmp/passwd_link", &st, AT_SYMLINK_NOFOLLOW); in Bm_function_Fstatat_symbollink()
100 benchmark::DoNotOptimize(mkdirat(AT_FDCWD, DATA_ROOT"/data/data/test_mkdirat", in Bm_function_Mkdirat()
/third_party/musl/libc-test/src/functionalext/supplement/stat/stat_gtest/
H A Dstat_fstatat64_test.cpp28 EXPECT_EQ(0, fstatat64(AT_FDCWD, linkName, &st, AT_NO_AUTOMOUNT)); in HWTEST_F()
50 int ret = fstatat64(AT_FDCWD, linkName, &st, AT_SYMLINK_NOFOLLOW); in HWTEST_F()
73 int ret = fstatat64(AT_FDCWD, linkName, &st, AT_EMPTY_PATH); in HWTEST_F()
/third_party/toybox/toys/posix/
H A Dcp.c128 int fdout = -1, cfd = try->parent ? try->parent->extra : AT_FDCWD, in cp_node()
241 fdout = AT_FDCWD; in cp_node()
259 fdout = AT_FDCWD; in cp_node()
319 if (fdout == AT_FDCWD) in cp_node()
335 if (fdout == AT_FDCWD) utimensat(cfd, catch, times, AT_SYMLINK_NOFOLLOW); in cp_node()
340 if (fdout != AT_FDCWD) { in cp_node()
504 if (mkpathat(AT_FDCWD, *ss, 0777, MKPATHAT_MKLAST | MKPATHAT_MAKE)) perror_msg_raw(*ss); in install_main()
515 if (mkpathat(AT_FDCWD, TT.destname, 0, MKPATHAT_MAKE)) in install_main()
/third_party/musl/src/unistd/
H A Dlink.c10 return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0); in link()
/third_party/rust/crates/rustix/src/backend/linux_raw/fs/
H A Dsyscalls.rs38 __kernel_fsid_t, __kernel_timespec, open_how, statx, AT_EACCESS, AT_FDCWD, AT_REMOVEDIR,
131 raw_fd(AT_FDCWD),
467 raw_fd(AT_FDCWD),
484 raw_fd(AT_FDCWD), in stat_old()
496 raw_fd(AT_FDCWD), in stat_old()
580 raw_fd(AT_FDCWD),
597 raw_fd(AT_FDCWD), in lstat_old()
609 raw_fd(AT_FDCWD), in lstat_old()
764 raw_fd(AT_FDCWD),
865 raw_fd(AT_FDCWD),
[all...]
/third_party/ltp/testcases/kernel/syscalls/fstatat/
H A Dfstatat01.c41 #ifndef AT_FDCWD
42 #define AT_FDCWD -100 macro
134 fds[5] = AT_FDCWD; in setup()
/third_party/musl/libc-test/src/functionalext/supplement/stat/
H A Dfstatat.c28 * @tc.desc : The parameter fd is equal to AT_FDCWD, the flag is 0,
39 int ret = fstatat(AT_FDCWD, ptr, &st, 0); in fstatat_0100()
52 * @tc.desc : The parameter fd is equal to AT_FDCWD, the flag is AT_SYMLINK_NOFOLLOW,
66 int ret = fstatat(AT_FDCWD, softptr, &st, AT_SYMLINK_NOFOLLOW); in fstatat_0200()
107 * @tc.desc : The parameter fd is equal to AT_FDCWD, the flag is 0,
118 int ret = __fstatat_time64(AT_FDCWD, ptr, &st, 0); in fstatat_time64_0100()

Completed in 9 milliseconds

123456789