Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 1591) sorted by relevance

12345678910>>...64

/linux/tools/testing/selftests/memfd/
H A Dmemfd_test.c66 static ssize_t fd2name(int fd, char *buf, size_t bufsize) in fd2name() argument
72 size = snprintf(buf1, PATH_MAX, "/proc/self/fd/%d", fd); in fd2name()
74 printf("snprintf(%d) failed on %m\n", fd); in fd2name()
92 int r, fd; in mfd_assert_new() local
94 fd = sys_memfd_create(name, flags); in mfd_assert_new()
95 if (fd < 0) { in mfd_assert_new()
101 r = ftruncate(fd, sz); in mfd_assert_new()
107 return fd; in mfd_assert_new()
112 int fd in sysctl_assert_write() local
127 int fd = open("/proc/sys/vm/memfd_noexec", O_WRONLY | O_CLOEXEC); sysctl_fail_write() local
144 int fd = open("/proc/sys/vm/memfd_noexec", O_RDONLY | O_CLOEXEC); sysctl_assert_equal() local
170 int fd; mfd_assert_reopen_fd() local
197 mfd_assert_get_seals(int fd) mfd_assert_get_seals() argument
210 mfd_assert_has_seals(int fd,unsigned int seals) mfd_assert_has_seals() argument
223 mfd_assert_add_seals(int fd,unsigned int seals) mfd_assert_add_seals() argument
236 mfd_fail_add_seals(int fd,unsigned int seals) mfd_fail_add_seals() argument
255 mfd_assert_size(int fd,size_t size) mfd_assert_size() argument
271 mfd_assert_dup(int fd) mfd_assert_dup() argument
284 mfd_assert_mmap_shared(int fd) mfd_assert_mmap_shared() argument
302 mfd_assert_mmap_read_shared(int fd) mfd_assert_mmap_read_shared() argument
320 mfd_assert_mmap_private(int fd) mfd_assert_mmap_private() argument
338 mfd_assert_open(int fd,int flags,mode_t mode) mfd_assert_open() argument
353 mfd_fail_open(int fd,int flags,mode_t mode) mfd_fail_open() argument
366 mfd_assert_read(int fd) mfd_assert_read() argument
406 mfd_assert_read_shared(int fd) mfd_assert_read_shared() argument
424 mfd_assert_fork_private_write(int fd) mfd_assert_fork_private_write() argument
458 mfd_assert_write(int fd) mfd_assert_write() argument
538 mfd_fail_write(int fd) mfd_fail_write() argument
603 mfd_assert_shrink(int fd) mfd_assert_shrink() argument
623 mfd_fail_shrink(int fd) mfd_fail_shrink() argument
638 mfd_assert_grow(int fd) mfd_assert_grow() argument
662 mfd_fail_grow(int fd) mfd_fail_grow() argument
682 mfd_assert_grow_write(int fd) mfd_assert_grow_write() argument
706 mfd_fail_grow_write(int fd) mfd_fail_grow_write() argument
728 mfd_assert_mode(int fd,int mode) mfd_assert_mode() argument
747 mfd_assert_chmod(int fd,int mode) mfd_assert_chmod() argument
761 mfd_fail_chmod(int fd,int mode) mfd_fail_chmod() argument
857 int fd; test_create() local
906 int fd; test_basic() local
958 int fd; test_seal_write() local
984 int fd, fd2; test_seal_future_write() local
1020 int fd; test_seal_write_map_read_shared() local
1048 int fd; test_seal_shrink() local
1074 int fd; test_seal_grow() local
1100 int fd; test_seal_resize() local
1127 int fd; test_exec_seal() local
1177 int fd; test_exec_no_seal() local
1196 int fd; test_noexec_seal() local
1221 int fd; test_sysctl_sysctl0() local
1242 int fd; test_sysctl_sysctl1() local
1279 int fd; test_sysctl_sysctl2() local
1557 int fd, fd2; test_share_dup() local
1598 int fd; test_share_mmap() local
1633 int fd, fd2; test_share_open() local
1675 int fd; test_share_fork() local
[all...]
/linux/include/linux/
H A Dfile.h39 struct fd { struct
46 static inline bool fd_empty(struct fd f) in fd_empty() argument
51 #define EMPTY_FD (struct fd){0}
52 static inline struct fd BORROWED_FD(struct file *f) in BORROWED_FD()
54 return (struct fd){(unsigned long)f}; in BORROWED_FD()
56 static inline struct fd CLONED_FD(struct file *f) in CLONED_FD()
58 return (struct fd){(unsigned long)f | FDPUT_FPUT}; in CLONED_FD()
61 static inline void fdput(struct fd fd) in fdput() argument
63 if (unlikely(fd.word & FDPUT_FPUT)) in fdput()
64 fput(fd_file(fd)); in fdput()
[all …]
/linux/tools/testing/vsock/
H A Dvsock_test.c51 int fd; in test_stream_connection_reset() local
53 fd = socket(AF_VSOCK, SOCK_STREAM, 0); in test_stream_connection_reset()
57 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_connection_reset()
71 close(fd); in test_stream_connection_reset()
87 int fd; in test_stream_bind_only_client() local
92 fd = socket(AF_VSOCK, SOCK_STREAM, 0); in test_stream_bind_only_client()
96 ret = connect(fd, &addr.sa, sizeof(addr.svm)); in test_stream_bind_only_client()
113 close(fd); in test_stream_bind_only_client()
118 int fd; in test_stream_bind_only_server() local
120 fd in test_stream_bind_only_server()
133 int fd; test_stream_client_close_client() local
147 int fd; test_stream_client_close_server() local
168 int fd; test_stream_server_close_client() local
189 int fd; test_stream_server_close_server() local
260 int fd; test_msg_peek_client() local
289 int fd; test_msg_peek_server() local
353 int fd; test_stream_peek_after_recv_server() local
392 int fd; test_seqpacket_msg_bounds_client() local
471 int fd; test_seqpacket_msg_bounds_server() local
539 int fd; test_seqpacket_msg_trunc_client() local
556 int fd; test_seqpacket_msg_trunc_server() local
606 int fd; test_seqpacket_timeout_client() local
653 int fd; test_seqpacket_timeout_server() local
671 int fd; test_seqpacket_bigmsg_client() local
712 int fd; test_seqpacket_bigmsg_server() local
730 int fd; test_seqpacket_invalid_rec_buffer_client() local
765 int fd; test_seqpacket_invalid_rec_buffer_server() local
848 int fd; test_stream_poll_rcvlowat_server() local
880 int fd; test_stream_poll_rcvlowat_client() local
943 int fd; test_inv_buf_client() local
978 int fd; test_inv_buf_server() local
1024 int fd; test_stream_virtio_skb_merge_client() local
1053 int fd; test_stream_virtio_skb_merge_server() local
1109 test_stream_check_sigpipe(int fd) test_stream_check_sigpipe() argument
1170 int fd; test_stream_shutwr_client() local
1198 int fd; test_stream_shutwr_server() local
1213 int fd; test_stream_shutrd_client() local
1238 int fd; test_stream_shutrd_server() local
1329 int fd; test_unsent_bytes_client() local
1378 int fd; test_unread_bytes_client() local
1455 int fd; test_stream_rcvlowat_def_cred_upd_client() local
1492 int fd; test_stream_credit_update_test() local
1610 int fd; test_stream_leak_acceptq_client() local
1627 int fd; test_stream_leak_acceptq_server() local
1640 int fd; test_stream_msgzcopy_leak_errq_client() local
1663 int fd; test_stream_msgzcopy_leak_errq_server() local
1752 int fd, res; test_stream_msgzcopy_leak_zcskb_client() local
1811 int fd; test_stream_msgzcopy_leak_zcskb_server() local
1830 int fd, i, c; test_stream_transport_uaf() local
1934 int fd; test_stream_connect_retry_client() local
1960 int fd; test_stream_connect_retry_server() local
2155 int fd; test_stream_linger_client() local
2169 int fd; test_stream_linger_server() local
2188 int fd; test_stream_nolinger_client() local
2216 int fd; test_stream_nolinger_server() local
2230 int fd; test_stream_accepted_setsockopt_client() local
2243 int fd; test_stream_accepted_setsockopt_server() local
2260 int fd; test_stream_tx_credit_bounds_client() local
2326 int fd; test_stream_tx_credit_bounds_server() local
2366 int i, fd; test_stream_collapse_client() local
2404 int fd; test_stream_collapse_server() local
[all...]
/linux/drivers/clk/
H A Dclk-fractional-divider.c53 static inline u32 clk_fd_readl(struct clk_fractional_divider *fd) in clk_fd_readl() argument
55 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN) in clk_fd_readl()
56 return ioread32be(fd->reg); in clk_fd_readl()
58 return readl(fd->reg); in clk_fd_readl()
61 static inline void clk_fd_writel(struct clk_fractional_divider *fd, u32 val) in clk_fd_writel() argument
63 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN) in clk_fd_writel()
64 iowrite32be(val, fd->reg); in clk_fd_writel()
66 writel(val, fd->reg); in clk_fd_writel()
71 struct clk_fractional_divider *fd = to_clk_fd(hw); in clk_fd_get_div() local
77 if (fd in clk_fd_get_div()
125 struct clk_fractional_divider *fd = to_clk_fd(hw); clk_fractional_divider_general_approximation() local
157 struct clk_fractional_divider *fd = to_clk_fd(hw); clk_fd_determine_rate() local
185 struct clk_fractional_divider *fd = to_clk_fd(hw); clk_fd_set_rate() local
273 struct clk_fractional_divider *fd; clk_hw_register_fractional_divider() local
326 struct clk_fractional_divider *fd; clk_hw_unregister_fractional_divider() local
[all...]
H A Dclk-fractional-divider_test.c18 struct clk_fractional_divider *fd; in clk_fd_test_approximation_max_denominator() local
21 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_denominator()
22 KUNIT_ASSERT_NOT_NULL(test, fd); in clk_fd_test_approximation_max_denominator()
24 fd->mwidth = 3; in clk_fd_test_approximation_max_denominator()
25 fd->nwidth = 3; in clk_fd_test_approximation_max_denominator()
32 clk_fractional_divider_general_approximation(&fd->hw, rate, &parent_rate, &m, &n); in clk_fd_test_approximation_max_denominator()
47 struct clk_fractional_divider *fd; in clk_fd_test_approximation_max_numerator() local
50 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_numerator()
51 KUNIT_ASSERT_NOT_NULL(test, fd); in clk_fd_test_approximation_max_numerator()
53 fd->mwidth = 3; in clk_fd_test_approximation_max_numerator()
[all …]
/linux/tools/testing/selftests/net/
H A Dipv6_flowlabel_mgr.c39 static int flowlabel_get(int fd, uint32_t label, uint8_t share, uint16_t flags) in flowlabel_get() argument
52 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_get()
55 static int flowlabel_put(int fd, uint32_t label) in flowlabel_put() argument
62 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_put()
65 static int flowlabel_renew(int fd, uint32_t label, uint8_t share, in flowlabel_renew() argument
75 return setsockopt(fd, SOL_IPV6, IPV6_FLOWLABEL_MGR, &req, sizeof(req)); in flowlabel_renew()
93 int fd; in tcp_listen() local
95 fd = socket(PF_INET6, SOCK_STREAM, 0); in tcp_listen()
96 if (fd == -1) in tcp_listen()
98 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) in tcp_listen()
[all …]
H A Dreuseaddr_ports_exhausted.c58 int fd, ret; in bind_port() local
60 fd = socket(AF_INET, SOCK_STREAM, 0); in bind_port()
61 ASSERT_NE(-1, fd) TH_LOG("failed to open socket."); in bind_port()
63 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int)); in bind_port()
66 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &reuseport, sizeof(int)); in bind_port()
73 if (bind(fd, (struct sockaddr *)&local_addr, len) == -1) { in bind_port()
74 close(fd); in bind_port()
78 return fd; in bind_port()
84 int i, j, fd[2]; in TEST() local
90 fd[j] = bind_port(_metadata, opts->reuseaddr[j], opts->reuseport[j]); in TEST()
[all …]
H A Dgetsockopt_iter.c63 int fd; in FIXTURE() local
70 self->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in FIXTURE_SETUP()
71 if (self->fd < 0) in FIXTURE_SETUP()
77 if (setsockopt(self->fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, in FIXTURE_SETUP()
84 if (self->fd >= 0) in FIXTURE_TEARDOWN()
85 close(self->fd); in FIXTURE_TEARDOWN()
95 ASSERT_EQ(0, getsockopt(self->fd, SOL_NETLINK, NETLINK_PKTINFO, in TEST_F()
108 ASSERT_EQ(0, getsockopt(self->fd, SOL_NETLINK, NETLINK_PKTINFO, in TEST_F()
120 ASSERT_EQ(-1, getsockopt(self->fd, SOL_NETLINK, NETLINK_PKTINFO, in TEST_F()
131 ASSERT_EQ(0, getsockopt(self->fd, SOL_NETLINK, in TEST_F()
[all …]
/linux/tools/testing/selftests/filesystems/eventfd/
H A Deventfd_test.c47 int fd, flags; in TEST() local
49 fd = sys_eventfd2(0, 0); in TEST()
50 ASSERT_GE(fd, 0); in TEST()
52 flags = fcntl(fd, F_GETFL); in TEST()
56 close(fd); in TEST()
61 int fd, flags; in TEST() local
63 fd = sys_eventfd2(0, EFD_CLOEXEC); in TEST()
64 ASSERT_GE(fd, 0); in TEST()
66 flags = fcntl(fd, F_GETFD); in TEST()
70 close(fd); in TEST()
[all …]
/linux/tools/perf/tests/
H A Dwp.c16 #define WP_TEST_ASSERT_VAL(fd, text, val) \ argument
19 wp_read(fd, &count, sizeof(long long)); \
32 static int wp_read(int fd, long long *count, int size) in wp_read() argument
34 int ret = read(fd, count, size); in wp_read()
61 int fd; in __event() local
65 fd = sys_perf_event_open(&attr, 0, -1, -1, in __event()
67 if (fd < 0) { in __event()
68 fd = -errno; in __event()
72 return fd; in __event()
82 int fd; in test__wp_ro()
[all...]
/linux/tools/testing/selftests/wireguard/qemu/
H A Dinit.c61 int bits = 256, fd; in seed_rng() local
66 fd = open("/dev/random", O_WRONLY); in seed_rng()
67 if (fd < 0) in seed_rng()
69 if (ioctl(fd, RNDADDTOENTCNT, &bits) < 0) in seed_rng()
71 close(fd); in seed_rng()
112 int fd; in enable_logging() local
114 fd = open("/proc/sys/kernel/printk", O_WRONLY); in enable_logging()
115 if (fd >= 0) { in enable_logging()
116 if (write(fd, "9\n", 2) != 2) in enable_logging()
118 close(fd); in enable_logging()
[all …]
/linux/tools/testing/selftests/iommu/
H A Diommufd_fail_nth.c31 int fd; in writeat() local
33 fd = openat(dfd, fn, O_WRONLY); in writeat()
34 if (fd == -1) in writeat()
36 res = write(fd, val, val_len); in writeat()
38 close(fd); in writeat()
210 int fd; in FIXTURE() local
218 self->fd = -1; in FIXTURE_SETUP()
234 _test_cmd_pasid_detach(self->fd, self->stdev_id, self->pasid); in FIXTURE_TEARDOWN()
235 teardown_iommufd(self->fd, _metadata); in FIXTURE_TEARDOWN()
247 self->fd in TEST_FAIL_NTH()
[all...]
/linux/tools/testing/selftests/bpf/
H A Dtest_maps.c36 int fd; in test_hashmap() local
38 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap()
39 if (fd < 0) { in test_hashmap()
47 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
51 assert(bpf_map_update_elem(fd, &key, &value, BPF_NOEXIST) < 0 && in test_hashmap()
56 assert(bpf_map_update_elem(fd, &key, &value, -1) < 0 && in test_hashmap()
60 assert(bpf_map_lookup_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
65 assert(bpf_map_update_elem(fd, &key, &value, BPF_ANY) == 0); in test_hashmap()
68 assert(bpf_map_lookup_and_delete_elem(fd, &key, &value) == 0 && value == 1234); in test_hashmap()
71 assert(bpf_map_lookup_elem(fd, &key, &value) < 0 && errno == ENOENT); in test_hashmap()
[all …]
/linux/scripts/ipe/polgen/
H A Dpolgen.c24 FILE *fd; in policy_to_buffer() local
26 fd = fopen(pathname, "r"); in policy_to_buffer()
27 if (!fd) { in policy_to_buffer()
32 fseek(fd, 0, SEEK_END); in policy_to_buffer()
33 fsize = ftell(fd); in policy_to_buffer()
34 rewind(fd); in policy_to_buffer()
42 read = fread((void *)lbuf, sizeof(*lbuf), fsize, fd); in policy_to_buffer()
50 fclose(fd); in policy_to_buffer()
57 fclose(fd); in policy_to_buffer()
64 FILE *fd; in write_boot_policy() local
[all …]
/linux/tools/testing/selftests/net/af_unix/
H A Dso_peek_off.c13 int fd[2]; /* 0: sender, 1: receiver */ in FIXTURE() local
44 ret = socketpair(AF_UNIX, variant->type, 0, self->fd); in FIXTURE_SETUP()
47 ret = setsockopt(self->fd[1], SOL_SOCKET, SO_RCVTIMEO_NEW, in FIXTURE_SETUP()
51 ret = setsockopt(self->fd[1], SOL_SOCKET, SO_PEEK_OFF, in FIXTURE_SETUP()
58 close_range(self->fd[0], self->fd[1], 0); in FIXTURE_TEARDOWN()
61 #define sendeq(fd, str, flags) \ argument
65 bytes = send(fd, str, len, flags); \
69 #define recveq(fd, str, buflen, flags) \ argument
74 bytes = recv(fd, bu
[all...]
/linux/fs/
H A Dfile.c7 * Manage the dynamic fd arrays in the process files_struct.
105 kvfree(fdt->fd); in __free_fdtable()
120 * Copy 'count' fd bits from the old table to the new table and clear the extra
149 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable()
150 memset((char *)nfdt->fd + cpy, 0, set); in copy_fdtable()
179 * 256 slots (i.e. 1Kb fd array). in alloc_fdtable()
180 * 3. on 64bit don't skip anything, 1Kb fd array means 128 slots there in alloc_fdtable()
222 fdt->fd = data; in alloc_fdtable()
238 kvfree(fdt->fd); in alloc_fdtable()
322 __set_close_on_exec(unsigned int fd,struct fdtable * fdt,bool set) __set_close_on_exec() argument
333 __set_open_fd(unsigned int fd,struct fdtable * fdt,bool set) __set_open_fd() argument
342 __clear_open_fd(unsigned int fd,struct fdtable * fdt) __clear_open_fd() argument
350 fd_is_open(unsigned int fd,const struct fdtable * fdt) fd_is_open() argument
441 unsigned int open_files, fd; dup_fd() local
539 struct files_struct *fd = current->files; unshare_fd() local
649 unsigned int fd; alloc_fd() local
702 __put_unused_fd(struct files_struct * files,unsigned int fd) __put_unused_fd() argument
710 put_unused_fd(unsigned int fd) put_unused_fd() argument
736 fd_install_slowpath(unsigned int fd,struct file * file) fd_install_slowpath() argument
756 fd_install(unsigned int fd,struct file * file) fd_install() argument
791 file_close_fd_locked(struct files_struct * files,unsigned fd) file_close_fd_locked() argument
810 close_fd(unsigned fd) close_fd() argument
903 unsigned int fd, n; __range_close() local
954 SYSCALL_DEFINE3(close_range,unsigned int,fd,unsigned int,max_fd,unsigned int,flags) SYSCALL_DEFINE3() argument
1025 file_close_fd(unsigned int fd) file_close_fd() argument
1056 unsigned fd = i * BITS_PER_LONG + bit; close_cloexec_files() local
1167 __fget_files_rcu(struct files_struct * files,unsigned int fd,fmode_t mask) __fget_files_rcu() argument
1242 __fget_files(struct files_struct * files,unsigned int fd,fmode_t mask) __fget_files() argument
1254 __fget(unsigned int fd,fmode_t mask) __fget() argument
1259 fget(unsigned int fd) fget() argument
1265 fget_raw(unsigned int fd) fget_raw() argument
1271 fget_task(struct task_struct * task,unsigned int fd) fget_task() argument
1286 unsigned int fd = *ret_fd; fget_task_next() local
1329 __fget_light(unsigned int fd,fmode_t mask) __fget_light() argument
1355 fdget(unsigned int fd) fdget() argument
1361 fdget_raw(unsigned int fd) fdget_raw() argument
1401 fdget_pos(unsigned int fd) fdget_pos() argument
1424 set_close_on_exec(unsigned int fd,int flag) set_close_on_exec() argument
1432 get_close_on_exec(unsigned int fd) get_close_on_exec() argument
1442 do_dup2(struct files_struct * files,struct file * file,unsigned fd,unsigned flags) do_dup2() argument
1494 replace_fd(unsigned fd,struct file * file,unsigned flags) replace_fd() argument
[all...]
/linux/fs/jffs2/
H A Dbuild.c56 struct jffs2_full_dirent *fd; in jffs2_build_inode_pass1() local
61 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1()
63 if (!fd->ino) in jffs2_build_inode_pass1()
68 child_ic = jffs2_get_ino_cache(c, fd->ino); in jffs2_build_inode_pass1()
71 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1()
72 jffs2_mark_node_obsolete(c, fd->raw); in jffs2_build_inode_pass1()
74 fd->ic = NULL; in jffs2_build_inode_pass1()
79 fd->ic = child_ic; in jffs2_build_inode_pass1()
83 if (fd->type == DT_DIR) { in jffs2_build_inode_pass1()
89 dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino); in jffs2_build_inode_pass1()
[all …]
/linux/arch/um/os-Linux/
H A Dfile.c44 int os_stat_fd(const int fd, struct uml_stat *ubuf) in os_stat_fd() argument
49 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd()
89 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) in os_ioctl_generic() argument
93 err = ioctl(fd, cmd, arg); in os_ioctl_generic()
101 int os_get_ifname(int fd, char* namebuf) in os_get_ifname() argument
103 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) in os_get_ifname()
109 int os_mode_fd(int fd, int mode) in os_mode_fd() argument
113 CATCH_EINTR(err = fchmod(fd, mode)); in os_mode_fd()
167 int fd, err, f = 0; in os_open_file() local
188 fd = open64(file, f, mode); in os_open_file()
[all …]
/linux/tools/testing/selftests/mm/
H A Dgup_longterm.c38 static __fsword_t get_fs_type(int fd)
44 ret = fstatfs(fd, &fs); in get_fs_type()
91 static void do_test(int fd, size_t size, enum test_type type, bool shared)
93 __fsword_t fs_type = get_fs_type(fd); in do_test()
99 if (fd < 0) { in do_test()
104 if (ftruncate(fd, size)) { in do_test()
116 if (fallocate(fd, 0, 0, size)) { in do_test()
136 shared ? MAP_SHARED : MAP_PRIVATE, fd, 0); in do_test()
300 typedef void (*test_fn)(int fd, size_t size);
304 int fd; in run_with_memfd()
39 get_fs_type(int fd) get_fs_type() argument
92 do_test(int fd,size_t size,enum test_type type,bool shared) do_test() argument
305 int fd; run_with_memfd() local
323 int fd; run_with_tmpfile() local
347 int fd; run_with_local_tmpfile() local
371 int fd; run_with_memfd_hugetlb() local
394 test_shared_rw_pin(int fd,size_t size) test_shared_rw_pin() argument
399 test_shared_rw_fast_pin(int fd,size_t size) test_shared_rw_fast_pin() argument
404 test_shared_ro_pin(int fd,size_t size) test_shared_ro_pin() argument
409 test_shared_ro_fast_pin(int fd,size_t size) test_shared_ro_fast_pin() argument
414 test_private_rw_pin(int fd,size_t size) test_private_rw_pin() argument
419 test_private_rw_fast_pin(int fd,size_t size) test_private_rw_fast_pin() argument
424 test_private_ro_pin(int fd,size_t size) test_private_ro_pin() argument
429 test_private_ro_fast_pin(int fd,size_t size) test_private_ro_fast_pin() argument
435 test_shared_iouring(int fd,size_t size) test_shared_iouring() argument
440 test_private_iouring(int fd,size_t size) test_private_iouring() argument
[all...]
/linux/drivers/clk/ti/
H A Dfapll.c71 struct fapll_data *fd; member
79 static bool ti_fapll_clock_is_bypass(struct fapll_data *fd) in ti_fapll_clock_is_bypass() argument
81 u32 v = readl_relaxed(fd->base); in ti_fapll_clock_is_bypass()
83 if (fd->bypass_bit_inverted) in ti_fapll_clock_is_bypass()
89 static void ti_fapll_set_bypass(struct fapll_data *fd) in ti_fapll_set_bypass() argument
91 u32 v = readl_relaxed(fd->base); in ti_fapll_set_bypass()
93 if (fd->bypass_bit_inverted) in ti_fapll_set_bypass()
97 writel_relaxed(v, fd->base); in ti_fapll_set_bypass()
100 static void ti_fapll_clear_bypass(struct fapll_data *fd) in ti_fapll_clear_bypass() argument
102 u32 v = readl_relaxed(fd->base); in ti_fapll_clear_bypass()
[all …]
/linux/tools/testing/selftests/filesystems/mount_cycle/
H A Dmount_cover_test.c63 int fd; in write_file() local
65 fd = open(path, O_WRONLY | O_CLOEXEC); in write_file()
66 if (fd >= 0) { in write_file()
67 n = write(fd, s, strlen(s)); in write_file()
68 close(fd); in write_file()
75 int fd; in touch() local
77 fd = open(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, 0644); in touch()
78 if (fd < 0) in touch()
80 close(fd); in touch()
193 int fd; /* what a lookup on P finds at C's mountpoint */ in FIXTURE() local
[all …]
/linux/tools/testing/selftests/rtc/
H A Drtctest.c36 int fd; in FIXTURE() local
40 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP()
44 close(self->fd); in FIXTURE_TEARDOWN()
51 if (self->fd == -1 && errno == ENOENT) in TEST_F()
53 ASSERT_NE(-1, self->fd); in TEST_F()
56 rc = ioctl(self->fd, RTC_RD_TIME, &rtc_tm); in TEST_F()
92 static enum rtc_alarm_state get_rtc_alarm_state(int fd, int need_seconds) in get_rtc_alarm_state() argument
100 rc = ioctl(fd, RTC_PARAM_GET, &param); in get_rtc_alarm_state()
121 if (self->fd == -1 && errno == ENOENT)
123 ASSERT_NE(-1, self->fd);
[all...]
/linux/tools/testing/selftests/filesystems/
H A Drw_hint_test.c44 static int set_hint(int fd, uint64_t hint) in set_hint() argument
46 return fcntl(fd, F_SET_RW_HINT, &hint); in set_hint()
49 static long get_hint(int fd) in get_hint() argument
53 if (fcntl(fd, F_GET_RW_HINT, &hint)) in get_hint()
61 int fd, flags; in TEST() local
66 fd = mkstemp(path); in TEST()
67 ASSERT_GE(fd, 0); in TEST()
69 ASSERT_EQ(set_hint(fd, RWH_WRITE_LIFE_SHORT), 0); in TEST()
70 EXPECT_EQ(get_hint(fd), RWH_WRITE_LIFE_SHORT); in TEST()
72 if (ioctl(fd, FS_IOC_GETFLAGS, &flags)) { in TEST()
[all …]
/linux/tools/perf/tests/shell/attr/
H A Dtest-stat-detailed-310 fd=1
16 fd=2
22 fd=3
28 fd=4
34 fd=5
41 fd=6
48 fd=7
55 fd=8
62 fd=9
69 fd
[all...]
/linux/tools/testing/selftests/efivarfs/
H A Dopen-unlink.c16 int fd; in set_immutable() local
20 fd = open(path, O_RDONLY); in set_immutable()
21 if (fd < 0) in set_immutable()
22 return fd; in set_immutable()
24 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags); in set_immutable()
27 close(fd); in set_immutable()
37 rc = ioctl(fd, FS_IOC_SETFLAGS, &flags); in set_immutable()
39 close(fd); in set_immutable()
47 int fd; in get_immutable() local
51 fd = open(path, O_RDONLY); in get_immutable()
[all …]

12345678910>>...64