Netdev List
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Du, Changbin" <changbin.du@intel.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: shuah@kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 4/4] selftests/bpf: fix compiling errors
Date: Tue, 27 Mar 2018 10:52:57 +0200	[thread overview]
Message-ID: <2dd7c04a-eb10-e730-148e-3b04a18e9b44@iogearbox.net> (raw)
In-Reply-To: <20180327030613.hkp7hox3g4prnbsg@intel.com>

On 03/27/2018 05:06 AM, Du, Changbin wrote:
> On Mon, Mar 26, 2018 at 08:02:30PM -0700, Alexei Starovoitov wrote:
>> On Tue, Mar 27, 2018 at 10:20:10AM +0800, Du, Changbin wrote:
>>> On Mon, Mar 26, 2018 at 07:55:13AM -0700, Alexei Starovoitov wrote:
>>>> On Mon, Mar 26, 2018 at 05:23:28PM +0800, changbin.du@intel.com wrote:
>>>>> Signed-off-by: Changbin Du <changbin.du@intel.com>
>>>>> ---
>>>>>  tools/testing/selftests/bpf/Makefile | 5 +++--
>>>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
>>>>> index 5c43c18..dc0fdc8 100644
>>>>> --- a/tools/testing/selftests/bpf/Makefile
>>>>> +++ b/tools/testing/selftests/bpf/Makefile
>>>>> @@ -10,7 +10,8 @@ ifneq ($(wildcard $(GENHDR)),)
>>>>>    GENFLAGS := -DHAVE_GENHDR
>>>>>  endif
>>>>>  
>>>>> -CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include
>>>>> +CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(GENDIR) $(GENFLAGS) \
>>>>> +	  -I../../../include -I../../../../usr/include
>>>>>  LDLIBS += -lcap -lelf -lrt -lpthread
>>>>>  
>>>>>  # Order correspond to 'make run_tests' order
>>>>> @@ -62,7 +63,7 @@ else
>>>>>    CPU ?= generic
>>>>>  endif
>>>>>  
>>>>> -CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
>>>>> +CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi -I../../../../usr/include \
>>>>>  	      -Wno-compare-distinct-pointer-types
>>>>
>>>> Nack.
>>>> I suspect that will break the build for everyone else who's doing it in the directory
>>>> itself instead of the outer one.
>>>
>>> This one? But I didn't see any problem.
>>
>> because the build was lucky and additional path ../../../../usr/include didn't point
>> to a valid dir?

Agree.

> I am sorry but I don't understand why you mean *lucky*. Of cause, the path is valid.

The problem is that this suddenly requires users to do a 'make headers_install' in
order to populate usr/include/ directory in the first place. While it's annoying
enough for BPF samples where this is needed, I absolutely don't want to introduce
this for BPF kselftests. It's the wrong approach. Besides, in tools infra, there is
a tools/arch/*/include/uapi/asm/bitsperlong.h header copy already, so we really need
to use that instead. Please adapt your patch accordingly and respin. Please also Cc
us and netdev@vger.kernel.org for BPF kselftests changes.

Thanks,
Daniel

  reply	other threads:[~2018-03-27  8:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1522056208-4004-1-git-send-email-changbin.du@intel.com>
     [not found] ` <1522056208-4004-5-git-send-email-changbin.du@intel.com>
2018-03-26 14:55   ` [PATCH 4/4] selftests/bpf: fix compiling errors Alexei Starovoitov
2018-03-27  2:20     ` Du, Changbin
2018-03-27  3:02       ` Alexei Starovoitov
2018-03-27  3:06         ` Du, Changbin
2018-03-27  8:52           ` Daniel Borkmann [this message]
2018-03-27  9:00             ` Du, Changbin
2018-03-27  9:52               ` Daniel Borkmann
2018-03-27 10:19                 ` Du, Changbin
2018-03-27  2:33     ` Du, Changbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2dd7c04a-eb10-e730-148e-3b04a18e9b44@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=changbin.du@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox