test_insns-lower-recursion-depth.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. The patched test is a recursion function. We have lower stack size,
  2. so we hit SystemStackError sooner than on other platforms.
  3. #361 test_insns.rb:389:in `block in <top (required)>':
  4. # recursive once
  5. def once n
  6. return %r/#{
  7. if n == 0
  8. true
  9. else
  10. once(n-1) # here
  11. end
  12. }/ox
  13. end
  14. x = once(128); x = once(7); x = once(16);
  15. x =~ "true" && $~
  16. #=> "" (expected "true") once
  17. Stderr output is not empty
  18. bootstraptest.tmp.rb:3:in `once': stack level too deep (SystemStackError)
  19. from bootstraptest.tmp.rb:7:in `block in once'
  20. from bootstraptest.tmp.rb:3:in `once'
  21. from bootstraptest.tmp.rb:7:in `block in once'
  22. from bootstraptest.tmp.rb:3:in `once'
  23. from bootstraptest.tmp.rb:7:in `block in once'
  24. from bootstraptest.tmp.rb:3:in `once'
  25. from bootstraptest.tmp.rb:7:in `block in once'
  26. from bootstraptest.tmp.rb:3:in `once'
  27. ... 125 levels...
  28. from bootstraptest.tmp.rb:3:in `once'
  29. from bootstraptest.tmp.rb:7:in `block in once'
  30. from bootstraptest.tmp.rb:3:in `once'
  31. from bootstraptest.tmp.rb:11:in `<main>'
  32. Test_insns.rb FAIL 1/187
  33. FAIL 1/1197 tests failed
  34. Make: *** [uncommon.mk:666: yes-btest-ruby] Error 1
  35. --- a/bootstraptest/test_insns.rb
  36. +++ b/bootstraptest/test_insns.rb
  37. @@ -276,7 +276,7 @@
  38. end
  39. }/ox
  40. end
  41. - x = once(128); x = once(7); x = once(16);
  42. + x = once(32); x = once(7); x = once(16);
  43. x =~ "true" && $~
  44. },
  45. [ 'once', <<-'},', ], # {