OSDN Git Service

bpf: btf: Some test_btf clean up
authorMartin KaFai Lau <kafai@fb.com>
Fri, 4 May 2018 21:49:53 +0000 (14:49 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 9 May 2018 15:25:14 +0000 (17:25 +0200)
commite34d98d3b4e2e3edcaebb68b1fad564af68f2b73
treeeb787173dd6110914d1619602c4738a553b616b4
parent62dab84c81a487d946a5fc37c6df541dd95cca38
bpf: btf: Some test_btf clean up

This patch adds a CHECK() macro for condition checking
and error report purpose.  Something similar to test_progs.c

It also counts the number of tests passed/skipped/failed and
print them at the end of the test run.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/test_btf.c