diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-15 13:30:26 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-15 13:30:26 -0800 |
commit | 48dc3c5a1943801311567e72a8e69fcb0cd8cf8d (patch) | |
tree | b0179df3da2b0c7392ef8a7efb44cd30fc2a3518 /test | |
parent | a1a648fe905808ffa902c44ba7626e3b3eeda627 (diff) | |
download | kgio-48dc3c5a1943801311567e72a8e69fcb0cd8cf8d.tar.gz |
There's no point in testing a Ruby implementation detail and these tests fail under OpenBSD where the accept()-ed socket inherits the O_NONBLOCK flag from the parent.
Diffstat (limited to 'test')
-rw-r--r-- | test/lib_server_accept.rb | 2 | ||||
-rw-r--r-- | test/test_accept_flags.rb | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/test/lib_server_accept.rb b/test/lib_server_accept.rb index 6ea461b..ccf89d8 100644 --- a/test/lib_server_accept.rb +++ b/test/lib_server_accept.rb @@ -25,7 +25,6 @@ module LibServerAccept IO.select([@srv]) b = @srv.kgio_tryaccept nil, 0 assert_kind_of Kgio::Socket, b - assert_equal false, b.nonblock? assert_equal 0, b.fcntl(Fcntl::F_GETFD) end @@ -34,7 +33,6 @@ module LibServerAccept IO.select([@srv]) b = @srv.kgio_accept nil, 0 assert_kind_of Kgio::Socket, b - assert_equal false, b.nonblock? assert_equal 0, b.fcntl(Fcntl::F_GETFD) end diff --git a/test/test_accept_flags.rb b/test/test_accept_flags.rb index 3aae216..0f21adf 100644 --- a/test/test_accept_flags.rb +++ b/test/test_accept_flags.rb @@ -13,7 +13,6 @@ class TestAcceptFlags < Test::Unit::TestCase client = TCPSocket.new(@host, @port) accepted = @srv.kgio_accept(nil, Kgio::SOCK_NONBLOCK) assert_instance_of Kgio::Socket, accepted - assert accepted.nonblock? flags = accepted.fcntl(Fcntl::F_GETFD) assert_equal 0, flags & Fcntl::FD_CLOEXEC assert_nil client.close @@ -22,7 +21,6 @@ class TestAcceptFlags < Test::Unit::TestCase client = TCPSocket.new(@host, @port) accepted = @srv.kgio_accept(nil, Kgio::SOCK_CLOEXEC) assert_instance_of Kgio::Socket, accepted - assert ! accepted.nonblock? flags = accepted.fcntl(Fcntl::F_GETFD) assert_equal Fcntl::FD_CLOEXEC, flags & Fcntl::FD_CLOEXEC assert_nil client.close @@ -31,7 +29,6 @@ class TestAcceptFlags < Test::Unit::TestCase client = TCPSocket.new(@host, @port) accepted = @srv.kgio_accept(nil, Kgio::SOCK_CLOEXEC|Kgio::SOCK_NONBLOCK) assert_instance_of Kgio::Socket, accepted - assert accepted.nonblock? flags = accepted.fcntl(Fcntl::F_GETFD) assert_equal Fcntl::FD_CLOEXEC, flags & Fcntl::FD_CLOEXEC assert_nil client.close @@ -40,7 +37,6 @@ class TestAcceptFlags < Test::Unit::TestCase client = TCPSocket.new(@host, @port) accepted = @srv.kgio_accept(nil, Kgio::SOCK_CLOEXEC|Kgio::SOCK_NONBLOCK) assert_instance_of Kgio::Socket, accepted - assert accepted.nonblock? flags = accepted.fcntl(Fcntl::F_GETFD) assert_equal Fcntl::FD_CLOEXEC, flags & Fcntl::FD_CLOEXEC assert_nil client.close |