diff options
author | Rahat Mahmood <rahat@google.com> | 2019-06-13 17:23:35 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-06-13 17:24:51 -0700 |
commit | 05ff1ffaadaa0ac370365eb14febc761506735ce (patch) | |
tree | e6505afe1536c60c7a2e362aa8355e01ec34f91a /test/syscalls/linux/socket_test_util.cc | |
parent | 7b0f068258146b4081060ae793ba6b73399f1452 (diff) |
Implement getsockopt() SO_DOMAIN, SO_PROTOCOL and SO_TYPE.
SO_TYPE was already implemented for everything but netlink sockets.
PiperOrigin-RevId: 253138157
Diffstat (limited to 'test/syscalls/linux/socket_test_util.cc')
-rw-r--r-- | test/syscalls/linux/socket_test_util.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/syscalls/linux/socket_test_util.cc b/test/syscalls/linux/socket_test_util.cc index da69de37c..4f65cf5ae 100644 --- a/test/syscalls/linux/socket_test_util.cc +++ b/test/syscalls/linux/socket_test_util.cc @@ -457,7 +457,8 @@ Creator<SocketPair> UDPUnboundSocketPairCreator(int domain, int type, SocketPairKind Reversed(SocketPairKind const& base) { auto const& creator = base.creator; return SocketPairKind{ - absl::StrCat("reversed ", base.description), + absl::StrCat("reversed ", base.description), base.domain, base.type, + base.protocol, [creator]() -> PosixErrorOr<std::unique_ptr<ReversedSocketPair>> { ASSIGN_OR_RETURN_ERRNO(auto creator_value, creator()); return absl::make_unique<ReversedSocketPair>(std::move(creator_value)); @@ -542,8 +543,8 @@ struct sockaddr_storage AddrFDSocketPair::to_storage(const sockaddr_in6& addr) { SocketKind SimpleSocket(int fam, int type, int proto) { return SocketKind{ - absl::StrCat("Family ", fam, ", type ", type, ", proto ", proto), - SyscallSocketCreator(fam, type, proto)}; + absl::StrCat("Family ", fam, ", type ", type, ", proto ", proto), fam, + type, proto, SyscallSocketCreator(fam, type, proto)}; } ssize_t SendLargeSendMsg(const std::unique_ptr<SocketPair>& sockets, |