lkml.org 
[lkml]   [2019]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 bpf-next 11/15] libbpf: don't use cxx to test_libpf target
On 11/23, Ivan Khoronzhuk wrote:
> On Fri, Nov 22, 2019 at 08:32:11AM -0800, Stanislav Fomichev wrote:
> > On 11/21, Andrii Nakryiko wrote:
> > > On Thu, Nov 21, 2019 at 1:42 PM Stanislav Fomichev <sdf@fomichev.me> wrote:
> > > >
> > > > On 10/11, Ivan Khoronzhuk wrote:
> > > > > No need to use C++ for test_libbpf target when libbpf is on C and it
> > > > > can be tested with C, after this change the CXXFLAGS in makefiles can
> > > > > be avoided, at least in bpf samples, when sysroot is used, passing
> > > > > same C/LDFLAGS as for lib.
> > > > > Add "return 0" in test_libbpf to avoid warn, but also remove spaces at
> > > > > start of the lines to keep same style and avoid warns while apply.
> > > > Hey, just spotted this patch, not sure how it slipped through.
> > > > The c++ test was there to make sure libbpf can be included and
> > > > linked against c++ code (i.e. libbpf headers don't have some c++
> > > > keywords/etc).
> > > >
> > > > Any particular reason you were not happy with it? Can we revert it
> > > > back to c++ and fix your use-case instead? Alternatively, we can just
> > > > remove this test if we don't really care about c++.
> > > >
> > >
> > > No one seemed to know why we have C++ pieces in pure C library and its
> > > Makefile, so we decide to "fix" this. :)
> > It's surprising, the commit 8c4905b995c6 clearly states the reason
> > for adding it. Looks like it deserved a real comment in the Makefile :-)
>
> I dislike changing things like this, but I was asked while review and
> it seemed logical enough. The comment could prevent us from doing this.
No worries, I'll add it back with a comment :-)

> > > But I do understand your concern. Would it be possible to instead do
> > > this as a proper selftests test? Do you mind taking a look at that?
> > Ack, will move this test_libbpf.c into selftests and convert back to
> > c++.
>
> --
> Regards,
> Ivan Khoronzhuk

\
 
 \ /
  Last update: 2019-11-23 01:02    [W:0.112 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site