Commit 8efa583f authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

test: Add a mock for writev



This is useful for testing partial sends in the socket layer.

Change-Id: Ib5bb62d641ad8d6a23a662261f7c72f5ba55c813
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470520


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 2872e958
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,4 +116,6 @@ DECLARE_WRAPPER(pthread_mutex_init, int,
DECLARE_WRAPPER(pthread_mutexattr_init, int,
		(pthread_mutexattr_t *attr));

DECLARE_WRAPPER(writev, ssize_t, (int fd, const struct iovec *iov, int iovcnt));

#endif /* SPDK_INTERNAL_MOCK_H */
+2 −0
Original line number Diff line number Diff line
@@ -41,3 +41,5 @@ DEFINE_WRAPPER(pthread_mutex_init, int,

DEFINE_WRAPPER(pthread_mutexattr_init, int,
	       (pthread_mutexattr_t *attr), (attr))

DEFINE_WRAPPER(writev, ssize_t, (int fd, const struct iovec *iov, int iovcnt), (fd, iov, iovcnt))
+2 −1
Original line number Diff line number Diff line
@@ -33,4 +33,5 @@
LDFLAGS += \
	-Wl,--wrap,calloc \
	-Wl,--wrap,pthread_mutexattr_init \
	-Wl,--wrap,pthread_mutex_init
	-Wl,--wrap,pthread_mutex_init \
	-Wl,--wrap,writev