Received: by 10.213.65.68 with SMTP id h4csp1458465imn; Mon, 26 Mar 2018 07:56:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELuHtbec0jYpaeMfLBM/jfiIyniWv+SwEtpVvp1TjIGKziPh0PEN0aNS69/L4rvJlZnPIpl6 X-Received: by 10.101.98.72 with SMTP id q8mr14284145pgv.338.1522076205680; Mon, 26 Mar 2018 07:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522076205; cv=none; d=google.com; s=arc-20160816; b=npMJhXzz6MI5jZixwPcDF7tBBZ/DK+F6OEMd6KH7eTGG88U+kbuJ0gyOTpf3WKatEL h6mvCGxjM87jdVSeAIJZs7S8ifUipm5/VHP64p2rCxRBLIHP30m3vQxuGI/gvV+wbZG/ dB+6K8T3G8nzV4E++wZ3dZSHoyj8sw6NTZo45/d7cHvi2D1kN3xXBiG2VayXcow6MbBb fn/ssnNQXF8ymL19LSJr8OPIw2/COcwi5yAcgbegPIOx8ZPw7auY8wz1v6HH50Jwr68g K+NEAHeLETjBS3MX/Y+oI1S8w5NuFw9BP7MAO0lGh83f31JGTOxZnDvF5jGNJSQVeKaQ bI/w== 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:dkim-signature:arc-authentication-results; bh=7VmhPKNGfRg7Wxy02EeVehG/aU/As92Aazn8Fv51Who=; b=S96bjMek+VGSaFe6iRoAmkkN4KkbzN9QTPxgp8p9vTx/3VdnhYjLwDpVrJ5gcuNKly t0OmNjGx/Dajptc6T5aZzoXmYFMh/QwTnYL61AUy8mT0oTkqWIXiegN7LLXr+DA8fOAM wpUjWof2LfxQ4v64G8233hl9RwDDud2WOc+novVODnlg5WUSkwYLw4DakiMFuL/Vgow+ ffyd2r+wgDkjhOdgnSW3Syars1iXqlzJPI/m2OrLvzAdCiepFU8izHMHfRT0ELPQUh/J vRZpcoUlBchu1x+Hxcbt6gQD0uTwiyAuKTOIX+XrELK4DfAadMYDk3pzCIoTyTOZdXkp JXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ei1YsAdP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y3-v6si15919687pln.209.2018.03.26.07.56.30; Mon, 26 Mar 2018 07:56:45 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ei1YsAdP; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752383AbeCZOzX (ORCPT + 99 others); Mon, 26 Mar 2018 10:55:23 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:45599 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbeCZOzR (ORCPT ); Mon, 26 Mar 2018 10:55:17 -0400 Received: by mail-pg0-f67.google.com with SMTP id y63so4221080pgy.12; Mon, 26 Mar 2018 07:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7VmhPKNGfRg7Wxy02EeVehG/aU/As92Aazn8Fv51Who=; b=Ei1YsAdP3yzM+UQB/6TfIK6QzNvGItJAeCoTsUN8t9wjoyqY6eaou7+u/ZT5xeV43W qXyStyPWuhPBKepx3ZKuzySlOvfuqUXocI854Zu5ifug4E9gU5+Z7J7mJ+0+gr7XNtdv KjVXf7I7rybYP0/PVc6OEly7e17r4Z45mv13asiKwE+bq+H0bmZbj9oAKVUaJWmkmXVQ QdqU4fQTV0uEQNKAAASSU4rLz2C72vs7HKuI/YoDS7BbV1eOFfskJ4qEmuxaUYtdret/ DpYKcwSOTuopkS1Eyxpfpkeax3beEFaOFJtgHO68XpwjIjdJImdoacz4mcdx7ZzZ5Fo7 bkpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7VmhPKNGfRg7Wxy02EeVehG/aU/As92Aazn8Fv51Who=; b=WvdfwoGU1gYUATJUQCndHPnloPsN8hJg9ycGIIONGe26z82nyP/1o2Rk02lMEzFHh7 NAwPj88rhmynHPsgRJDimxTNi0pWigJt5+lrj3CyBhll0J+hAgelwmG+kaIWhB30axH8 3ODLJaXmuV+o6A0BIIrKwkpBhKUWfQ4mCmWmbZ+XMlFtSwkxd7nYP2DnCT/CcrAD0SDY eIpWh7uwyjoc0VnFbr/p1nup86Skt9BYUZvDH5ndhtx3Zi0SFgocZ+j4BO/bA96k2+OY kNBS3AKOPo7Rv+uVB4XTpYzcRmvPVvLK+NyO5Is2HHCD1ieO26UfJCFiW8m7qoyAKNnc 2jnw== X-Gm-Message-State: AElRT7H0SJT0XQ5I7PK8H/WI6NodkDCTjjL3BDpnGDPk6fM3F+BIFJkw sLY+TxSUZ1jM8XmsiSoLMxs= X-Received: by 10.99.165.66 with SMTP id r2mr28748285pgu.452.1522076116901; Mon, 26 Mar 2018 07:55:16 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::6:3657]) by smtp.gmail.com with ESMTPSA id n27sm29274203pgc.40.2018.03.26.07.55.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Mar 2018 07:55:16 -0700 (PDT) Date: Mon, 26 Mar 2018 07:55:13 -0700 From: Alexei Starovoitov To: changbin.du@intel.com Cc: 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: <20180326145511.lzoi6wja6iht5lvq@ast-mbp.dhcp.thefacebook.com> References: <1522056208-4004-1-git-send-email-changbin.du@intel.com> <1522056208-4004-5-git-send-email-changbin.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522056208-4004-5-git-send-email-changbin.du@intel.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.