summaryrefslogtreecommitdiff
path: root/tests/stubs.c
blob: febdd7baeb53eb4c22e0c771bd915b39079e9bd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
   It is considered beerware. Prost. Skol. Cheers or whatever.

   $id$ */

/* Stubs for symbols the modules under test reference but never reach along
   the paths the tests exercise. If a test ever does reach one, the missing
   behaviour should be supplied here rather than the test weakened. */

/* Opentracker */
#include "trackerlogic.h"

/* ot_vector.c calls this from vector_clean_list, which no test drives yet. */
void free_peerlist(ot_peerlist *peer_list) { (void)peer_list; }

/* ot_accesslist.c is built with WANT_ACCESSLIST_BLACK so that the hash parser
   is reachable. These four belong to accesslist_readfile and the reload
   worker, neither of which any test drives. */
time_t      g_now_seconds;
volatile int g_opentracker_running;

const char *mmap_read(const char *filename, size_t *filesize);
const char *mmap_read(const char *filename, size_t *filesize) {
  (void)filename;
  *filesize = 0;
  return NULL;
}

int         mmap_unmap(const char *mapped, size_t maplen);
int         mmap_unmap(const char *mapped, size_t maplen) {
  (void)mapped;
  (void)maplen;
  return 0;
}