tools/net: Handle files which don't support sendfile
This adds a fallback read / write model.
Tested: ran against non-sendfile compatible file and it sent to the BMC successfully.
Change-Id: I6fd781ad19cd37376ca90743f799988e50ed460e
Signed-off-by: William A. Kennington III <wak@google.com>
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/tools/test/internal_sys_mock.hpp b/tools/test/internal_sys_mock.hpp
index fcd68bb..c45412d 100644
--- a/tools/test/internal_sys_mock.hpp
+++ b/tools/test/internal_sys_mock.hpp
@@ -31,6 +31,8 @@
MOCK_METHOD(int, socket, (int, int, int), (const override));
MOCK_METHOD(int, connect, (int, const struct sockaddr*, socklen_t),
(const override));
+ MOCK_METHOD(ssize_t, send, (int, const void*, size_t, int),
+ (const override));
MOCK_METHOD(ssize_t, sendfile, (int, int, off_t*, size_t),
(const override));
MOCK_METHOD(int, getaddrinfo,