summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2024-11-12 03:09:04 -0800
committerAlexei Starovoitov <ast@kernel.org>2024-11-12 13:53:27 -0800
commit03066ed3105a71c2b0ad39ea44b6e5733ddd4a68 (patch)
tree640cb16e8e6bdbdc9c4731bfdde84eeb67ac3600 /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentd9d4d127e813427afb26ff7e0f0c58989501be84 (diff)
selftests/bpf: add read_with_timeout() utility function
int read_with_timeout(int fd, char *buf, size_t count, long usec) As a regular read(2), but allows to specify a timeout in micro-seconds. Returns -EAGAIN on timeout. Implemented using select(). Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20241112110906.3045278-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions