summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/strncmp_test.c
AgeCommit message (Collapse)AuthorFilesLines
2022-04-19selftests/bpf: Use non-autoloaded programs in few testsAndrii Nakryiko1-4/+4
Take advantage of new libbpf feature for declarative non-autoloaded BPF program SEC() definitions in few test that test single program at a time out of many available programs within the single BPF object. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20220419002452.632125-2-andrii@kernel.org
2021-12-11selftests/bpf: Add test cases for bpf_strncmp()Hou Tao1-0/+54
Four test cases are added: (1) ensure the return value is expected (2) ensure no const string size is rejected (3) ensure writable target is rejected (4) ensure no null-terminated target is rejected Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211210141652.877186-5-houtao1@huawei.com