perf test: Add libbpf pinning test
authorJoe Stringer <joe@ovn.org>
Thu, 26 Jan 2017 21:20:01 +0000 (13:20 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Jan 2017 19:20:08 +0000 (16:20 -0300)
commita26305363d4b3a586a2d3554c22705538aa4e926
treef9145442dab9efd2d1f5d1cf402e797857f1afb7
parent71dc4c30680fa7e7fd4b82352a845e2fb4d86b2b
perf test: Add libbpf pinning test

Add a test for the newly added BPF object pinning functionality.

For example:

  # tools/perf/perf test 37
    37: BPF filter                                 :
    37.1: Basic BPF filtering                      : Ok
    37.2: BPF pinning                              : Ok
    37.3: BPF prologue generation                  : Ok
    37.4: BPF relocation checker                   : Ok

  # tools/perf/perf test 37 -v 2>&1 | grep pinned
    libbpf: pinned map '/sys/fs/bpf/perf_test/flip_table'
    libbpf: pinned program '/sys/fs/bpf/perf_test/func=SyS_epoll_wait/0'

Signed-off-by: Joe Stringer <joe@ovn.org>
Requested-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: netdev@vger.kernel.org
Link: http://lkml.kernel.org/r/20170126212001.14103-7-joe@ovn.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/bpf.c