From 3f30658830f3a133ba2136237ea9c8e589344a3b Mon Sep 17 00:00:00 2001 From: Stanislav Fomichev Date: Fri, 1 Mar 2019 19:42:13 -0800 Subject: selftests: bpf: break up test_progs - preparations Add new prog_tests directory where tests are supposed to land. Each prog_tests/.c is expected to have a global function with signature 'void test_(void)'. Makefile automatically generates prog_tests/tests.h file with entry for each prog_tests file: #ifdef DECLARE extern void test_(void); ... #endif #ifdef CALL test_(); ... #endif prog_tests/tests.h is included in test_progs.c in two places with appropriate defines. This scheme allows us to move each function with a separate patch without breaking anything. Compared to the recent verifier split, each separate file here is a compilation unit and test_progs.[ch] is now used as a place to put some common routines that might be used by multiple tests. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/prog_tests/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/testing/selftests/bpf/prog_tests/.gitignore (limited to 'tools/testing/selftests/bpf/prog_tests/.gitignore') diff --git a/tools/testing/selftests/bpf/prog_tests/.gitignore b/tools/testing/selftests/bpf/prog_tests/.gitignore new file mode 100644 index 000000000000..45984a364647 --- /dev/null +++ b/tools/testing/selftests/bpf/prog_tests/.gitignore @@ -0,0 +1 @@ +tests.h -- cgit v1.2.3-55-g7522