Skip to contentSkip to conversation

tools build: Add BPF feature check to test-all

PATCH In review Wang Nan 2 participants 2 messages Dec 18, 2015

lore
Share & tools
lore

Wang Nan

author
#0 lore raw

PATCH 1/1 tools build: Add BPF feature check to test-all

Existing test-all.c doesn't check BPF related features. For environment with all other features enabled, BPF would be considered enabled without doing real feature check.

This patch adds test-bpf.c into test-all.c.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Jiri Olsa <[email protected]>
---
 tools/build/feature/test-all.c | 5 +++++
 1 file changed, 5 insertions(+)
tools/build/feature/test-all.c +5 -0
index 33cf6f2..81025ca 100644
@@ -125,6 +125,10 @@
 # include "test-get_cpuid.c"
 #undef main
 
+#define main main_test_bpf
+# include "test-bpf.c"
+#undef main
+
 int main(int argc, char *argv[])
 {
 	main_test_libpython();
@@ -153,6 +157,7 @@ int main(int argc, char *argv[])
 	main_test_pthread_attr_setaffinity_np();
 	main_test_lzma();
 	main_test_get_cpuid();
+	main_test_bpf();
 
 	return 0;
 }
Signature · 1 line
1.8.3.4
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Wang Nan

Existing test-all.c doesn't check BPF related features. For environment with all other features enabled, BPF would be considered enabled without doing real feature check.

This patch adds test-bpf.c into test-all.c.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Jiri Olsa <[email protected]>

nice catch ;-)

thanks,
jirka