tools lib bpf: Fix up FEATURE_{TESTS,DISPLAY} usage
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 21 Sep 2015 20:00:27 +0000 (17:00 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 22 Sep 2015 13:47:01 +0000 (10:47 -0300)
commit20517cd9c5930c9ef580082d23073842e92249ad
treeca7975fc741c6ce3c0ef99de4104c772a274ec7b
parent6076e2a47cccfb3d48a8d165853c0b799c563df7
tools lib bpf: Fix up FEATURE_{TESTS,DISPLAY} usage

When libbpf was introduced it wrongly asked for the "libelf" and "bpf"
feature tests to be performed (via FEATURE_TESTS), while asking that
"libbpf", "libelf-mmap", "libelf-getphdrnum" and "bpf" to have the
result of its respective tests to be displayed (via FEATURE_DISPLAY).

Due to another recently bug fixed in the tools/build/ infrastructure
("tools build: Fixup feature detection display function name") the
results for the entries in the FEATURE_DISPLAY, for this case, were
appearing as all succeeding, when two of them (the ones only on the
DISPLAY) were not even being performed.

Before:

  $ make -C tools/lib/bpf/
  make: Entering directory '/home/git/linux/tools/lib/bpf'
  Auto-detecting system features:
  ...                        libelf: [ on  ]
  ...             libelf-getphdrnum: [ OFF ]
  ...                   libelf-mmap: [ OFF ]
  ...                           bpf: [ on  ]
  <SNIP>

After, with FEATURE_TESTS == FEATURE_DISPLAY:

  Auto-detecting system features:
  ...                        libelf: [ on  ]
  ...             libelf-getphdrnum: [ on  ]
  ...                   libelf-mmap: [ on  ]
  ...                           bpf: [ on  ]
  <SNIP>

I just inverted, so that it tests the four features but displays just
the libelf and mmap ones, to make it more compact. So it becomes:

  $ make -C tools/lib/bpf/
  make: Entering directory '/home/git/linux/tools/lib/bpf'

  Auto-detecting system features:
  ...                        libelf: [ on  ]
  ...                           bpf: [ on  ]

Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: pi3orama@163.com
Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
Link: http://lkml.kernel.org/n/tip-y4bd59e6j9rzzojiyeqrg2jq@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/bpf/Makefile