summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/socket_filesystem.cc
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-06-05 18:39:30 -0700
committerShentubot <shentubot@google.com>2019-06-05 18:40:37 -0700
commit57772db2e7351511de422baeecf807785709ee5d (patch)
tree6a20895b96b580dbfe76a9d8eeda67da71f58808 /test/syscalls/linux/socket_filesystem.cc
parenta12848ffebcc2e123f55d8ac805c5248d03a9055 (diff)
Shutdown host sockets on internal shutdown
This is required to make the shutdown visible to peers outside the sandbox. The readClosed / writeClosed fields were dropped, as they were preventing a shutdown socket from reading the remainder of queued bytes. The host syscalls will return the appropriate errors for shutdown. The control message tests have been split out of socket_unix.cc to make the (few) remaining tests accessible to testing inherited host UDS, which don't support sending control messages. Updates #273 PiperOrigin-RevId: 251763060
Diffstat (limited to 'test/syscalls/linux/socket_filesystem.cc')
-rw-r--r--test/syscalls/linux/socket_filesystem.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syscalls/linux/socket_filesystem.cc b/test/syscalls/linux/socket_filesystem.cc
index e38a320f6..74e262959 100644
--- a/test/syscalls/linux/socket_filesystem.cc
+++ b/test/syscalls/linux/socket_filesystem.cc
@@ -17,6 +17,7 @@
#include "test/syscalls/linux/socket_generic.h"
#include "test/syscalls/linux/socket_test_util.h"
#include "test/syscalls/linux/socket_unix.h"
+#include "test/syscalls/linux/socket_unix_cmsg.h"
#include "test/syscalls/linux/unix_domain_socket_test_util.h"
#include "test/util/test_util.h"
@@ -38,5 +39,9 @@ INSTANTIATE_TEST_SUITE_P(
FilesystemUnixSockets, UnixSocketPairTest,
::testing::ValuesIn(IncludeReversals(GetSocketPairs())));
+INSTANTIATE_TEST_SUITE_P(
+ FilesystemUnixSockets, UnixSocketPairCmsgTest,
+ ::testing::ValuesIn(IncludeReversals(GetSocketPairs())));
+
} // namespace testing
} // namespace gvisor