summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-06-05 10:48:47 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-06-05 10:48:47 +0900
commite17028e48bcddaef2fb6ded37e8f104886120465 (patch)
tree42cf71cffb4850ea9d9051c2b71fa1fc24e28b19 /test/net
parent449b62ba0115fbe054e8f5e3a36f849e47e0f4a1 (diff)
Add sockets to debug print
debug print does not include `in_tcp_socket_2`, so I think other socket connected to server socket. Add sockets to debug print, and check other socket is in same process or not. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200604T160009Z.fail.html.gz ``` 1) Failure: IMAPTest#test_connection_closed_without_greeting [/export/home/chkbuild/chkbuild-gcc/tmp/build/20200604T160009Z/ruby/test/net/imap/test_imap.rb:523]: [Net::IMAP::Error] exception expected, not #<RuntimeError: {:server=>#<TCPServer:(closed)>, :port=>35490, :server_created=> {:server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.30510591}, :in_start_server_before_accept=>{:t=>45917010.305154555}, :in_tcp_socket=> {:host=>"::1", :port=>35490, :server=>"#<TCPServer:fd 10, AF_INET6, ::1, 35490>", :t=>45917010.40560127}, :in_start_server=> {:sock_addr=>["AF_INET6", 35490, "::1", "::1"], :sock_peeraddr=>["AF_INET6", 51584, "::1", "::1"], :t=>45917010.40767231}, :in_start_server_sock_closed=>{:t=>45917010.40770047}, :in_rescue=> {:e=>#<Errno::EINVAL: Invalid argument - connect(2) for [::1]:35490>, :server_addr=>"::1", :t=>45917010.40867455}} >. ```
Diffstat (limited to 'test/net')
-rw-r--r--test/net/imap/test_imap.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
index 6c6a657..9561fd5 100644
--- a/test/net/imap/test_imap.rb
+++ b/test/net/imap/test_imap.rb
@@ -511,6 +511,7 @@ class IMAPTest < Test::Unit::TestCase
sock_addr: sock.addr,
sock_peeraddr: sock.peeraddr,
t: Process.clock_gettime(Process::CLOCK_MONOTONIC),
+ sockets: ObjectSpace.each_object(BasicSocket).map{|s| [s.inspect, connect_address: s.connect_address.inspect, local_address: s.local_address.inspect, remote_address: (s.remote_address rescue nil).inspect] },
}
sock.close
h[:in_start_server_sock_closed] = {