|
|
@ -30,14 +30,14 @@ char *version_and_exit(const void *unused UNNEEDED) |
|
|
|
{ fprintf(stderr, "version_and_exit called!\n"); abort(); } |
|
|
|
/* AUTOGENERATED MOCKS END */ |
|
|
|
|
|
|
|
int test_socket(int domain, int type, int protocol) |
|
|
|
int test_socket(int domain UNUSED, int type UNUSED, int protocol UNUSED) |
|
|
|
{ |
|
|
|
/* We give a real fd, as it writes to it */ |
|
|
|
return open("/dev/null", O_WRONLY); |
|
|
|
} |
|
|
|
|
|
|
|
int test_connect(int sockfd, const struct sockaddr *addr, |
|
|
|
socklen_t addrlen) |
|
|
|
int test_connect(int sockfd UNUSED, const struct sockaddr *addr UNUSED, |
|
|
|
socklen_t addrlen UNUSED) |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
@ -47,7 +47,7 @@ int test_getpid(void) |
|
|
|
return 9999; |
|
|
|
} |
|
|
|
|
|
|
|
int test_printf(const char *fmt, ...) |
|
|
|
int test_printf(const char *fmt UNUSED, ...) |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
@ -55,7 +55,7 @@ int test_printf(const char *fmt, ...) |
|
|
|
static char *response; |
|
|
|
static size_t response_off, max_read_return; |
|
|
|
|
|
|
|
ssize_t test_read(int fd, void *buf, size_t len) |
|
|
|
ssize_t test_read(int fd UNUSED, void *buf, size_t len) |
|
|
|
{ |
|
|
|
if (len > max_read_return) |
|
|
|
len = max_read_return; |
|
|
@ -82,7 +82,7 @@ ssize_t test_read(int fd, void *buf, size_t len) |
|
|
|
" {\"type\": \"DEBUG\", \"time\": \"241693.051558854\", \"source\": \"lightning_gossipd(14581):\", \"log\": \"TRACE: nonlocal_gossip_broadcast_done\"},\n" |
|
|
|
#define TAILER "] } }" |
|
|
|
|
|
|
|
int main(int argc, char *argv[]) |
|
|
|
int main(int argc UNUSED, char *argv[]) |
|
|
|
{ |
|
|
|
char *fake_argv[] = { argv[0], "--lightning-dir=/tmp/", "test", NULL }; |
|
|
|
|
|
|
|