ruby-changes:35412
From: usa <ko1@a...>
Date: Wed, 10 Sep 2014 11:49:40 +0900 (JST)
Subject: [ruby-changes:35412] usa:r47494 (ruby_2_0_0): merge revision(s) 47362: [Backport #9984]
usa 2014-09-10 11:49:27 +0900 (Wed, 10 Sep 2014) New Revision: 47494 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47494 Log: merge revision(s) 47362: [Backport #9984] * test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak): added timeout into testcase for low performance environment. [Bug #9984][ruby-core:63367] Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/test/openssl/test_pkey_rsa.rb branches/ruby_2_0_0/test/ruby/envutil.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 47493) +++ ruby_2_0_0/ChangeLog (revision 47494) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Wed Sep 10 11:43:55 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * test/openssl/test_pkey_rsa.rb (OpenSSL#test_sign_verify_memory_leak): + added timeout into testcase for low performance environment. + [Bug #9984][ruby-core:63367] + Wed Sep 10 11:39:54 2014 Nobuyoshi Nakada <nobu@r...> * hash.c (env_aset, env_has_key, env_assoc, env_has_value), Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 47493) +++ ruby_2_0_0/version.h (revision 47494) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-09-10" -#define RUBY_PATCHLEVEL 557 +#define RUBY_PATCHLEVEL 558 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 9 Index: ruby_2_0_0/test/ruby/envutil.rb =================================================================== --- ruby_2_0_0/test/ruby/envutil.rb (revision 47493) +++ ruby_2_0_0/test/ruby/envutil.rb (revision 47494) @@ -340,7 +340,7 @@ eom https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/envutil.rb#L340 assert_warning(*args) {$VERBOSE = false; yield} end - def assert_no_memory_leak(args, prepare, code, message=nil, limit: 1.52, rss: false) + def assert_no_memory_leak(args, prepare, code, message=nil, limit: 1.52, rss: false, timeout: 10) require_relative 'memory_status' token = "\e[7;1m#{$$.to_s}:#{Time.now.strftime('%s.%L')}:#{rand(0x10000).to_s(16)}:\e[m" token_dump = token.dump @@ -359,7 +359,7 @@ eom https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/ruby/envutil.rb#L359 code, 'GC.start', ].join("\n") - _, err, status = EnvUtil.invoke_ruby(args, cmd, true, true) + _, err, status = EnvUtil.invoke_ruby(args, cmd, true, true, timeout: timeout) before = err.sub!(/^#{token_re}START=(\{.*\})\n/, '') && Memory::Status.parse($1) after = err.sub!(/^#{token_re}FINAL=(\{.*\})\n/, '') && Memory::Status.parse($1) assert_equal([true, ""], [status.success?, err], message) Index: ruby_2_0_0/test/openssl/test_pkey_rsa.rb =================================================================== --- ruby_2_0_0/test/openssl/test_pkey_rsa.rb (revision 47493) +++ ruby_2_0_0/test/openssl/test_pkey_rsa.rb (revision 47494) @@ -77,7 +77,7 @@ class OpenSSL::TestPKeyRSA < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/openssl/test_pkey_rsa.rb#L77 def test_sign_verify_memory_leak bug9743 = '[ruby-core:62038] [Bug #9743]' - assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true) + assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true, timeout: 30) data = 'Sign me!' digest = OpenSSL::Digest::SHA512.new pkey = OpenSSL::PKey::RSA.new(2048) @@ -89,7 +89,7 @@ class OpenSSL::TestPKeyRSA < Test::Unit: https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/openssl/test_pkey_rsa.rb#L89 } CODE - assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true) + assert_no_memory_leak(%w[-ropenssl], <<-PREP, <<-CODE, bug9743, rss: true, timeout: 30) data = 'Sign me!' digest = OpenSSL::Digest::SHA512.new pkey = OpenSSL::PKey::RSA.new(2048) Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r47362 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/