Received: by 10.213.65.68 with SMTP id h4csp238010imn; Mon, 26 Mar 2018 20:23:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELsVyZFEnRPbHqygXtsHQSGjIBV9FZ74S3ukJbFolctMleYmUmoj06w6Fpe/6e1Hlawp1BGI X-Received: by 2002:a17:902:51ce:: with SMTP id y72-v6mr42614969plh.157.1522121009377; Mon, 26 Mar 2018 20:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522121009; cv=none; d=google.com; s=arc-20160816; b=gZ4uNO7x7mbTAa1Uz5Zuyga/KpagfveIVYnEPAHc45ct6jim3DOaK7nE4m0ZcpeswW jtFTI51QShsDoFIPYr5KU/QvdaQlAnBwUrCWdIM2X2/QoA94ni9+WwRmtr9pKUKbJRbe 8rhMFbfVYQL2a7NLD0AFXsxgtsbw5vmKKnCeK+gqfRYUBspWXQP7hPJGYH0v+u4ASt5E goJ8VdwJaHqe0GjLXeY+T5PdYUoV67igL/UMe780EN+fqzLVqKkuuBhgoIU9aBw0Ekhx r2haRpVoOyXufsqB2RBQ2lUz7n8LHOmZCxRshz0hKgIKnAc85VvNRLU3CpfvT7+5MC2y 77iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=hsPNHxOcgkpguEQRhTxJSUgeyNrNQNDgiFRuJm2xSDU=; b=xShRKxlQBnlPhRIsIrApW1/ZwareA5n1SfR45/AMUzFftQkYZZeYsbBXe4SxeuZ6XQ q0xK46HVUWWqW7djnJpSyd6SJR8uuWbrrmp1toX1d/hiGS+DV0FWcAdxJnYEADf1WTGa RDvSkdeXHLNjzHqJnxh9Fp4SOUdrLLg6qIIlDlhp2nowkW08nj3bRnKNis0mQvO2MgQo eYtqfqDlqN+to+D249/r2P8+VWC3pJX8IqY3jYGP8aflE7XlEZpJ+sGuF+8l8gAf1fi+ m1fNjQW+EV40ufZPF5Yo58SJgKxEpsOw/quQBsRkzMJuA/fPnCoK5PRqw2mxERl9A2iM 7fhA== 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 s61-v6si310336plb.16.2018.03.26.20.23.15; Mon, 26 Mar 2018 20:23:29 -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 S1752249AbeC0DV6 (ORCPT + 99 others); Mon, 26 Mar 2018 23:21:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:63675 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbeC0DVW (ORCPT ); Mon, 26 Mar 2018 23:21:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2018 20:21:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,366,1517904000"; d="scan'208";a="215125726" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.59]) by fmsmga005.fm.intel.com with ESMTP; 26 Mar 2018 20:21:21 -0700 From: changbin.du@intel.com To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v2 4/4] selftests/bpf: fix compiling errors Date: Tue, 27 Mar 2018 11:11:34 +0800 Message-Id: <1522120294-24926-5-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522120294-24926-1-git-send-email-changbin.du@intel.com> References: <1522120294-24926-1-git-send-email-changbin.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 $(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline -- 2.7.4