selftests/bpf: check the instruction dumps are populated
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 25 Aug 2017 21:39:57 +0000 (14:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 22:35:18 +0000 (15:35 -0700)
commit7cadf2cbe8051dd43cb340d02d0d30960f061ac2
treedcfc13447be00004828f4ace556a92c76e8d7929
parentf740c34ee5cf62e1fff5ebec6d0e63efcc3cdfe9
selftests/bpf: check the instruction dumps are populated

Add a basic test for checking whether kernel is populating
the jited and xlated BPF images.  It was used to confirm
the behaviour change from commit d777b2ddbecf ("bpf: don't
zero out the info struct in bpf_obj_get_info_by_fd()"),
which made bpf_obj_get_info_by_fd() usable for retrieving
the image dumps.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/test_progs.c