[LTP] [PATCH 1/3] lib: Add tst_fd_iterate()
Matthew Wilcox
willy@infradead.org
Wed Oct 4 17:21:03 CEST 2023
On Wed, Oct 04, 2023 at 02:47:10PM +0200, Cyril Hrubis wrote:
> +enum tst_fd_type {
> + TST_FD_FILE,
> + TST_FD_DIR,
> + TST_FD_DEV_ZERO,
> + TST_FD_PROC_MAPS,
> + TST_FD_PIPE_IN,
> + TST_FD_PIPE_OUT,
> + TST_FD_UNIX_SOCK,
> + TST_FD_INET_SOCK,
> + TST_FD_IO_URING,
> + TST_FD_BPF_MAP,
> + TST_FD_MAX,
> +};
This looks great! Thanks for turning my musing into concrete code.
Some other file descriptor types that might be interesting ...
O_PATH (see openat(2); some variants on this like opening a symlink with
O_NOFOLLOW)
epoll
eventfd
signalfd
timerfd_create
pidfd_open
fanotify_init
inotify
userfaultfd
perf_event_open
fsopen
fspick
fsmount
open_tree
secretmem
memfd
(i used a variety of techniques for thinking of these, including
grepping for CLOEXEC and fd_install)
More information about the ltp
mailing list