aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/btf_endian.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-09-28 21:30:44 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-09-29 12:21:23 -0700
commit22ba3635163164aa86eb8a9d8645079a0bbd0a66 (patch)
tree3167a539b2b405b35650c3e45b97055cc01247e5 /tools/testing/selftests/bpf/prog_tests/btf_endian.c
parentf970cbcdcdb5b3468a6c05332818d226fb60038f (diff)
selftests/bpf: Move and extend ASSERT_xxx() testing macros
Move existing ASSERT_xxx() macros out of btf_write selftest into test_progs.h to use across all selftests. Also expand a set of macros for typical cases. Now there are the following macros: - ASSERT_EQ() -- check for equality of two integers; - ASSERT_STREQ() -- check for equality of two C strings; - ASSERT_OK() -- check for successful (zero) return result; - ASSERT_ERR() -- check for unsuccessful (non-zero) return result; - ASSERT_NULL() -- check for NULL pointer; - ASSERT_OK_PTR() -- check for a valid pointer; - ASSERT_ERR_PTR() -- check for NULL or negative error encoded in a pointer. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200929043046.1324350-2-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/btf_endian.c')
0 files changed, 0 insertions, 0 deletions