summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
authorBenjamin Fair <benjaminfair@google.com>2019-10-11 17:55:27 -0700
committerBenjamin Fair <benjaminfair@google.com>2019-11-21 15:09:48 -0800
commitf7ccadb0a1bd074d731244d45cf9e1b45a27e2f6 (patch)
tree95fdb3806b82ab4a2a1bd0d8a29114b13deef866 /tools/test
parent545f5658305a807dbfe0105a62a8b0cfe42e1808 (diff)
downloadphosphor-ipmi-flash-f7ccadb0a1bd074d731244d45cf9e1b45a27e2f6.tar.gz
phosphor-ipmi-flash-f7ccadb0a1bd074d731244d45cf9e1b45a27e2f6.zip
sys: add networking functions
Add networking related functions to the syscall wrapper. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I0ccb4138963ce2a8c7bb6f6f3a556de1afcd0c08
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/internal_sys_mock.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/test/internal_sys_mock.hpp b/tools/test/internal_sys_mock.hpp
index ce37d91..97f95bf 100644
--- a/tools/test/internal_sys_mock.hpp
+++ b/tools/test/internal_sys_mock.hpp
@@ -26,6 +26,13 @@ class InternalSysMock : public Sys
MOCK_CONST_METHOD0(getpagesize, int());
MOCK_CONST_METHOD3(ioctl, int(int, unsigned long, void*));
MOCK_CONST_METHOD3(poll, int(struct pollfd*, nfds_t, int));
+ MOCK_CONST_METHOD3(socket, int(int, int, int));
+ MOCK_CONST_METHOD3(connect, int(int, const struct sockaddr*, socklen_t));
+ MOCK_CONST_METHOD4(sendfile, ssize_t(int, int, off_t*, size_t));
+ MOCK_CONST_METHOD4(getaddrinfo,
+ int(const char*, const char*, const struct addrinfo*,
+ struct addrinfo**));
+ MOCK_CONST_METHOD1(freeaddrinfo, void(struct addrinfo*));
MOCK_CONST_METHOD1(getSize, std::int64_t(const char*));
};
OpenPOWER on IntegriCloud