diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-10-20 21:00:51 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-11-04 15:42:41 +0300 |
commit | 38219f24116ace9b0e604f2ced9c7dbef3041058 (patch) | |
tree | 17732af5746f65ae16ef52ccf937b132d610280a /tools/perf/tests/bpf.c | |
parent | c18cf78d7969db89934587fa476220eefe7bd4bd (diff) | |
download | linux-38219f24116ace9b0e604f2ced9c7dbef3041058.tar.xz |
perf tests: Skip the llvm and bpf tests if HAVE_LIBBPF_SUPPORT isn't defined
If either NO_LIBBPF=1 is passed, explicitely disabling it or if libbpf
is not available due to some missing dependency, skip its tests, telling
the user the feature isn't available.
# perf test
<SNIP>
40: LLVM search and compile : Skip (not compiled in)
41: Session topology : Ok
42: BPF filter : Skip (not compiled in)
<SNIP>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/bpf.c')
-rw-r--r-- | tools/perf/tests/bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index cd77e334e577..d880c588a951 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -9,12 +9,10 @@ #include <util/util.h> #include <util/bpf-loader.h> #include <util/evlist.h> -#include <linux/bpf.h> #include <linux/filter.h> #include <linux/kernel.h> #include <linux/string.h> #include <api/fs/fs.h> -#include <bpf/bpf.h> #include <perf/mmap.h> #include "tests.h" #include "llvm.h" @@ -25,6 +23,8 @@ #define PERF_TEST_BPF_PATH "/sys/fs/bpf/perf_test" #ifdef HAVE_LIBBPF_SUPPORT +#include <linux/bpf.h> +#include <bpf/bpf.h> static int epoll_pwait_loop(void) { |