From ce8729feb61d507805d965c5479f343e3701c659 Mon Sep 17 00:00:00 2001 From: nagachika Date: Wed, 24 Aug 2016 14:56:53 +0000 Subject: merge revision(s) 53586,53587,54030: [Backport #12331] increase timeout for ARMv7 http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20160113T091704Z.diff.html.gz * test/ruby/test_array.rb: split out the test for no stack error on large input for test_permutation, test_repeated_permutation, and test_repeated_combination, and make them all timeout:30. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_array.rb | 10 ++++++++-- test/ruby/test_iseq.rb | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index b1fc473f86..eacc0b007b 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -1819,7 +1819,9 @@ class TestArray < Test::Unit::TestCase bug3708 = '[ruby-dev:42067]' assert_equal(b, @cls[0, 1, 2, 3, 4][1, 4].permutation.to_a, bug3708) + end + def test_permutation_stack_error bug9932 = '[ruby-core:63103] [Bug #9932]' assert_separately([], <<-"end;") # do assert_nothing_raised(SystemStackError, "#{bug9932}") do @@ -1851,8 +1853,10 @@ class TestArray < Test::Unit::TestCase a = @cls[0, 1, 2, 3, 4][1, 4].repeated_permutation(2) assert_empty(a.reject {|x| !x.include?(0)}) + end - assert_separately([], <<-"end;") # do + def test_repeated_permutation_stack_error + assert_separately([], <<-"end;", timeout: 30) # do assert_nothing_raised(SystemStackError) do assert_equal(:ok, Array.new(100_000, nil).repeated_permutation(500_000) {break :ok}) end @@ -1886,8 +1890,10 @@ class TestArray < Test::Unit::TestCase a = @cls[0, 1, 2, 3, 4][1, 4].repeated_combination(2) assert_empty(a.reject {|x| !x.include?(0)}) + end - assert_separately([], <<-"end;") # do + def test_repeated_combination_stack_error + assert_separately([], <<-"end;", timeout: 20) # do assert_nothing_raised(SystemStackError) do assert_equal(:ok, Array.new(100_000, nil).repeated_combination(500_000) {break :ok}) end diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 7af8c1b11b..4561eeb952 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -187,7 +187,7 @@ class TestISeq < Test::Unit::TestCase end def test_parent_iseq_mark - assert_separately([], <<-'end;') + assert_separately([], <<-'end;', timeout: 20) ->{ ->{ ->{ -- cgit v1.2.3