On Mon, Dec 2, 2019 at 1:59 PM Stanislav Fomichev <sdf@xxxxxxxxxx> wrote: > > Commit 5c26f9a78358 ("libbpf: Don't use cxx to test_libpf target") > converted existing c++ test to c. We still want to include and > link against libbpf from c++ code, so reinstate this test back, > this time in a form of a selftest with a clear comment about > its purpose. > > v2: > * -lelf -> $(LDLIBS) (Andrii Nakryiko) > > Fixes: 5c26f9a78358 ("libbpf: Don't use cxx to test_libpf target") > Signed-off-by: Stanislav Fomichev <sdf@xxxxxxxxxx> > --- LGTM. Acked-by: Andrii Nakryiko <andriin@xxxxxx> > tools/lib/bpf/.gitignore | 1 - > tools/lib/bpf/Makefile | 5 +---- > tools/testing/selftests/bpf/.gitignore | 1 + > tools/testing/selftests/bpf/Makefile | 6 +++++- > .../test_libbpf.c => testing/selftests/bpf/test_cpp.cpp} | 0 > 5 files changed, 7 insertions(+), 6 deletions(-) > rename tools/{lib/bpf/test_libbpf.c => testing/selftests/bpf/test_cpp.cpp} (100%) > [...]