summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.c1
-rw-r--r--tests/stubs.c9
-rw-r--r--tests/test.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/runner.c b/tests/runner.c
index db62246..972a56a 100644
--- a/tests/runner.c
+++ b/tests/runner.c
@@ -23,6 +23,7 @@ static const struct module modules[] = {{"scan_urlencoded_query", test_scan_urle
23 {"ot_buf", test_buf}, 23 {"ot_buf", test_buf},
24 {"ot_ip", test_ip}, 24 {"ot_ip", test_ip},
25 {"ot_socket", test_socket}, 25 {"ot_socket", test_socket},
26 {"ot_mutex", test_mutex},
26 {"ot_accesslist", test_accesslist}, 27 {"ot_accesslist", test_accesslist},
27 {NULL, NULL}}; 28 {NULL, NULL}};
28 29
diff --git a/tests/stubs.c b/tests/stubs.c
index ce93071..09a7312 100644
--- a/tests/stubs.c
+++ b/tests/stubs.c
@@ -18,3 +18,12 @@ void free_peerlist(ot_peerlist *peer_list) { (void)peer_list; }
18 neither of which any test drives. */ 18 neither of which any test drives. */
19time_t g_now_seconds; 19time_t g_now_seconds;
20volatile int g_opentracker_running; 20volatile int g_opentracker_running;
21
22/* ot_mutex.c wakes the main loop through the self pipe when a result is
23 ready. The queue tests never get that far. */
24int g_self_pipe[2] = {-1, -1};
25long io_trywrite(long d, const char *buf, long len) {
26 (void)d;
27 (void)buf;
28 return len;
29}
diff --git a/tests/test.h b/tests/test.h
index d79c4d2..9677524 100644
--- a/tests/test.h
+++ b/tests/test.h
@@ -86,5 +86,6 @@ void test_scan(void);
86void test_buf(void); 86void test_buf(void);
87void test_ip(void); 87void test_ip(void);
88void test_socket(void); 88void test_socket(void);
89void test_mutex(void);
89 90
90#endif 91#endif