diff --git a/test/unit/lib/sock/sock.c/sock_ut.c b/test/unit/lib/sock/sock.c/sock_ut.c index bbe4822d7..877dbaf4b 100644 --- a/test/unit/lib/sock/sock.c/sock_ut.c +++ b/test/unit/lib/sock/sock.c/sock_ut.c @@ -41,6 +41,8 @@ #include "sock/sock.c" #include "sock/posix/posix.c" +#include "spdk_internal/mock.h" + #define UT_IP "test_ip" #define UT_PORT 1234 @@ -67,6 +69,33 @@ struct spdk_ut_sock_group_impl { #define __ut_sock(sock) (struct spdk_ut_sock *)sock #define __ut_group(group) (struct spdk_ut_sock_group_impl *)group +DEFINE_STUB(spdk_json_write_array_begin, int, + (struct spdk_json_write_ctx *w), 0); + +DEFINE_STUB(spdk_json_write_object_begin, int, + (struct spdk_json_write_ctx *w), 0); + +DEFINE_STUB(spdk_json_write_named_string, int, + (struct spdk_json_write_ctx *w, const char *name, + const char *val), 0); + +DEFINE_STUB(spdk_json_write_named_object_begin, int, + (struct spdk_json_write_ctx *w, const char *name), 0); + +DEFINE_STUB(spdk_json_write_named_uint32, int, + (struct spdk_json_write_ctx *w, const char *name, uint32_t val), + 0); + +DEFINE_STUB(spdk_json_write_named_bool, int, + (struct spdk_json_write_ctx *w, const char *name, bool val), + 0); + +DEFINE_STUB(spdk_json_write_object_end, int, + (struct spdk_json_write_ctx *w), 0); + +DEFINE_STUB(spdk_json_write_array_end, int, + (struct spdk_json_write_ctx *w), 0); + static int spdk_ut_sock_getaddr(struct spdk_sock *_sock, char *saddr, int slen, uint16_t *sport, char *caddr, int clen, uint16_t *cport)