summaryrefslogtreecommitdiff
path: root/tools/perf/tests/llvm.c
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2015-11-06 16:49:42 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-11-06 23:49:50 +0300
commit7af3f3d55b80cce40ad94b6b8e173dccedaf25e6 (patch)
tree07c5b8794f085dd6e1dd230604de6d2f327753f7 /tools/perf/tests/llvm.c
parentb31de018a6284a25e0fdfeb028e724f8417ec3b1 (diff)
downloadlinux-7af3f3d55b80cce40ad94b6b8e173dccedaf25e6.tar.xz
perf test: Enhance the LLVM tests: add kbuild test
This patch adds a kbuild testcase to check whether kernel headers can be correctly found. For example: # mv /lib/modules/4.3.0-rc5{,.bak} # perf test LLVM 38: Test LLVM searching and compiling : Skip # perf test -v LLVM ... <stdin>:11:10: fatal error: 'uapi/linux/fs.h' file not found #include <uapi/linux/fs.h> ^ 1 error generated. ERROR: unable to compile - Hint: Check error message shown above. Hint: You can also pre-compile it into .o using: clang -target bpf -O2 -c - with proper -I and -D options. Failed to compile test case: 'Test kbuild searching' test child finished with -2 Signed-off-by: Wang Nan <wangnan0@huawei.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1446817783-86722-7-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/llvm.c')
-rw-r--r--tools/perf/tests/llvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/llvm.c b/tools/perf/tests/llvm.c
index 05683c5f183e..bc4cf507cde5 100644
--- a/tools/perf/tests/llvm.c
+++ b/tools/perf/tests/llvm.c
@@ -40,6 +40,10 @@ static struct {
.source = test_llvm__bpf_base_prog,
.desc = "Basic BPF llvm compiling test",
},
+ [LLVM_TESTCASE_KBUILD] = {
+ .source = test_llvm__bpf_test_kbuild_prog,
+ .desc = "Test kbuild searching",
+ },
};