]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix test_bpf_obj_id() when the bpf_jit_enable sysctl is diabled
authorMartin KaFai Lau <kafai@fb.com>
Fri, 9 Jun 2017 05:30:16 +0000 (22:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2017 19:15:10 +0000 (15:15 -0400)
commita7e8d3438a7daa8f4d1086a0fdb7a597d9f653c2
tree42b5a6c0cdabbb8959d3bdfec466122bb360edcf
parentec4a2943282a35b5e2774b210e9959c27b2173ad
bpf: Fix test_bpf_obj_id() when the bpf_jit_enable sysctl is diabled

test_bpf_obj_id() should not expect a non zero jited_prog_len
to be returned by bpf_obj_get_info_by_fd() when
net.core.bpf_jit_enable is 0.

The patch checks for net.core.bpf_jit_enable and
has different expectation on jited_prog_len.

This patch also removes the pwd.h header which I forgot
to remove after making changes.

Fixes: 73db32b86d03 ("bpf: Test for bpf ID")
Reported-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_progs.c