aboutsummaryrefslogtreecommitdiffstats
path: root/tools/thermal
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2018-12-07 16:42:27 -0800
committerAlexei Starovoitov <ast@kernel.org>2018-12-09 13:54:38 -0800
commit05687352c600930058ca4c68048302502e07a572 (patch)
tree5dd77a18a5410e2cd91a22f585b07187478fc10c /tools/thermal
parentbpf: tools: Sync uapi bpf.h (diff)
downloadlinux-dev-05687352c600930058ca4c68048302502e07a572.tar.xz
linux-dev-05687352c600930058ca4c68048302502e07a572.zip
bpf: Refactor and bug fix in test_func_type in test_btf.c
1) bpf_load_program_xattr() is absorbing the EBIG error which makes testing this case impossible. It is replaced with a direct syscall(__NR_bpf, BPF_PROG_LOAD,...). 2) The test_func_type() is renamed to test_info_raw() to prepare for the new line_info test in the next patch. 3) The bpf_obj_get_info_by_fd() testing for func_info is refactored to test_get_finfo(). A new test_get_linfo() will be added in the next patch for testing line_info purpose. 4) The test->func_info_cnt is checked instead of a static value "2". 5) Remove unnecessary "\n" in error message. 6) Adding back info_raw_test_num to the cmd arg such that a specific test case can be tested, like all other existing tests. 7) Fix a bug in handling expected_prog_load_failure. A test could pass even if prog_fd != -1 while expected_prog_load_failure is true. 8) The min rec_size check should be < 8 instead of < 4. Fixes: 4798c4ba3ba9 ("tools/bpf: extends test_btf to test load/retrieve func_type info") Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/thermal')
0 files changed, 0 insertions, 0 deletions