[#44469] [Ruby 1.9 - Bug #5279][Open] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — Shota Fukumori <sorah@...>

21 messages 2011/09/06
[#44471] [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — Shota Fukumori <sorah@...> 2011/09/06

[#44472] Re: [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — "NARUSE, Yui" <naruse@...> 2011/09/06

2011年9月6日11:02 Shota Fukumori <[email protected]>:

[#44473] Re: [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — "Shota Fukumori (sora_h)" <sorah@...> 2011/09/06

じゃぁ,大丈夫かな.

[#44474] Re: [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — Kazuhiko <kazuhiko@...> 2011/09/06

On 06/09/2011 06:10, Shota Fukumori (sora_h) wrote:

[#44541] Re: [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — Kazuhiko <kazuhiko@...> 2011/09/24

かずひこです。

[#44549] Re: [Ruby 1.9 - Bug #5279] $SAFEが3以上の時にString#encodeがSecurityErrorを発生させるケースがある — KOSAKI Motohiro <kosaki.motohiro@...> 2011/09/26

> かずひこです。

[#44491] [Ruby 1.9 - Feature #5314][Open] パッケージマネージャをコアリリースに含めて欲しい — Taro MURAOKA <koron.kaoriya@...>

13 messages 2011/09/13

[#44506] [Ruby 1.9 - Feature #5317][Open] rubyのヘッダファイルを使った拡張を行う際にuid_tの宣言回避をする事が出来ない。 — Yasuhiro Matsumoto <mattn.jp@...>

9 messages 2011/09/13

[#44520] [Ruby 1.9 - Bug #5350][Open] WeakRef で謎の NoMethodError — Makoto Kishimoto <redmine@...>

20 messages 2011/09/21

[#44542] [Ruby 1.9 - Bug #5363][Open] OpenSSL::ASN1.decode_all の引数に PEM 形式の証明書を指定すると Segmentation fault が発生する — Hiroshi Yoshida <hexa.diary@...>

8 messages 2011/09/25

[#44546] [Ruby 1.9 - Bug #5368][Open] ensure節でsleepするようなThreadがあるとインタプリタが終了しない — Masaki Matsushita <glass.saga@...>

22 messages 2011/09/26

[ruby-dev:44487] [Ruby 1.9 - Bug #5151] test/socket/test_socket.rb fail when udp connection failed

From: Ayumu AIZAWA <ayumu.aizawa@...>
Date: 2011-09-10 14:17:08 UTC
List: ruby-dev #44487
Issue #5151 has been updated by Ayumu AIZAWA.


あいざわです。

SnowLeopard に固有の問題かと思ったのですが、友人の協力を得て別のマシンでテストしたところ再現しませんでした。
何が原因なんだろうか ... チェックすべき設定などあったらご教示いただけませんでしょうか。

$ make test-all TESTS='-v test/socket/test_socket.rb'
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext
-- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I.
-I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -v
test/socket/test_socket.rb
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common
./tool/runruby.rb --extout=.ext  -- --disable-gems" -v

# Running tests:

TestSocket#test_accept_loop = 0.00 s = .
TestSocket#test_accept_loop_multi_port = 0.00 s = .
TestSocket#test_accept_loop_with_unix = 0.00 s = .
TestSocket#test_bintime = 0.00 s = .
TestSocket#test_closed_read = 0.20 s = .
TestSocket#test_connect_timeout = 0.00 s = .
TestSocket#test_getaddrinfo = 0.00 s = .
TestSocket#test_getaddrinfo_raises_no_errors_on_port_argument_of_0 = 0.00 s = .
TestSocket#test_getnameinfo = 0.00 s = .
TestSocket#test_initialize = 0.00 s = .
TestSocket#test_ip_address_list = 0.00 s = .
TestSocket#test_linger = 0.00 s = .
TestSocket#test_socket_new = 0.00 s = .
TestSocket#test_sysaccept = 0.00 s = .
TestSocket#test_tcp = 0.00 s = .
TestSocket#test_tcp_server_sockets = 0.00 s = .
TestSocket#test_tcp_server_sockets_port0 = 0.00 s = .
TestSocket#test_timestamp = 0.00 s = .
TestSocket#test_timestampns = 0.00 s = .
TestSocket#test_udp_server = 0.01 s = .
TestSocket#test_unix = 0.00 s = .
TestSocket#test_unix_server_socket = 0.00 s = .
TestSocket#test_unpack_sockaddr = 0.00 s = .


Finished tests in 0.236844s, 97.1103 tests/s, 422.2188 assertions/s.

23 tests, 100 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 1.9.4dev (2011-09-10 trunk 33245) [x86_64-darwin10.8.0]

$ ./ruby -v
ruby 1.9.4dev (2011-09-10 trunk 33245) [x86_64-darwin10.8.0]

$ uname -a
Darwin mbp-akitsukada.local 10.8.0 Darwin Kernel Version 10.8.0: Tue
Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

----------------------------------------
Bug #5151: test/socket/test_socket.rb fail when udp connection failed
http://redmine.ruby-lang.org/issues/5151

Author: Ayumu AIZAWA
Status: Assigned
Priority: Normal
Assignee: Kenta Murata
Category: ext
Target version: 1.9.4
ruby -v: -


=begin
test/socket/test_socket.rb  の test_udp_server 内で Socket.ip_address_list で得られる
アドレスに対して接続できないときに RuntimeError でテストが失敗します。

同じテストファイルの中の test_ip_address_list は成功しているので、取得しているリスト
の中身自体は問題なさそうなので、接続できないときはスキップしてしまってよいのでは
ないかとおもいました。

以下実行結果です。

 $ make test-all TESTS='test/socket/test_socket.rb'
 ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" test/socket/test_socket.rb
 Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"
 
 # Running tests:
 
 ..................E...
 
 Finished tests in 10.225113s, 2.1516 tests/s, 7.2371 assertions/s.
 
 1) Error:
 test_udp_server(TestSocket):
 RuntimeError: no response from #<Addrinfo: fd5e:b7ac:aaf8:9f02:223:32ff:feb4:f300>
 /Users/ayumin/github/ruby/test/socket/test_socket.rb:297:in `block (3 levels) in test_udp_server'
 /Users/ayumin/github/ruby/.ext/common/socket.rb:45:in `connect_internal'
 /Users/ayumin/github/ruby/.ext/common/socket.rb:92:in `connect'
 /Users/ayumin/github/ruby/test/socket/test_socket.rb:293:in `block (2 levels) in test_udp_server'
 /Users/ayumin/github/ruby/test/socket/test_socket.rb:292:in `each'
 /Users/ayumin/github/ruby/test/socket/test_socket.rb:292:in `block in test_udp_server'
 /Users/ayumin/github/ruby/.ext/common/socket.rb:553:in `udp_server_sockets'
 /Users/ayumin/github/ruby/test/socket/test_socket.rb:276:in `test_udp_server'
 
 22 tests, 74 assertions, 0 failures, 1 errors, 0 skips
 make: *** [yes-test-all] Error 1

スキップするパッチは https://gist.github.com/1121247 です。

パッチ適用後の実行結果は以下のとおりです。

 $ make test-all TESTS='test/socket/test_socket.rb'
 ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" test/socket/test_socket.rb
 Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"
 
 # Running tests:
 
 ..................S...
 
 Finished tests in 20.225713s, 1.0877 tests/s, 3.6587 assertions/s.
 
 1) Skipped:
 test_udp_server(TestSocket) [/Users/ayumin/github/ruby/test/socket/test_socket.rb:307]:
 need sendmsg and recvmsg
 
 22 tests, 74 assertions, 0 failures, 0 errors, 1 skips

=end



-- 
http://redmine.ruby-lang.org

In This Thread