Received: by 10.213.65.68 with SMTP id h4csp216938imn; Mon, 26 Mar 2018 19:44:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELvfOR/1zg2nsNLKI5eDqiaI1qTO85xkCYeOnqppOD/eNMbUfl2U7PSta1sEU1vv0iX5McZ2 X-Received: by 10.98.210.7 with SMTP id c7mr31328940pfg.92.1522118650714; Mon, 26 Mar 2018 19:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522118650; cv=none; d=google.com; s=arc-20160816; b=m9KnxdzEWeTuXh6EKPohqzE7RbeYgRD23FNPN293wQhQRvB+KKGeACJ/iHtF0L5BhL ffAJchhl6zX7du9Fi6f5Y19vAyGHQ+QmMWSpBw+8a3rdsaLqXI4BIg5MM6l6BYUcAMOu F6FC9iF8467e3v1XZsBIW+vVQEsZ3blowtLAA8dWvrvrWwmg/Cg9ENUpTtn/4nzMTF3s LG61cRx1ZMPFzkcoLaoAXRV8uRQsNyxydfHQGVD268saQawuiuwbNdndAHP6UA3GF1Y+ 7XfaCV3xPIB16NXt1yTWBj4V9V6U96MK5GsZp8LhaGLesQNVkuOS7TqdvUdb3qibqK/z 1MPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=3ENW/0HB/aji4xv0a9oQr6eOxtSlyk7UTFb1+yQj3K0=; b=YVS2nrmcAQe9SrJrnd1jxjxiYtkluxJg9Ju/7Vj7aVvP0qdDFvtysiGljfDg1q6ReZ IyftKe5UnmAYEtAq5Z2afxjt8dNA2SWa5KB72rA1G4+DolTLv/DL7P070NYpOJOFUMvV jPYmP9gfnte7/Qq7HVVNgd1vcPe+5ndUKfwmx1mgR9UhP1y7JyquFYgbEfHevlO9dPga jXg2OI6dOzlrvdz/8LgdYX7F54YKIG5QPmXM2pGlqTOyzfBLjc3Ui1yW/lPMEMrxrWqU nJA9DUKx0aGMJ2W5SA3Bnyl/LiT9Iwd+qbPQMTuIVaYzYFKqn8/ZFXE6cuGhNjjWA5iH x5VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12-v6si165782plt.606.2018.03.26.19.43.55; Mon, 26 Mar 2018 19:44:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbeC0Cmj (ORCPT + 99 others); Mon, 26 Mar 2018 22:42:39 -0400 Received: from mga03.intel.com ([134.134.136.65]:49056 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206AbeC0Cmh (ORCPT ); Mon, 26 Mar 2018 22:42:37 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2018 19:42:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,366,1517904000"; d="scan'208";a="27237409" Received: from gvt-dell.bj.intel.com (HELO intel.com) ([10.238.154.59]) by fmsmga007.fm.intel.com with SMTP; 26 Mar 2018 19:42:34 -0700 Date: Tue, 27 Mar 2018 10:33:16 +0800 From: "Du, Changbin" To: Alexei Starovoitov Cc: changbin.du@intel.com, shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Borkmann , netdev@vger.kernel.org Subject: Re: [PATCH 4/4] selftests/bpf: fix compiling errors Message-ID: <20180327023315.zjxrxfmhuzfqqpos@intel.com> References: <1522056208-4004-1-git-send-email-changbin.du@intel.com> <1522056208-4004-5-git-send-email-changbin.du@intel.com> <20180326145511.lzoi6wja6iht5lvq@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180326145511.lzoi6wja6iht5lvq@ast-mbp.dhcp.thefacebook.com> User-Agent: NeoMutt/20171027-42-ad8712 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Starovoitov, This one does have the issue you mentioned. [PATCH 2/4] selftests/gpio: fix paths in Makefile And can be fixed by: --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +OUTPUT ?= $(shell pwd) TEST_PROGS := gpio-mockup.sh TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) BINARIES := gpio-mockup-chardev @@ -24,7 +25,7 @@ LDLIBS += -lmount -I/usr/include/libmount $(BINARIES): gpio-utils.o ../../../../usr/include/linux/gpio.h gpio-utils.o: - make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio + make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) OUTPUT=$(OUTPUT)/ -C ../../../gpio ../../../../usr/include/linux/gpio.h: I will update it later. 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: > > From: Changbin Du > > > > This patch fixed below errors of missing head files. > > > > tools/testing/selftests$ make > > ... > > clang -I. -I./include/uapi -I../../../include/uapi -Wno-compare-distinct-pointer-types \ > > -O2 -target bpf -emit-llvm -c test_pkt_access.c -o - | \ > > llc -march=bpf -mcpu=generic -filetype=obj -o /home/changbin/work/linux/tools/testing/selftests/bpf//test_pkt_access.o > > In file included from test_pkt_access.c:9: > > In file included from ../../../include/uapi/linux/bpf.h:11: > > In file included from ./include/uapi/linux/types.h:5: > > /usr/include/asm-generic/int-ll64.h:11:10: fatal error: 'asm/bitsperlong.h' file not found > > #include > > ^ > > 1 error generated. > > clang -I. -I./include/uapi -I../../../include/uapi -Wno-compare-distinct-pointer-types \ > > -O2 -target bpf -emit-llvm -c test_xdp.c -o - | \ > > llc -march=bpf -mcpu=generic -filetype=obj -o /home/changbin/work/linux/tools/testing/selftests/bpf//test_xdp.o > > In file included from test_xdp.c:9: > > In file included from ../../../include/uapi/linux/bpf.h:11: > > In file included from ./include/uapi/linux/types.h:5: > > /usr/include/asm-generic/int-ll64.h:11:10: fatal error: 'asm/bitsperlong.h' file not found > > #include > > ^ > > 1 error generated. > > clang -I. -I./include/uapi -I../../../include/uapi -Wno-compare-distinct-pointer-types \ > > -O2 -target bpf -emit-llvm -c test_l4lb.c -o - | \ > > llc -march=bpf -mcpu=generic -filetype=obj -o /home/changbin/work/linux/tools/testing/selftests/bpf//test_l4lb.o > > In file included from test_l4lb.c:10: > > In file included from /usr/include/linux/pkt_cls.h:4: > > In file included from ./include/uapi/linux/types.h:5: > > /usr/include/asm-generic/int-ll64.h:11:10: fatal error: 'asm/bitsperlong.h' file not found > > #include > > ^ > > 1 error generated. > > clang -I. -I./include/uapi -I../../../include/uapi -Wno-compare-distinct-pointer-types \ > > -O2 -target bpf -emit-llvm -c test_tcp_estats.c -o - | \ > > llc -march=bpf -mcpu=generic -filetype=obj -o /home/changbin/work/linux/tools/testing/selftests/bpf//test_tcp_estats.o > > In file included from test_tcp_estats.c:35: > > In file included from ../../../include/uapi/linux/bpf.h:11: > > In file included from ./include/uapi/linux/types.h:5: > > /usr/include/asm-generic/int-ll64.h:11:10: fatal error: 'asm/bitsperlong.h' file not found > > #include > > ... > > > > Signed-off-by: Changbin Du > > --- > > 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. > -- Thanks, Changbin Du