selftests/bpf: revamp test_progs to allow more control
[platform/kernel/linux-rpi.git] / tools / testing / selftests / bpf / Makefile
index bb66cc4..3bd0f4a 100644 (file)
@@ -239,14 +239,8 @@ $(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_FILES) | $(PROG_TESTS_H)
 $(PROG_TESTS_H): $(PROG_TESTS_FILES) | $(PROG_TESTS_DIR)
        $(shell ( cd prog_tests/; \
                  echo '/* Generated header, do not edit */'; \
-                 echo '#ifdef DECLARE'; \
                  ls *.c 2> /dev/null | \
-                       sed -e 's@\([^\.]*\)\.c@extern void test_\1(void);@'; \
-                 echo '#endif'; \
-                 echo '#ifdef CALL'; \
-                 ls *.c 2> /dev/null | \
-                       sed -e 's@\([^\.]*\)\.c@test_\1();@'; \
-                 echo '#endif' \
+                       sed -e 's@\([^\.]*\)\.c@DEFINE_TEST(\1)@'; \
                 ) > $(PROG_TESTS_H))
 
 MAP_TESTS_DIR = $(OUTPUT)/map_tests