diff options
author | Max <msuraev@sysmocom.de> | 2022-07-27 21:13:09 +0700 |
---|---|---|
committer | msuraev <msuraev@sysmocom.de> | 2022-08-01 13:53:37 +0000 |
commit | 3948fcc4760f096f41ac00679e38d47bcb7ba2d5 (patch) | |
tree | 2a7b24918ca56db38a48a03380e571c2d061daf9 | |
parent | 1470d0b870c26cb2e0c6e1766f4a5a2133171e56 (diff) |
tests: use common stubs for SMS queue test
Related: OS#5568
Change-Id: Ic854eb919e6fcc82bd0245f62c72985b938c6b7a
-rw-r--r-- | tests/sms_queue/Makefile.am | 2 | ||||
-rw-r--r-- | tests/sms_queue/sms_queue_test.c | 21 | ||||
-rw-r--r-- | tests/stubs.c | 2 |
3 files changed, 4 insertions, 21 deletions
diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am index daf056ab5..c83a9469c 100644 --- a/tests/sms_queue/Makefile.am +++ b/tests/sms_queue/Makefile.am @@ -12,6 +12,7 @@ AM_CFLAGS = \ $(LIBOSMOABIS_CFLAGS) \ $(LIBOSMOSIGTRAN_CFLAGS) \ $(LIBOSMORANAP_CFLAGS) \ + $(LIBOSMONETIF_CFLAGS) \ $(LIBASN1C_CFLAGS) \ $(LIBOSMOMGCPCLIENT_CFLAGS) \ $(LIBOSMOGSUPCLIENT_CFLAGS) \ @@ -29,6 +30,7 @@ check_PROGRAMS = \ sms_queue_test_SOURCES = \ sms_queue_test.c \ + $(srcdir)/../stubs.c \ $(NULL) sms_queue_test_LDADD = \ diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c index f681657aa..cc78e1491 100644 --- a/tests/sms_queue/sms_queue_test.c +++ b/tests/sms_queue/sms_queue_test.c @@ -277,24 +277,3 @@ int main(int argc, char **argv) return 0; } - -void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data) {} -struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv) { return NULL; } -void osmo_stream_srv_destroy(struct osmo_stream_srv *conn) {} -struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, - int fd, int (*cb)(struct osmo_stream_srv *conn), - int (*closed_cb)(struct osmo_stream_srv *conn), - void *data) { return NULL; } -void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg) {} -void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto) {} -struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link) { return NULL; } -struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx) { return NULL; } -void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn) { return NULL; } -void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay) {} -void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb) - (struct osmo_stream_srv_link *link, int fd)) {} -int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link) { return 0; } -void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link) { return NULL; } -void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port) {} -void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) {} -int sctp_recvmsg(int sd, void *msg, size_t len, void *from, void *fromlen, void *info, int *msg_flags) { return 0; } diff --git a/tests/stubs.c b/tests/stubs.c index d011a312a..e6ef548cc 100644 --- a/tests/stubs.c +++ b/tests/stubs.c @@ -37,7 +37,9 @@ void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool no void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb) (struct osmo_stream_srv_link *link, int fd)) {} int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link) { return 0; } +void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link) {} void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link) { return NULL; } +char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link *link) { return NULL; } void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port) {} void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) {} int sctp_recvmsg(int sd, void *msg, size_t len, void *from, void *fromlen, void *info, int *msg_flags) { return 0; } |