summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-02-12 13:27:56 +0100
committerGitHub <noreply@github.com>2020-02-12 13:27:56 +0100
commit3cf5d3624f8b16351c74c64df6822aa12250163b (patch)
tree084c13505b2c7dd85a1be6930184c7449edd8c1e
parent5d657d4537d753b09f9cedce19f785c35eba2d80 (diff)
parent639c647427d8ac6ada0cf3e7cc2dfd8e3f15a55b (diff)
Merge pull request #12159 from vespa-engine/toregge/disable-linux-specific-socket-tests-on-non-linux-platform
Disable linux specific socket tests on non-linux platform.
-rw-r--r--vespalib/src/tests/net/socket/socket_test.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/vespalib/src/tests/net/socket/socket_test.cpp b/vespalib/src/tests/net/socket/socket_test.cpp
index 88146cd4fb2..08893c9273b 100644
--- a/vespalib/src/tests/net/socket/socket_test.cpp
+++ b/vespalib/src/tests/net/socket/socket_test.cpp
@@ -204,14 +204,6 @@ TEST_MT_FF("require that basic unix domain socket io works (path)", 2,
TEST_DO(verify_socket_io(is_server, socket));
}
-TEST_MT_FF("require that basic unix domain socket io works (name)", 2,
- ServerSocket(make_string("ipc/name:my_socket-%d", int(getpid()))), TimeBomb(60))
-{
- bool is_server = (thread_id == 0);
- SocketHandle socket = connect_sockets(is_server, f1);
- TEST_DO(verify_socket_io(is_server, socket));
-}
-
TEST_MT_FF("require that server accept can be interrupted", 2, ServerSocket("tcp/0"), TimeBomb(60)) {
bool is_server = (thread_id == 0);
if (is_server) {
@@ -279,6 +271,15 @@ TEST("require that a server socket will remove an old socket file if it cannot b
EXPECT_TRUE(!is_socket("my_socket"));
}
+#ifdef __linux__
+TEST_MT_FF("require that basic unix domain socket io works (name)", 2,
+ ServerSocket(make_string("ipc/name:my_socket-%d", int(getpid()))), TimeBomb(60))
+{
+ bool is_server = (thread_id == 0);
+ SocketHandle socket = connect_sockets(is_server, f1);
+ TEST_DO(verify_socket_io(is_server, socket));
+}
+
TEST("require that two server sockets cannot have the same abstract unix domain socket name") {
vespalib::string spec = make_string("ipc/name:my_socket-%d", int(getpid()));
ServerSocket server1(spec);
@@ -313,6 +314,7 @@ TEST_MT_FFF("require that abstract and file-based unix domain sockets are not in
SocketHandle socket = connect_sockets(is_server, server_socket);
TEST_DO(verify_socket_io(is_server, socket));
}
+#endif
TEST("require that sockets can be set blocking and non-blocking") {
SocketHandle handle(socket(my_inet(), SOCK_STREAM, 0));