diff options
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.h')
-rw-r--r-- | tools/testing/selftests/bpf/test_progs.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h index afd14962456f..37d427f5a1e5 100644 --- a/tools/testing/selftests/bpf/test_progs.h +++ b/tools/testing/selftests/bpf/test_progs.h | |||
@@ -56,9 +56,10 @@ struct test_env { | |||
56 | bool jit_enabled; | 56 | bool jit_enabled; |
57 | 57 | ||
58 | struct prog_test_def *test; | 58 | struct prog_test_def *test; |
59 | FILE *stdout; | ||
60 | FILE *stderr; | ||
59 | char *log_buf; | 61 | char *log_buf; |
60 | size_t log_cnt; | 62 | size_t log_cnt; |
61 | size_t log_cap; | ||
62 | 63 | ||
63 | int succ_cnt; /* successful tests */ | 64 | int succ_cnt; /* successful tests */ |
64 | int sub_succ_cnt; /* successful sub-tests */ | 65 | int sub_succ_cnt; /* successful sub-tests */ |
@@ -69,8 +70,6 @@ extern int error_cnt; | |||
69 | extern int pass_cnt; | 70 | extern int pass_cnt; |
70 | extern struct test_env env; | 71 | extern struct test_env env; |
71 | 72 | ||
72 | extern void test__printf(const char *fmt, ...); | ||
73 | extern void test__vprintf(const char *fmt, va_list args); | ||
74 | extern void test__force_log(); | 73 | extern void test__force_log(); |
75 | extern bool test__start_subtest(const char *name); | 74 | extern bool test__start_subtest(const char *name); |
76 | 75 | ||
@@ -96,12 +95,12 @@ extern struct ipv6_packet pkt_v6; | |||
96 | int __ret = !!(condition); \ | 95 | int __ret = !!(condition); \ |
97 | if (__ret) { \ | 96 | if (__ret) { \ |
98 | error_cnt++; \ | 97 | error_cnt++; \ |
99 | test__printf("%s:FAIL:%s ", __func__, tag); \ | 98 | printf("%s:FAIL:%s ", __func__, tag); \ |
100 | test__printf(format); \ | 99 | printf(format); \ |
101 | } else { \ | 100 | } else { \ |
102 | pass_cnt++; \ | 101 | pass_cnt++; \ |
103 | test__printf("%s:PASS:%s %d nsec\n", \ | 102 | printf("%s:PASS:%s %d nsec\n", \ |
104 | __func__, tag, duration); \ | 103 | __func__, tag, duration); \ |
105 | } \ | 104 | } \ |
106 | __ret; \ | 105 | __ret; \ |
107 | }) | 106 | }) |