summaryrefslogtreecommitdiff
path: root/test/socket
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-26 03:34:12 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-26 03:34:12 +0000
commit1413510ed2d8175dcce7c2c14c02e720c8406429 (patch)
treee91eb8fdd906f1ad20e6c0b686229ffff85f3b3b /test/socket
parent2bc4268e7900808b6965176a975c9d392a1239fa (diff)
* ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
path in sockaddr_un. (inspect_sockaddr): ditto. (addrinfo_mdump): ditto. (addrinfo_mload): ditto. (rsock_unixpath_str): new function. (rsock_unixpath): removed. (rsock_unixaddr): use rsock_unixpath_str. * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest path in sockaddr_un. (sock_s_unpack_sockaddr_un): ditto. (sock_s_gethostbyaddr): unused variable removed. * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest path in sockaddr_un. * ext/socket/rubysocket.h (rsock_unixpath_str): declared. (rsock_unixpath): removed. * test/socket/test_unix.rb: comment out test_nul because abstract unix sockets may contain NULs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r--test/socket/test_unix.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb
index a457ee5..1c5395e 100644
--- a/test/socket/test_unix.rb
+++ b/test/socket/test_unix.rb
@@ -339,9 +339,10 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
assert_raise(ArgumentError) { UNIXServer.new("a" * 300) }
end
- def test_nul
- assert_raise(ArgumentError) { Socket.sockaddr_un("a\0b") }
- end
+ #def test_nul
+ # # path may contain NULs for abstract unix sockets. [ruby-core:10288]
+ # assert_raise(ArgumentError) { Socket.sockaddr_un("a\0b") }
+ #end
def test_dgram_pair
s1, s2 = UNIXSocket.pair(Socket::SOCK_DGRAM)