enosys - Man Page
utility to make syscalls fail with ENOSYS
Synopsis
Description
enosys is a simple command to execute a child process for which certain syscalls fail with errno ENOSYS.
It can be used to test the behavior of applications in the face of missing syscalls as would happen when running on old kernels.
Options
- -s, --syscall
Syscall to block with ENOSYS. Can be specified multiple times. An alternative error number or name can be specified with a colon.
- -i, --ioctl
Ioctl to block with ENOTTY. Can be specified multiple times. An alternative error number or name can be specified with a colon.
- -l, --list
List syscalls known to enosys.
- -m, --list-ioctl
List ioctls known to enosys.
- -d, --dump[=file]
Dump seccomp bytecode filter to standard output.
The dump can for example be used by setpriv --seccomp-filter.
- -h, --help
Display help text and exit.
- -V, --version
Display version and exit.
Examples
# fail syscall "fallocate" with ENOSYS enosys -s fallocate ...
# fail syscall "fallocate" with ENOMEM enosys -s fallocate:ENOMEM ...
# fail syscall "fallocate" with value 12/ENOMEM enosys -s fallocate:12 ...
# fail ioctl FIOCLEX with ENOTTY enosys -i FIOCLEX ...
# fail ioctl FIOCLEX with ENOMEM enosys -i FIOCLEX:ENOMEM ...
# fail ioctl FIOCLEX with value 12/ENOMEM enosys -i FIOCLEX:12 ...
Exit Status
enosys exits with the status code of the executed process. The following values have special meanings:
- internal error
- system does not provide the necessary functionality
Authors
See Also
Reporting Bugs
For bug reports, use the issue tracker.
Availability
The enosys command is part of the util-linux package which can be downloaded from Linux Kernel Archive.