]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add checks for X__elf_bytes() skeleton helper
authorMatt Smith <alastorze@fb.com>
Wed, 1 Sep 2021 19:44:39 +0000 (12:44 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 8 Sep 2021 00:44:39 +0000 (17:44 -0700)
commit3be22c081d40c9232fa861e4b2200cde4b276eaa
tree37c3235c409c14ced15e1a5eefc6b63f74783e98
parentaba7244f10db6e66a924bf46985cccf1d206a3bf
selftests/bpf: Add checks for X__elf_bytes() skeleton helper

This patch adds two checks for the X__elf_bytes BPF skeleton helper
method. The first asserts that the pointer returned from the helper
method is valid, the second asserts that the provided size pointer is
set.

Signed-off-by: Matt Smith <alastorze@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210901194439.3853238-4-alastorze@fb.com
tools/testing/selftests/bpf/prog_tests/skeleton.c