test: Add a mock for writev
This is useful for testing partial sends in the socket layer. Change-Id: Ib5bb62d641ad8d6a23a662261f7c72f5ba55c813 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470520 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
2872e958c2
commit
8efa583f13
@ -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 */
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user