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)
commitfad07430bc03415a468d4ab28621ca71ae86c583
tree42b5a6c0cdabbb8959d3bdfec466122bb360edcf
parent97a7a37a7b7bf3dd16f6fa13cfd7ffacd01a352f
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: 95b9afd3987f ("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