#
b9ec9132 |
|
16-Oct-2023 |
Breno Leitao <leitao@debian.org> |
selftests/bpf/sockopt: Add io_uring support Expand the sockopt test to use also check for io_uring {g,s}etsockopt commands operations. This patch starts by marking each test if they support io_uring support or not. Right now, io_uring cmd getsockopt() has a limitation of only accepting level == SOL_SOCKET, otherwise it returns -EOPNOTSUPP. Since there aren't any test exercising getsockopt(level == SOL_SOCKET), this patch changes two tests to use level == SOL_SOCKET, they are "getsockopt: support smaller ctx->optlen" and "getsockopt: read ctx->optlen". There is no limitation for the setsockopt() part. Later, each test runs using regular {g,s}etsockopt systemcalls, and, if liburing is supported, execute the same test (again), but calling liburing {g,s}setsockopt commands. This patch also changes the level of two tests to use SOL_SOCKET for the following two tests. This is going to help to exercise the io_uring subsystem: * getsockopt: read ctx->optlen * getsockopt: support smaller ctx->optlen Signed-off-by: Breno Leitao <leitao@debian.org> Link: https://lore.kernel.org/r/20231016134750.1381153-12-leitao@debian.org Acked-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
#
321a64b3 |
|
25-May-2023 |
Daniel Müller <deso@posteo.net> |
selftests/bpf: Check whether to run selftest The sockopt test invokes test__start_subtest and then unconditionally asserts the success. That means that even if deny-listed, any test will still run and potentially fail. Evaluate the return value of test__start_subtest() to achieve the desired behavior, as other tests do. Signed-off-by: Daniel Müller <deso@posteo.net> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20230525232248.640465-1-deso@posteo.net
|
#
989a4a7d |
|
11-May-2023 |
Stanislav Fomichev <sdf@google.com> |
selftests/bpf: Update EFAULT {g,s}etsockopt selftests Instead of assuming EFAULT, let's assume the BPF program's output is ignored. Remove "getsockopt: deny arbitrary ctx->retval" because it was actually testing optlen. We have separate set of tests for retval. Signed-off-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/20230511170456.1759459-3-sdf@google.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
|
#
099763e7 |
|
25-Sep-2022 |
Wang Yufen <wangyufen@huawei.com> |
selftests/bpf: Convert sockopt test to ASSERT_* macros Convert the selftest to use the preferred ASSERT_* macros instead of the deprecated CHECK(). Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/1664169131-32405-4-git-send-email-wangyufen@huawei.com
|
#
d8e86407 |
|
03-Nov-2021 |
Andrii Nakryiko <andrii@kernel.org> |
selftests/bpf: Convert legacy prog load APIs to bpf_prog_load() Convert all the uses of legacy low-level BPF program loading APIs (mostly bpf_load_program_xattr(), but also some bpf_verify_program()) to bpf_prog_load() uses. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211103220845.2676888-10-andrii@kernel.org
|
#
4a647421 |
|
04-Sep-2019 |
Stanislav Fomichev <sdf@google.com> |
selftests/bpf: test_progs: convert test_sockopt Move the files, adjust includes, remove entry from Makefile & .gitignore Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
|